-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathbuild-ce.bat
More file actions
173 lines (148 loc) · 5.05 KB
/
build-ce.bat
File metadata and controls
173 lines (148 loc) · 5.05 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
@echo off
rem Inno Setup
rem Copyright (C) 1997-2026 Jordan Russell
rem Portions by Martijn Laan
rem For conditions of distribution and use, see LICENSE.TXT.
rem
rem Batch file to prepare a release of 64-bit Inno Setup
rem
rem Calls setup-sign.bat if it exists to create a signed build, otherwise creates setup.exe without signing
rem Signed builds also require a setup-presign.bat to exist which should sign all files passed to it
rem
rem This batch files does the following things:
rem -Ask the user to compile Inno Setup including ISSigTool and ISHelpGen after clearing output first
rem -Compile ISetup*.chm
rem -Run the unit tests
rem -Create 64-bit Inno Setup installer
rem
rem Once done the installer can be found in Output
setlocal
set VER=7.0.0-dev
echo Building Inno Setup %VER%...
echo.
cd /d %~dp0
if /I "%1"=="setup" goto setup
if not "%1"=="" goto failed
if not exist files\issigtool.exe (
echo Missing ISSigTool
echo Now open Projects\Projects.groupproj and build the ISSigTool project and its Win64 target in Release mode
echo - Waiting for file...
call :waitforfile files\issigtool.exe
echo Compiling ISSigTool done
)
rem Verify precompiled binaries which are used during compilation
rem Note: Other precompiled binaries are verified by Setup.iss
call .\issig.bat verify --key-file=def01.ispublickey ^
Projects\Src\Compression.LZMADecompressor\Lzma2Decode\ISLzmaDec-x86.obj ^
Projects\Src\Compression.LZMADecompressor\Lzma2Decode\ISLzmaDec-x64.obj ^
Projects\Src\Compression.LZMA1SmallDecompressor\LzmaDecode\LzmaDecodeInno-x86.obj ^
Projects\Src\Compression.LZMA1SmallDecompressor\LzmaDecode\LzmaDecodeInno-x64.obj ^
Projects\Src\Compression.SevenZipDecoder\7zDecode\IS7zDec-x86.obj ^
Projects\Src\Compression.SevenZipDecoder\7zDecode\IS7zDec-x64.obj
if errorlevel 1 goto failed
echo ISSigTool verify done
rem Embed user's public key into sources
call .\issig.bat embed
if errorlevel 1 goto failed
echo ISSigTool embed done
if not exist files\ishelpgen.exe (
echo Missing ISHelpGen
echo Now open Projects\Projects.groupproj and build the ISHelpGen project and its Win64 target in Release mode
echo - Waiting for file...
call :waitforfile files\ishelpgen.exe
echo Compiling ISHelpGen done
)
cd ishelp
if errorlevel 1 goto failed
call .\compile.bat
if errorlevel 1 goto failed
cd ..
if errorlevel 1 goto failed
echo Compiling ISetup*.chm done
pause
echo.
call :deletefile files\iside.exe
call :deletefile files\iscc.exe
call :deletefile files\iscmplr.dll
call :deletefile files\ispp.dll
call :deletefile files\setup.e32
call :deletefile files\setup.e64
call :deletefile files\setupcustomstyle.e32
call :deletefile files\setupcustomstyle.e64
call :deletefile files\setupldr.e32
call :deletefile files\setupldr.e64
call :deletefile files\issigtool.exe
call :deletefile files\istesttool.exe
call :deletefile ishelp\ishelpgen\ishelpgen.exe
echo Clearing compilation output done
echo Now open Projects\Projects.groupproj and build the Release64 build group
echo You can open the Build Groups pane from the Projects tool window
echo - Waiting for files...
call :waitforfile files\iside.exe
call :waitforfile files\iscc.exe
call :waitforfile files\iscmplr.dll
call :waitforfile files\ispp.dll
call :waitforfile files\setup.e32
call :waitforfile files\setup.e64
call :waitforfile files\setupcustomstyle.e32
call :waitforfile files\setupcustomstyle.e64
call :waitforfile files\setupldr.e32
call :waitforfile files\setupldr.e64
call :waitforfile files\issigtool.exe
call :waitforfile files\istesttool.exe
call :waitforfile ishelp\ishelpgen\ishelpgen.exe
echo Found all, waiting 2 seconds more...
timeout /t 2 /nobreak >nul
echo Compiling Inno Setup done
Files\ISTestTool.exe
if errorlevel 1 goto failed
echo Testing Inno Setup done
if exist .\setup-presign.bat (
echo - Presigning
call .\setup-presign.bat Files\ISCC.exe Files\ISCmplr.dll Files\ISPP.dll
if errorlevel 1 goto failed
echo Presign done
)
rem Sign using user's private key - also see compile.bat
call .\issig.bat sign Files\ISCmplr.dll Files\ISPP.dll Files\Setup.e32 Files\Setup.e64 Files\SetupCustomStyle.e32 Files\SetupCustomStyle.e64 Files\SetupLdr.e32 Files\SetupLdr.e64
if errorlevel 1 goto failed
echo ISSigTool sign done
:setup
echo - Setup.exe
if exist .\setup-sign.bat (
call .\setup-sign.bat /Dx64
) else (
files\iscc setup.iss /Dx64
)
if errorlevel 1 goto failed
echo - Renaming files
cd output
if errorlevel 1 goto failed
move /y mysetup.exe innosetup-%VER%.exe
if errorlevel 1 goto failed
cd ..
if errorlevel 1 goto failed
echo Creating Inno Setup installer done
call .\issig.bat sign output\innosetup-%VER%.exe
if errorlevel 1 goto failed
echo All done!
pause
exit /b 0
:failed
echo *** FAILED ***
pause
exit /b 1
:deletefile
if exist "%~1" (
del "%~1"
if exist "%~1" goto failed
echo Cleared %~1
)
exit /b
:waitforfile
if not exist "%~1" (
timeout /t 1 /nobreak >nul
goto waitforfile
)
echo Found %~1
exit /b