2018-02-07 01:08:37 +00:00
|
|
|
@echo off
|
2019-08-17 20:23:02 +00:00
|
|
|
REM Use setlocal to automatically unset variables
|
|
|
|
setlocal
|
|
|
|
|
|
|
|
REM Inno Setup folders. Defined in order of preference.
|
|
|
|
set INNO6_USER_ROOT=%LOCALAPPDATA%\Programs\Inno Setup 6
|
|
|
|
set INNO6_ROOT=%ProgramFiles(x86)%\Inno Setup 6
|
|
|
|
SET INNO5_ROOT=%ProgramFiles(x86)%\Inno Setup 5
|
|
|
|
set INNO_ROOTS="%INNO6_USER_ROOT%" "%INNO6_ROOT%" "%INNO5_ROOT%"
|
|
|
|
set INNO_EXE=ISCC.exe
|
|
|
|
set INNO_EXE_PATH=""
|
2018-02-07 01:08:37 +00:00
|
|
|
|
|
|
|
set savedir=%cd%
|
|
|
|
cd /d %~dp0
|
|
|
|
|
|
|
|
if not exist build\bin\Release goto buildproject
|
|
|
|
|
|
|
|
echo Building 64-bit Windows installer...
|
2019-04-18 22:39:29 +00:00
|
|
|
|
2019-08-17 20:23:02 +00:00
|
|
|
REM Find where Inno Setup is installed
|
|
|
|
for %%r in (%INNO_ROOTS%) do (
|
|
|
|
if exist "%%~r\%INNO_EXE%" (
|
|
|
|
set INNO_EXE_PATH="%%~r\%INNO_EXE%"
|
|
|
|
goto endcheckinnosetuploop
|
|
|
|
)
|
|
|
|
)
|
|
|
|
:endcheckinnosetuploop
|
|
|
|
|
|
|
|
REM Check that Inno Setup is installed
|
|
|
|
if %INNO_EXE_PATH%=="" (
|
|
|
|
echo Could not find Inno Setup.
|
|
|
|
echo Check if Inno Setup is installed.
|
|
|
|
goto failed
|
|
|
|
)
|
|
|
|
|
2019-04-18 22:39:29 +00:00
|
|
|
cd build\installer-inno
|
|
|
|
if ERRORLEVEL 1 goto buildproject
|
2019-08-17 20:23:02 +00:00
|
|
|
%INNO_EXE_PATH% /Qp barrier.iss
|
2018-02-07 01:08:37 +00:00
|
|
|
if ERRORLEVEL 1 goto failed
|
2019-04-18 22:39:29 +00:00
|
|
|
|
2018-02-07 01:08:37 +00:00
|
|
|
echo Build completed successfully
|
|
|
|
goto done
|
|
|
|
|
|
|
|
:buildproject
|
|
|
|
echo To build a 64-bit Windows installer:
|
2019-04-12 14:09:40 +00:00
|
|
|
echo - set B_BUILD_TYPE=Release in build_env.bat
|
2018-02-07 01:08:37 +00:00
|
|
|
echo - also set other environmental overrides necessary for your build environment
|
2018-02-07 21:33:48 +00:00
|
|
|
echo - run clean_build.bat to build Barrier and verify that it succeeds
|
2018-02-07 01:08:37 +00:00
|
|
|
echo - re-run this script to create the installation package
|
|
|
|
goto done
|
|
|
|
|
|
|
|
:failed
|
|
|
|
echo Build failed
|
|
|
|
|
|
|
|
:done
|
|
|
|
cd /d %savedir%
|