Skip to content

Commit

Permalink
Re-add ZIP build for Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
sa666666 committed Oct 7, 2024
1 parent 0f9cd11 commit 4c4c62f
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions src/os/windows/Create_Builds.bat
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
@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 ! InnoSetup must be linked to this directory as 'iscc.lnk'
echo ! 'zip.exe' must be installed in this directory (for ZIP files)
echo.
echo !!! Make sure the code has already been compiled in Visual Studio
echo !!! before launching this command.
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" (
echo InnoSetup 'iscc.lnk' not found
goto done
echo InnoSetup 'iscc.lnk' not found - EXE files will not be created
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
Expand All @@ -36,10 +52,10 @@ mkdir %STELLA_DIR%\docs

echo Copying executable files ...
copy %RELEASE%\Stella.exe %STELLA_DIR%
copy %RELEASE%\*.dll %STELLA_DIR%
copy %RELEASE%\SDL*.dll %STELLA_DIR%

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 ..\..\..\Changes.txt %STELLA_DIR%\docs
copy ..\..\..\Copyright.txt %STELLA_DIR%\docs
Expand All @@ -54,9 +70,16 @@ if not exist 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
echo Creating InnoSetup EXE ...
iscc.lnk "%CD%\stella.iss" /q "/dSTELLA_VER=%STELLA_VER%" "/dSTELLA_PATH=%STELLA_DIR%" "/dSTELLA_DOCPATH=%STELLA_DIR%\docs"
if %HAVE_ISCC% == 1 (
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
echo Cleaning up files ...
Expand Down

0 comments on commit 4c4c62f

Please sign in to comment.