-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCompile_Setup.bat
80 lines (60 loc) · 1.52 KB
/
Compile_Setup.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
@echo off
setLocal EnableDelayedExpansion
cls
set innoSetupCompile=C:\Program Files (x86)\Inno Setup 5\ISCC.exe
set remoteScriptsInnoSetupScript=%~dp0MainScript\RemoteScripts.iss
set workingDir=%~dp0
set installerOutputDir=%workingDir%Output
if not exist "%innoSetupCompile%" (
echo Error
echo InnoSetup compiler does not exist at:
echo "%innoSetupCompile%"
echo.
echo Aborting...
pause
exit 1
)
if not exist "%remoteScriptsInnoSetupScript%" (
echo Error
echo Remote Script Inno-Setup script does not exist at:
echo "%remoteScriptsInnoSetupScript%"
echo.
echo Aborting...
pause
exit 1
)
echo.
echo Going to compile RemoteScriptsDavid installer.
echo When compiling is done, output installer file will be available at:
echo.
echo %installerOutputDir%
echo.
CHOICE /C YN /M "Do you want to continue?"
rem 1 = Y
rem 2 = N
if %errorlevel% equ 2 exit 0
echo Compiling RemoteScriptsDavid installer
echo.
ping 127.0.0.1 -n 1 > nul
"%innoSetupCompile%" "%remoteScriptsInnoSetupScript%" /DCMD_PARAM_SRC_COMPILE_DIR="%workingDir%" /DCMD_PARAM_COMPILED_INSTALLATION_FILE_OUTPUT_DIR="%installerOutputDir%"
echo.
if %errorlevel% gtr 0 (
echo Error
echo InnoSetup compilation error. See output.
echo.
pause
exit 1
)
echo Compilation is successful
echo.
if exist "%installerOutputDir%\RemoteScriptsDavid_Install.exe" (
CHOICE /C YN /M "Do you want to run the compiled setup file now?"
rem 1 = Y
rem 2 = N
if !errorlevel! equ 1 (
start /D "%installerOutputDir%" RemoteScriptsDavid_Install.exe
)
) else (
pause
)
exit 0