CheatMenuSA/tools/PackAll.bat

45 lines
1.2 KiB
Batchfile
Raw Normal View History

2021-12-27 13:44:13 -05:00
@echo off
@REM Packs all game files into their proper archives (Yes I'm that lazy)
echo ------------------------------------------------------
echo "CheatMenu Packaging Utility"
echo ------------------------------------------------------
2021-12-28 01:32:29 -05:00
rd /S /Q "archive" /Q
2021-12-27 13:44:13 -05:00
cd tools
echo Packing SA...
2021-12-28 01:32:29 -05:00
call :copyFiles "CheatMenuSA"
2021-12-27 13:44:13 -05:00
echo Packing VC...
2021-12-28 01:32:29 -05:00
call :copyFiles "CheatMenuVC"
2021-12-27 13:44:13 -05:00
echo Packing III...
2021-12-28 01:32:29 -05:00
call :copyFiles "CheatMenuIII"
2021-12-27 13:44:13 -05:00
rd /S /Q "pack" /Q
2021-12-28 01:32:29 -05:00
cd ..
2021-12-27 13:44:13 -05:00
exit
@REM ------------------------------------------------------
@REM Functions
@REM ------------------------------------------------------
:copyFiles
2021-12-28 01:32:29 -05:00
set "asiPath="..\build\bin\%~1.asi""
set "folderpath="..\resource\%~1""
set "archivePath="..\archive\%~1.7z""
2021-12-27 13:44:13 -05:00
@REM Remove existing files
rd /S /Q "pack" /Q
rd /S /Q %archivePath% /Q
@REM Copy the files to a temp folder
@REM straight xcopy doesn't seem to work on my system, broken registry?
2022-06-16 14:44:33 -04:00
xcopy /s %asiPath% "pack\" /K /D /H /Y
xcopy /s %folderpath% "pack\%~1\" /K /D /H /Y
xcopy /s "..\resource\common\" "pack\%~1\" /K /D /H /Y
2021-12-27 13:44:13 -05:00
@REM Guessing we have 7zip installed already, well I have
2022-06-20 17:08:35 -04:00
"C:\Program Files\7-Zip\7z.exe" a -t7z %archivePath% ".\pack\*" -mx=9
2021-12-27 13:44:13 -05:00
@REM ------------------------------------------------------