-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build_Installer.bat
43 lines (33 loc) · 1019 Bytes
/
Build_Installer.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
::Boilderplate
::@ECHO OFF
SETLOCAL ENABLEEXTENSIONS
::detect if invoked via Window Explorer
SET interactive=1
ECHO %CMDCMDLINE% | FIND /I "/c" >NUL 2>&1
IF %ERRORLEVEL% == 0 SET interactive=0
::name of this script
SET me=%~n0
::directory of script
SET parent=%~dp0
::::::::::::::::::
CALL %parent%/Build_Release.cmd
IF /I "%ERRORLEVEL%" NEQ "0" (
ECHO build failed
IF "%interactive%"=="0" PAUSE
EXIT /B 1
)
SET innoSetupPath="%localappdata%\Programs\Inno Setup 6\ISCC.exe"
IF NOT EXIST %innoSetupPath% (
SET innoSetupPath="%ProgramFiles(x86)%\Inno Setup 6\ISCC.exe")
IF NOT EXIST %innoSetupPath% (
ECHO "inno setup not found"
IF "%interactive%"=="0" PAUSE
EXIT /B 1)
IF NOT DEFINED dateCode (SET dateCode=%date:~10,4%_%date:~4,2%_%date:~7,2%)
IF NOT DEFINED artifactsDir (SET artifactsDir=./Artifacts/%dateCode%/)
%innoSetupPath% /dAPP_VERSION=%appVer% /O"%artifactsDir%" "./CruiseDesign.iss"
::End Boilderplate
::if invoked from windows explorer, pause
IF "%interactive%"=="0" PAUSE
ENDLOCAL
EXIT /B 0