Updates to the Windows build process, to check for required utilities and generate TXT files in a format that Notepad can understand (can you believe it's almost 2010 and Notepad *still* can't deal with newlines?).

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1917 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2009-12-25 17:39:52 +00:00
parent ecb4689584
commit d771fc7af6
2 changed files with 54 additions and 27 deletions

View File

@ -4,16 +4,41 @@ echo Stella build script for creating win32 and x64 builds.
echo This will create installers (based on InnoSetup) for both 32 and 64-bit,
echo as well as a ZIP archive containing both versions.
echo.
echo ! The 'zip' utility must be installed in your path.
echo ! InnoSetup should be linked to this directory as 'iscc.lnk'
echo ! InnoSetup should be linked to this directory as 'iscc.lnk' (for EXE files)
echo ! The 'zip.exe' utility must be available (for ZIP files)
echo ! The 'flip.exe' utility must be available (for readable TXT files)
echo.
echo !!! Make sure the code has already been compiled in Visual Studio
echo !!! before launching this command.
echo.
:: Make sure all tools are available
set HAVE_ISCC=1
set HAVE_ZIP=1
set HAVE_FLIP=1
if not exist "iscc.lnk" (
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
)
)
if not exist "flip.exe" (
echo FLIP command not found - TXT files will be unreadable in Notepad
set HAVE_FLIP=0
)
set RELEASE_32=Release
set RELEASE_64=x64\Release
echo.
set /p STELLA_VER=Enter Stella version:
echo.
set /p TO_BUILD=Version to build (32/64/a=all):
@ -48,7 +73,7 @@ if %BUILD_64% == 1 (
)
:: Create ZIP folder first
set STELLA_DIR=stella-%STELLA_VER%
set STELLA_DIR=Stella-%STELLA_VER%
if exist %STELLA_DIR% (
echo Removing old %STELLA_DIR% directory
rmdir /s /q %STELLA_DIR%
@ -60,16 +85,16 @@ mkdir %STELLA_DIR%\64-bit
mkdir %STELLA_DIR%\docs
if %BUILD_32% == 1 (
echo Copying 32-bit files to ZIP ...
copy %RELEASE_32%\Stella.exe %STELLA_DIR%\32-bit
copy %RELEASE_32%\SDL.dll %STELLA_DIR%\32-bit
echo Copying 32-bit files ...
copy %RELEASE_32%\Stella.exe %STELLA_DIR%\32-bit
copy %RELEASE_32%\SDL.dll %STELLA_DIR%\32-bit
copy %RELEASE_32%\zlibwapi.dll %STELLA_DIR%\32-bit
)
if %BUILD_64% == 1 (
echo Copying 64-bit files to ZIP ...
copy %RELEASE_64%\Stella.exe %STELLA_DIR%\64-bit
copy %RELEASE_64%\SDL.dll %STELLA_DIR%\64-bit
echo Copying 64-bit files ...
copy %RELEASE_64%\Stella.exe %STELLA_DIR%\64-bit
copy %RELEASE_64%\SDL.dll %STELLA_DIR%\64-bit
copy %RELEASE_64%\zlibwapi.dll %STELLA_DIR%\64-bit
)
@ -82,26 +107,28 @@ copy ..\..\License.txt %STELLA_DIR%\docs
copy ..\..\Readme.txt %STELLA_DIR%\docs
copy ..\..\README-SDL.txt %STELLA_DIR%\docs
copy ..\..\Todo.txt %STELLA_DIR%\docs
::for %%a in (%STELLA_DIR%\docs\*.txt) do (
:: flip -d "%%a"
::)
if %HAVE_FLIP% == 1 (
for %%a in (%STELLA_DIR%\docs\*.txt) do (
flip -d "%%a"
)
)
:: Actually create the ZIP file
echo Creating ZIP file ...
zip -q -r Output\%STELLA_DIR%-windows.zip %STELLA_DIR%
if %HAVE_ZIP% == 1 (
echo Creating ZIP file ...
zip -q -r Output\%STELLA_DIR%-windows.zip %STELLA_DIR%
)
:: Now create the Inno EXE files
if not exist "iscc.lnk" (
echo InnoSetup 'iscc.lnk' not found - EXE files not created
goto done
)
if %BUILD_32% == 1 (
echo Creating 32-bit EXE ...
iscc.lnk %CD%\stella.iss /q "/dSTELLA_VER=%STELLA_VER%" "/dSTELLA_ARCH=win32" "/dSTELLA_PATH=%STELLA_DIR%\32-bit" "/dSTELLA_DOCPATH=%STELLA_DIR%\docs"
)
if %BUILD_64% == 1 (
echo Creating 64-bit EXE ...
iscc.lnk %CD%\stella.iss /q "/dSTELLA_VER=%STELLA_VER%" "/dSTELLA_ARCH=x64" "/dSTELLA_PATH=%STELLA_DIR%\64-bit" "/dSTELLA_DOCPATH=%STELLA_DIR%\docs"
if %HAVE_ISCC% == 1 (
if %BUILD_32% == 1 (
echo Creating 32-bit EXE ...
iscc.lnk %CD%\stella.iss /q "/dSTELLA_VER=%STELLA_VER%" "/dSTELLA_ARCH=win32" "/dSTELLA_PATH=%STELLA_DIR%\32-bit" "/dSTELLA_DOCPATH=%STELLA_DIR%\docs"
)
if %BUILD_64% == 1 (
echo Creating 64-bit EXE ...
iscc.lnk %CD%\stella.iss /q "/dSTELLA_VER=%STELLA_VER%" "/dSTELLA_ARCH=x64" "/dSTELLA_PATH=%STELLA_DIR%\64-bit" "/dSTELLA_DOCPATH=%STELLA_DIR%\docs"
)
)
:: Cleanup time

View File

@ -4,13 +4,13 @@
[Setup]
AppName=Stella
AppVerName=Stella {#STELLA_VER}
AppPublisher=The Stella team
AppPublisher=The Stella Team
AppPublisherURL=http://stella.sourceforge.net
AppSupportURL=http://stella.sourceforge.net
AppUpdatesURL=http://stella.sourceforge.net
DefaultDirName={pf}\Stella
DefaultGroupName=Stella
OutputBaseFilename="stella-{#STELLA_VER}-{#STELLA_ARCH}"
OutputBaseFilename="Stella-{#STELLA_VER}-{#STELLA_ARCH}"
Compression=lzma
SolidCompression=yes
#if STELLA_ARCH == "x64"