Re-add ZIP build for Windows.

This commit is contained in:
Stephen Anthony 2024-10-07 16:27:13 -02:30
parent 0f9cd119ab
commit 4c4c62f7a0
1 changed files with 31 additions and 8 deletions

View File

@ -1,17 +1,33 @@
@echo off & setlocal enableextensions @echo off & setlocal enableextensions
echo This will create an InnoSetup installer for 64-bit Stella. echo This will create an InnoSetup installer for 64-bit Stella
echo as well as a ZIP archive.
echo. echo.
echo ! InnoSetup must be linked to this directory as 'iscc.lnk' echo ! InnoSetup must be linked to this directory as 'iscc.lnk'
echo ! 'zip.exe' must be installed in this directory (for ZIP files)
echo. echo.
echo !!! Make sure the code has already been compiled in Visual Studio echo !!! Make sure the code has already been compiled in Visual Studio
echo !!! before launching this command. echo !!! before launching this command.
echo. echo.
:: Make sure InnoSetup is available :: Make sure all tools are available
set HAVE_ISCC=1
set HAVE_ZIP=1
:: Make sure InnoSetup and/or ZIP are available
if not exist "iscc.lnk" ( if not exist "iscc.lnk" (
echo InnoSetup 'iscc.lnk' not found echo InnoSetup 'iscc.lnk' not found - EXE files will not be created
goto done set HAVE_ISCC=0
)
if not exist "zip.exe" (
echo ZIP command not found - ZIP files will not be created
set HAVE_ZIP=0
)
if %HAVE_ISCC% == 0 (
if %HAVE_ZIP% == 0 (
echo Both EXE and ZIP files cannot be created, exiting
goto done
)
) )
set RELEASE=x64\Release set RELEASE=x64\Release
@ -36,10 +52,10 @@ mkdir %STELLA_DIR%\docs
echo Copying executable files ... echo Copying executable files ...
copy %RELEASE%\Stella.exe %STELLA_DIR% copy %RELEASE%\Stella.exe %STELLA_DIR%
copy %RELEASE%\*.dll %STELLA_DIR% copy %RELEASE%\SDL*.dll %STELLA_DIR%
echo Copying DOC files ... echo Copying DOC files ...
xcopy ..\..\..\docs\* %STELLA_DIR%\docs /s /q xcopy ..\..\..\docs\* %STELLA_DIR%\docs /s /q
copy ..\..\..\Announce.txt %STELLA_DIR%\docs copy ..\..\..\Announce.txt %STELLA_DIR%\docs
copy ..\..\..\Changes.txt %STELLA_DIR%\docs copy ..\..\..\Changes.txt %STELLA_DIR%\docs
copy ..\..\..\Copyright.txt %STELLA_DIR%\docs copy ..\..\..\Copyright.txt %STELLA_DIR%\docs
@ -54,9 +70,16 @@ if not exist Output (
mkdir Output mkdir Output
) )
:: Actually create the ZIP file
if %HAVE_ZIP% == 1 (
echo Creating ZIP file ...
zip -q -r Output\%STELLA_DIR%-windows.zip %STELLA_DIR%
)
:: Create the Inno EXE files :: Create the Inno EXE files
echo Creating InnoSetup EXE ... if %HAVE_ISCC% == 1 (
iscc.lnk "%CD%\stella.iss" /q "/dSTELLA_VER=%STELLA_VER%" "/dSTELLA_PATH=%STELLA_DIR%" "/dSTELLA_DOCPATH=%STELLA_DIR%\docs" echo Creating InnoSetup EXE ...
iscc.lnk "%CD%\stella.iss" /q "/dSTELLA_VER=%STELLA_VER%" "/dSTELLA_PATH=%STELLA_DIR%" "/dSTELLA_DOCPATH=%STELLA_DIR%\docs"
)
:: Cleanup time :: Cleanup time
echo Cleaning up files ... echo Cleaning up files ...