-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve path handling in batch scripts (#557)
- Loading branch information
Showing
8 changed files
with
117 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
set ThisDir0="%~dp0." | ||
call %ThisDir0%\Scripts\MAKE_Patch104pZH.bat build | ||
call %ThisDir0%\Scripts\MAKE_Patch104pArtZH.bat build | ||
setlocal | ||
|
||
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%\* | ||
xcopy /y /s "%ReleaseUnpackedDir%\*" "%GeneratedReleaseUnpackedDir%\*" | ||
|
||
:: Define archive name(s) | ||
set ArchiveName=Patch104pZH | ||
|
||
:: Generate Archive(s) | ||
tar.exe -a -c -C %GeneratedReleaseUnpackedDir% -f %ReleaseDir%\%ArchiveName%.zip *.* | ||
tar.exe -a -c -C "%GeneratedReleaseUnpackedDir%" -f "%ReleaseDir%\%ArchiveName%.zip" *.* | ||
|
||
endlocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
echo on | ||
set ThisDir1="%~dp0." | ||
set ThisDir1=%~dp0. | ||
set ThisArg1=%~1 | ||
call %ThisDir1%\SETUP_Folders.bat | ||
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 /f /q /s "%GeneratedBigFilesUnpackedDir%\%BigName%" | ||
del /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%\" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
echo on | ||
set ThisDir1="%~dp0." | ||
set ThisDir1=%~dp0. | ||
set ThisArg1=%~1 | ||
call %ThisDir1%\SETUP_Folders.bat | ||
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 /f /q /s "%GeneratedBigFilesUnpackedDir%\%BigName%" | ||
del /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%\" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
:: Setup work folders | ||
set ProjectDir="%~dp0.." | ||
set ProjectDir=%~dp0.. | ||
set ToolsDir=%ProjectDir%\..\Tools | ||
set GameFilesDir=%ProjectDir%\GameFilesEdited | ||
set ReleaseUnpackedDir=%ProjectDir%\ReleaseUnpacked | ||
set ReleaseDir=%ProjectDir%\.Release | ||
|
||
set GeneratedBigFilesUnpackedDir=%ProjectDir%\.Generated\BigFilesUnpacked | ||
set GeneratedBigFilesDir=%ProjectDir%\.Generated\BigFiles | ||
|
||
set GeneratedReleaseUnpackedDir=%ProjectDir%\.Generated\ReleaseUnpacked | ||
|
||
:: Create folders | ||
if not exist %ReleaseDir% mkdir %ReleaseDir% | ||
if not exist %GeneratedBigFilesUnpackedDir% mkdir %GeneratedBigFilesUnpackedDir% | ||
if not exist %GeneratedBigFilesDir% mkdir %GeneratedBigFilesDir% | ||
if not exist %GeneratedReleaseUnpackedDir% mkdir %GeneratedReleaseUnpackedDir% | ||
|
||
setlocal enableextensions enabledelayedexpansion | ||
if not exist "%ReleaseDir%" mkdir "%ReleaseDir%" | ||
if not exist "%GeneratedBigFilesUnpackedDir%" mkdir "%GeneratedBigFilesUnpackedDir%" | ||
if not exist "%GeneratedBigFilesDir%" mkdir "%GeneratedBigFilesDir%" | ||
if not exist "%GeneratedReleaseUnpackedDir%" mkdir "%GeneratedReleaseUnpackedDir%" |