[Project64] Update package script to be able to pass filename
This commit is contained in:
parent
eb3f8bca5c
commit
caa4f7e33e
|
@ -1,18 +1,28 @@
|
|||
@echo off
|
||||
@ECHO OFF
|
||||
SETLOCAL
|
||||
|
||||
if exist "C:\Program Files\7-Zip\7z.exe" ( set zip="C:\Program Files\7-Zip\7z.exe")
|
||||
|
||||
|
||||
if %zip% == "" (
|
||||
echo can not find 7z.exe
|
||||
goto :end
|
||||
goto :EndErr
|
||||
)
|
||||
|
||||
set ZipFileName=project64
|
||||
if not "%1" == "" set ZipFileName=%1
|
||||
|
||||
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"
|
||||
|
@ -36,5 +46,19 @@ copy "%base_dir%\Plugin\Input\PJ64_NRage.dll" "%base_dir%\Bin\Package\Plugin\Inp
|
|||
copy "%base_dir%\Plugin\RSP\RSP 1.7.dll" "%base_dir%\Bin\Package\Plugin\RSP"
|
||||
|
||||
cd %base_dir%\Bin\Package
|
||||
%zip% a -tzip -r ../project64 *
|
||||
%zip% a -tzip -r "%base_dir%\Package\%ZipFileName%" *
|
||||
cd /d %current_dir%
|
||||
|
||||
echo Package %ZipFileName% created
|
||||
|
||||
goto :end
|
||||
|
||||
|
||||
:EndErr
|
||||
ENDLOCAL
|
||||
echo Build failed
|
||||
exit /B 1
|
||||
|
||||
:End
|
||||
ENDLOCAL
|
||||
exit /B 0
|
||||
|
|
Loading…
Reference in New Issue