-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.cmd
89 lines (65 loc) · 3.3 KB
/
Package.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
@ECHO OFF
SETLOCAL
for /f "delims=" %%a in ('WHERE 7z 2^>nul') do set "zip=%%a"
if "%zip%" == "" (
if exist "C:\Program Files\7-Zip\7z.exe" (
set "zip=C:\Program Files\7-Zip\7z.exe"
) else (
echo can not find 7z.exe
goto :EndErr
)
)
set ZipFileName=Project64-Netplay
if not "%1" == "" set ZipFileName=%1
if "%~2" == "x64" set VSPlatform=64
SET current_dir=%cd%
cd /d %~dp0
SET base_dir=%cd%
cd /d %current_dir%
IF EXIST "%base_dir%\Package" rmdir /S /Q "%base_dir%\Package"
IF %ERRORLEVEL% NEQ 0 GOTO EndErr
IF NOT EXIST "%base_dir%\Package" mkdir "%base_dir%\Package"
IF %ERRORLEVEL% NEQ 0 GOTO EndErr
rd "%base_dir%\Bin\Package" /Q /S > NUL 2>&1
md "%base_dir%\Bin\Package"
md "%base_dir%\Bin\Package\Config\Backup"
md "%base_dir%\Bin\Package\Extras\Mario Party 3 Costume Party v1.1 Patcher"
md "%base_dir%\Bin\Package\Games"
md "%base_dir%\Bin\Package\Plugin%VSPlatform%\Audio"
md "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX\hires_texture\MarioParty"
md "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX\hires_texture\MarioParty2"
md "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX\hires_texture\MarioParty3"
md "%base_dir%\Bin\Package\Plugin%VSPlatform%\Input"
md "%base_dir%\Bin\Package\Plugin%VSPlatform%\RSP"
md "%base_dir%\Bin\Package\Plugin%VSPlatform%\Updater"
md "%base_dir%\Bin\Package\Save"
copy "%base_dir%\Bin\Release%VSPlatform%\Project64-Netplay.exe" "%base_dir%\Bin\Package"
copy "%base_dir%\Source\UserFiles\Config\*.*" "%base_dir%\Bin\Package\Config"
copy "%base_dir%\Source\UserFiles\Config\Backup\*.*" "%base_dir%\Bin\Package\Config\Backup\"
copy "%base_dir%\Source\UserFiles\Extras\*.*" "%base_dir%\Bin\Package\Extras"
copy "%base_dir%\Source\UserFiles\Extras\Mario Party 3 Costume Party v1.1 Patcher\*.*" "%base_dir%\Bin\Package\Extras\Mario Party 3 Costume Party v1.1 Patcher\"
copy "%base_dir%\Source\UserFiles\Games\*.*" "%base_dir%\Bin\Package\Games"
copy "%base_dir%\Source\UserFiles\Plugin\Audio\*" "%base_dir%\Bin\Package\Plugin%VSPlatform%\Audio"
copy "%base_dir%\Source\UserFiles\Plugin\GFX\*" "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX"
copy "%base_dir%\Source\UserFiles\Plugin\GFX\hires_texture\MarioParty\*.*" "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX\hires_texture\MarioParty\"
copy "%base_dir%\Source\UserFiles\Plugin\GFX\hires_texture\MarioParty2\*.*" "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX\hires_texture\MarioParty2\"
copy "%base_dir%\Source\UserFiles\Plugin\GFX\hires_texture\MarioParty3\*.*" "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX\hires_texture\MarioParty3\"
copy "%base_dir%\Source\UserFiles\Plugin\Input\*" "%base_dir%\Bin\Package\Plugin%VSPlatform%\Input"
copy "%base_dir%\Bin\Release%VSPlatform%\Plugin\RSP\RSP 1.7.dll" "%base_dir%\Bin\Package\Plugin%VSPlatform%\RSP"
copy "%base_dir%\Source\UserFiles\Plugin\Updater\*" "%base_dir%\Bin\Package\Plugin%VSPlatform%\Updater"
copy "%base_dir%\Source\UserFiles\Save\*" "%base_dir%\Bin\Package\Save\"
copy "%base_dir%\Source\UserFiles\Replace.bat" "%base_dir%\Bin\Package\"
copy "%base_dir%\Source\UserFiles\UpdateEmulator.bat" "%base_dir%\Bin\Package\"
cd %base_dir%\Bin\Package
"%zip%" a -tzip -r "%base_dir%\Package\%ZipFileName%" *
cd /d %current_dir%
echo Package %ZipFileName% created
copy "%base_dir%\Package\Project64-MPN.zip" "Bin\Release\"
goto :end
:EndErr
ENDLOCAL
echo Build failed
exit /B 1
:End
ENDLOCAL
exit /B 0