Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make build scripts work with spaces in path, Fix Release build #418

Merged
merged 1 commit into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Patch104pZH/MAKE_Install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ if '%errorlevel%' NEQ '0' (
:--------------------------------------

echo on
set ThisDir0=%~dp0
set ThisDir0="%~dp0."
set GeneratedReleaseUnpackedFiles=

call %ThisDir0%Scripts\MAKE_Patch104pZH.bat build
call %ThisDir0%Scripts\MAKE_Patch104pArtZH.bat build
call %ThisDir0%SETUP_UserSettings.bat
call %ThisDir0%\Scripts\MAKE_Patch104pZH.bat build
call %ThisDir0%\Scripts\MAKE_Patch104pArtZH.bat build
call %ThisDir0%\SETUP_UserSettings.bat

:: Rename files as per setup in SETUP_UserSettings.bat
for %%f in (%GameFilesToDisable%) do (
Expand Down
6 changes: 3 additions & 3 deletions Patch104pZH/MAKE_Install_Run.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ if '%errorlevel%' NEQ '0' (
:--------------------------------------

echo on
set ThisDir0=%~dp0
set ThisDir0="%~dp0."

:: Install
call %ThisDir0%MAKE_Install.bat
call %ThisDir0%\MAKE_Install.bat

:: Run game
set GameExeArgs0=%GameExeArgs:"=%
%GameRootDir%\%GameExeFile% %GameExeArgs0%

:: Uninstall
call %ThisDir0%MAKE_Uninstall.bat
call %ThisDir0%\MAKE_Uninstall.bat
6 changes: 3 additions & 3 deletions Patch104pZH/MAKE_Release.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set ThisDir0=%~dp0
call %ThisDir0%Scripts\MAKE_Patch104pZH.bat
call %ThisDir0%Scripts\MAKE_Patch104pArtZH.bat
set ThisDir0="%~dp0."
call %ThisDir0%\Scripts\MAKE_Patch104pZH.bat build
call %ThisDir0%\Scripts\MAKE_Patch104pArtZH.bat build

:: Copy base release files
xcopy /y /s %ReleaseUnpackedDir%\* %GeneratedReleaseUnpackedDir%\*
Expand Down
8 changes: 4 additions & 4 deletions Patch104pZH/MAKE_Uninstall.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ if '%errorlevel%' NEQ '0' (
:--------------------------------------

echo on
set ThisDir0=%~dp0
set ThisDir0="%~dp0."
set GeneratedReleaseUnpackedFiles=

call %ThisDir0%Scripts\MAKE_Patch104pZH.bat
call %ThisDir0%Scripts\MAKE_Patch104pArtZH.bat
call %ThisDir0%SETUP_UserSettings.bat
call %ThisDir0%\Scripts\MAKE_Patch104pZH.bat
call %ThisDir0%\Scripts\MAKE_Patch104pArtZH.bat
call %ThisDir0%\SETUP_UserSettings.bat

:: Remove release files from game
for %%f in (%GeneratedReleaseUnpackedFiles%) do (
Expand Down
42 changes: 21 additions & 21 deletions Patch104pZH/Scripts/MAKE_Patch104pArtZH.bat
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
echo on
set ThisDir1=%~dp0
set ThisArg1=%1
call %ThisDir1%SETUP_Folders.bat
set ThisDir1="%~dp0."
set ThisArg1=%~1
call %ThisDir1%\SETUP_Folders.bat

:: Define big file name(s)
set BigName=600_Patch104pArtZH
set GeneratedReleaseUnpackedFiles=%GeneratedReleaseUnpackedFiles% %BigName%.big

if "%ThisArg1%"=="build" (
:: Free folders of big file contents
del /s /f /q %GeneratedBigFilesUnpackedDir%\%BigName%
del /s /f /q %GeneratedBigFilesDir%\%BigName%.big

:: Copy .big contents
:: Add optional non-essential art files here.
xcopy /y %GameFilesDir%\Art\W3D\NBPTower_DNS.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NBPTower_DS.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NBPTower_ENS.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NBPTower_ES.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NBPTower_NS.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NBPTower_S.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\

:: Generate .big file(s)
%ToolsDir%\GeneralsBigCreator\GeneralsBigCreator.exe -source %GeneratedBigFilesUnpackedDir%\%BigName% -dest %GeneratedBigFilesDir%\%BigName%.big

:: Generate Release file(s)
xcopy /y %GeneratedBigFilesDir%\%BigName%.big %GeneratedReleaseUnpackedDir%\%BigName%.big*
:: Free folders of big file contents
del /s /f /q %GeneratedBigFilesUnpackedDir%\%BigName%
del /s /f /q %GeneratedBigFilesDir%\%BigName%.big
:: Copy .big contents
:: Add optional non-essential art files here.
xcopy /y %GameFilesDir%\Art\W3D\NBPTower_DNS.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NBPTower_DS.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NBPTower_ENS.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NBPTower_ES.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NBPTower_NS.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NBPTower_S.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
:: Generate .big file(s)
%ToolsDir%\GeneralsBigCreator\GeneralsBigCreator.exe -source %GeneratedBigFilesUnpackedDir%\%BigName% -dest %GeneratedBigFilesDir%\%BigName%.big
:: Generate Release file(s)
xcopy /y %GeneratedBigFilesDir%\%BigName%.big %GeneratedReleaseUnpackedDir%\%BigName%.big*
)
52 changes: 26 additions & 26 deletions Patch104pZH/Scripts/MAKE_Patch104pZH.bat
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
echo on
set ThisDir1=%~dp0
set ThisArg1=%1
call %ThisDir1%SETUP_Folders.bat
set ThisDir1="%~dp0."
set ThisArg1=%~1
call %ThisDir1%\SETUP_Folders.bat

:: Define big file name(s)
set BigName=600_Patch104pZH
set GeneratedReleaseUnpackedFiles=%GeneratedReleaseUnpackedFiles% %BigName%.big

if "%ThisArg1%"=="build" (
:: Free folders of big file contents
del /s /f /q %GeneratedBigFilesUnpackedDir%\%BigName%
del /s /f /q %GeneratedBigFilesDir%\%BigName%.big

:: Copy .big contents
:: All files listed here become part of the core of Patch104p and are meant
:: to be critical for client compatibility and essential for functionality.
:: Optional files should be moved into one of the other scripts.
xcopy /y /s %GameFilesDir%\*.ini %GeneratedBigFilesUnpackedDir%\%BigName%\
xcopy /y /s %GameFilesDir%\*.wnd %GeneratedBigFilesUnpackedDir%\%BigName%\
xcopy /y %GameFilesDir%\Art\Textures\exlaser3.dds %GeneratedBigFilesUnpackedDir%\%BigName%\Art\Textures\
xcopy /y %GameFilesDir%\Art\W3D\ABSWGLink_L.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\AVAvnger.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\AVAvnger_D.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\EXCarptBmb2.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NVLOutpost.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NVLOutpost_D.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\

:: Generate .big file(s)
%ToolsDir%\GeneralsBigCreator\GeneralsBigCreator.exe -source %GeneratedBigFilesUnpackedDir%\%BigName% -dest %GeneratedBigFilesDir%\%BigName%.big

:: Generate Release file(s)
xcopy /y %GeneratedBigFilesDir%\%BigName%.big %GeneratedReleaseUnpackedDir%\%BigName%.big*
:: Free folders of big file contents
del /s /f /q %GeneratedBigFilesUnpackedDir%\%BigName%
del /s /f /q %GeneratedBigFilesDir%\%BigName%.big
:: Copy .big contents
:: All files listed here become part of the core of Patch104p and are meant
:: to be critical for client compatibility and essential for functionality.
:: Optional files should be moved into one of the other scripts.
xcopy /y /s %GameFilesDir%\*.ini %GeneratedBigFilesUnpackedDir%\%BigName%\
xcopy /y /s %GameFilesDir%\*.wnd %GeneratedBigFilesUnpackedDir%\%BigName%\
xcopy /y %GameFilesDir%\Art\Textures\exlaser3.dds %GeneratedBigFilesUnpackedDir%\%BigName%\Art\Textures\
xcopy /y %GameFilesDir%\Art\W3D\ABSWGLink_L.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\AVAvnger.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\AVAvnger_D.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\EXCarptBmb2.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NVLOutpost.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
xcopy /y %GameFilesDir%\Art\W3D\NVLOutpost_D.W3D %GeneratedBigFilesUnpackedDir%\%BigName%\Art\W3D\
:: Generate .big file(s)
%ToolsDir%\GeneralsBigCreator\GeneralsBigCreator.exe -source %GeneratedBigFilesUnpackedDir%\%BigName% -dest %GeneratedBigFilesDir%\%BigName%.big
:: Generate Release file(s)
xcopy /y %GeneratedBigFilesDir%\%BigName%.big %GeneratedReleaseUnpackedDir%\%BigName%.big*
)
2 changes: 1 addition & 1 deletion Patch104pZH/Scripts/SETUP_Folders.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:: Setup work folders
set ProjectDir=%~dp0..
set ProjectDir="%~dp0.."
set ToolsDir=%ProjectDir%\..\Tools
set GameFilesDir=%ProjectDir%\GameFilesEdited
set ReleaseUnpackedDir=%ProjectDir%\ReleaseUnpacked
Expand Down