2016-06-05 06:44:48 +00:00
|
|
|
@ECHO OFF
|
|
|
|
SETLOCAL
|
2015-02-19 08:03:33 +00:00
|
|
|
|
2019-09-30 02:14:53 +00:00
|
|
|
for /f "delims=" %%a in ('WHERE 7z 2^>nul') do set "zip=%%a"
|
2015-09-13 22:20:08 +00:00
|
|
|
|
2019-09-30 02:14:53 +00:00
|
|
|
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
|
|
|
|
)
|
2015-09-13 22:20:08 +00:00
|
|
|
)
|
|
|
|
|
2016-06-05 06:44:48 +00:00
|
|
|
set ZipFileName=project64
|
|
|
|
if not "%1" == "" set ZipFileName=%1
|
2019-09-30 02:17:28 +00:00
|
|
|
if "%~2" == "x64" set VSPlatform=64
|
|
|
|
|
2016-06-05 06:44:48 +00:00
|
|
|
|
2015-02-19 08:03:33 +00:00
|
|
|
SET current_dir=%cd%
|
|
|
|
cd /d %~dp0..\..\
|
|
|
|
SET base_dir=%cd%
|
|
|
|
cd /d %current_dir%
|
|
|
|
|
2016-06-05 06:44:48 +00:00
|
|
|
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
|
|
|
|
|
2015-03-23 18:28:00 +00:00
|
|
|
rd "%base_dir%\Bin\Package" /Q /S > NUL 2>&1
|
2015-03-05 05:23:07 +00:00
|
|
|
md "%base_dir%\Bin\Package"
|
|
|
|
md "%base_dir%\Bin\Package\Config"
|
2020-12-30 21:33:27 +00:00
|
|
|
md "%base_dir%\Bin\Package\Config\Cheats"
|
2021-05-25 04:13:52 +00:00
|
|
|
md "%base_dir%\Bin\Package\Config\Enhancements"
|
2015-03-05 05:23:07 +00:00
|
|
|
md "%base_dir%\Bin\Package\Lang"
|
2019-11-01 13:24:06 +00:00
|
|
|
md "%base_dir%\Bin\Package\Plugin%VSPlatform%"
|
|
|
|
md "%base_dir%\Bin\Package\Plugin%VSPlatform%\Audio"
|
|
|
|
md "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX"
|
|
|
|
md "%base_dir%\Bin\Package\Plugin%VSPlatform%\Input"
|
|
|
|
md "%base_dir%\Bin\Package\Plugin%VSPlatform%\RSP"
|
2015-02-19 08:03:33 +00:00
|
|
|
|
2020-04-26 02:11:54 +00:00
|
|
|
IF EXIST "%base_dir%\Plugin%VSPlatform%\GFX\GLideN64" (
|
|
|
|
md "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX\GLideN64"
|
|
|
|
copy "%base_dir%\Plugin%VSPlatform%\GFX\GLideN64\GLideN64.dll" "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX\GLideN64\GLideN64.dll"
|
2020-04-26 05:06:13 +00:00
|
|
|
copy "%base_dir%\Plugin%VSPlatform%\GFX\GLideN64\*.ini" "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX\GLideN64"
|
2020-04-26 02:11:54 +00:00
|
|
|
md "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX\GLideN64\translations"
|
|
|
|
copy "%base_dir%\Plugin%VSPlatform%\GFX\GLideN64\translations\*.Lang" "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX\GLideN64\translations"
|
|
|
|
)
|
|
|
|
|
2019-09-30 02:17:28 +00:00
|
|
|
copy "%base_dir%\Bin\Release%VSPlatform%\Project64.exe" "%base_dir%\Bin\Package"
|
2017-09-26 20:55:53 +00:00
|
|
|
copy "%base_dir%\Config\Video.rdb" "%base_dir%\Bin\Package\Config"
|
|
|
|
copy "%base_dir%\Config\Audio.rdb" "%base_dir%\Bin\Package\Config"
|
2020-11-19 07:16:07 +00:00
|
|
|
copy "%base_dir%\Config\Cheats\*.cht" "%base_dir%\Bin\Package\Config\Cheats"
|
2021-05-25 04:13:52 +00:00
|
|
|
copy "%base_dir%\Config\Enhancements\*.enh" "%base_dir%\Bin\Package\Config\Enhancements"
|
2015-02-19 08:03:33 +00:00
|
|
|
copy "%base_dir%\Config\Project64.rdb" "%base_dir%\Bin\Package\Config"
|
|
|
|
copy "%base_dir%\Config\Project64.rdx" "%base_dir%\Bin\Package\Config"
|
2015-03-23 18:28:00 +00:00
|
|
|
copy "%base_dir%\Lang\*.pj.Lang" "%base_dir%\Bin\Package\Lang"
|
2019-11-01 13:24:06 +00:00
|
|
|
copy "%base_dir%\Plugin%VSPlatform%\Audio\Jabo_Dsound.dll" "%base_dir%\Bin\Package\Plugin%VSPlatform%\Audio"
|
|
|
|
copy "%base_dir%\Plugin%VSPlatform%\Audio\Project64-Audio.dll" "%base_dir%\Bin\Package\Plugin%VSPlatform%\Audio"
|
|
|
|
copy "%base_dir%\Plugin%VSPlatform%\GFX\Jabo_Direct3D8.dll" "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX"
|
|
|
|
copy "%base_dir%\Plugin%VSPlatform%\GFX\Project64-Video.dll" "%base_dir%\Bin\Package\Plugin%VSPlatform%\GFX"
|
|
|
|
copy "%base_dir%\Plugin%VSPlatform%\Input\PJ64_NRage.dll" "%base_dir%\Bin\Package\Plugin%VSPlatform%\Input"
|
2020-07-15 12:06:03 +00:00
|
|
|
copy "%base_dir%\Plugin%VSPlatform%\Input\Project64-Input.dll" "%base_dir%\Bin\Package\Plugin%VSPlatform%\Input"
|
2023-06-02 01:22:10 +00:00
|
|
|
copy "%base_dir%\Plugin%VSPlatform%\RSP\Project64-RSP.dll" "%base_dir%\Bin\Package\Plugin%VSPlatform%\RSP"
|
2015-09-13 22:20:08 +00:00
|
|
|
|
|
|
|
cd %base_dir%\Bin\Package
|
2019-09-30 02:14:53 +00:00
|
|
|
"%zip%" a -tzip -r "%base_dir%\Package\%ZipFileName%" *
|
2015-09-13 22:20:08 +00:00
|
|
|
cd /d %current_dir%
|
2016-06-05 06:44:48 +00:00
|
|
|
|
|
|
|
echo Package %ZipFileName% created
|
|
|
|
|
|
|
|
goto :end
|
|
|
|
|
|
|
|
|
|
|
|
:EndErr
|
|
|
|
ENDLOCAL
|
|
|
|
echo Build failed
|
|
|
|
exit /B 1
|
|
|
|
|
|
|
|
:End
|
|
|
|
ENDLOCAL
|
|
|
|
exit /B 0
|