Repository navigation
Expand file tree
/
Copy pathBuild.bat
More file actions
233 lines (215 loc) · 7.16 KB
/
Copy pathBuild.bat
File metadata and controls
233 lines (215 loc) · 7.16 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
@echo off
setlocal
REM Works out whether this batch was started from Explorer, in which case FROM_EXPLORER is set to 1 instead of 0.
set FROM_EXPLORER=0
echo %cmdcmdline% | find /i "%~nx0" > NUL
if not errorlevel 1 (
REM This batch was started by a program and not from a command prompt window
echo %cmdcmdline% | find /i "call " > NUL
if errorlevel 1 (
REM This batch was started from Explorer and not from another batch or PowerShell script
set FROM_EXPLORER=1
)
)
if "%FROM_EXPLORER%" == "1" (
echo.
echo ###############################################################################
echo Building SVG Editor and Shell Extensions ^(Win32 and Win64^) with Delphi 13 ^(Config=Release^)
echo ###############################################################################
echo.
echo Press ENTER to continue, or close this window to abort...
pause > NUL
)
set BDS=C:\BDS\Studio\37.0
if exist "c:\program files (x86)\embarcadero\studio\37.0" set BDS=c:\program files (x86)\embarcadero\studio\37.0
if not exist "%BDS%\bin\rsvars.bat" (
echo.
echo ERROR: Delphi 13 not found
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to exit...
pause > NUL
)
exit /b 1
)
call "%BDS%\bin\rsvars.bat"
echo.
echo **************************************************************************
echo Building SVGShellExtensions ^(Delphi13/Win64/Release^)
echo **************************************************************************
echo.
msbuild.exe "Source\SVGShellExtensions.dproj" /target:Clean;Build /p:Platform=Win64 /p:config=Release /v:minimal /p:DCC_Hints=false
if errorlevel 1 (
echo.
echo ERROR building SVGShellExtensions ^(Delphi13/Win64/Release^)
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to exit...
pause > NUL
)
exit /b 1
)
echo.
echo **************************************************************************
echo Building SVGShellExtensions32 ^(Delphi13/Win32/Release^)
echo **************************************************************************
echo.
msbuild.exe "Source\SVGShellExtensions32.dproj" /target:Clean;Build /p:Platform=Win32 /p:config=Release /v:minimal /p:DCC_Hints=false
if errorlevel 1 (
echo.
echo ERROR building SVGShellExtensions32 ^(Delphi13/Win32/Release^)
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to exit...
pause > NUL
)
exit /b 1
)
echo.
echo **************************************************************************
echo Building SVGTextEditor ^(Delphi13/Win64/Release^)
echo **************************************************************************
echo.
msbuild.exe "Source\SVGTextEditor.dproj" /target:Clean;Build /p:Platform=Win64 /p:config=Release /v:minimal /p:DCC_Hints=false
if errorlevel 1 (
echo.
echo ERROR building SVGTextEditor ^(Delphi13/Win64/Release^)
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to exit...
pause > NUL
)
exit /b 1
)
echo.
echo **************************************************************************
echo Building SVGTextEditor ^(Delphi13/Win32/Release^)
echo **************************************************************************
echo.
msbuild.exe "Source\SVGTextEditor.dproj" /target:Clean;Build /p:Platform=Win32 /p:config=Release /v:minimal /p:DCC_Hints=false
if errorlevel 1 (
echo.
echo ERROR building SVGTextEditor ^(Delphi13/Win32/Release^)
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to exit...
pause > NUL
)
exit /b 1
)
echo.
echo **************************************************************************
echo Building SVGToPNG ^(Delphi13/Win64/Release^)
echo **************************************************************************
echo.
msbuild.exe "Source\SVGToPNG.dproj" /target:Clean;Build /p:Platform=Win64 /p:config=Release /v:minimal /p:DCC_Hints=false
if errorlevel 1 (
echo.
echo ERROR building SVGToPNG ^(Delphi13/Win64/Release^)
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to exit...
pause > NUL
)
exit /b 1
)
echo.
echo **************************************************************************
echo Building SVGToPNG ^(Delphi13/Win32/Release^)
echo **************************************************************************
echo.
msbuild.exe "Source\SVGToPNG.dproj" /target:Clean;Build /p:Platform=Win32 /p:config=Release /v:minimal /p:DCC_Hints=false
if errorlevel 1 (
echo.
echo ERROR building SVGToPNG ^(Delphi13/Win32/Release^)
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to exit...
pause > NUL
)
exit /b 1
)
echo.
echo Adding the digital signature to: D:\ETHEA\SVGShellExtensions\Bin64\SVGTextEditor.exe
call D:\ETHEA\Certificate\SignFileWithSectico.bat D:\ETHEA\SVGShellExtensions\Bin64\SVGTextEditor.exe
if errorlevel 1 (
echo.
echo ERROR signing: D:\ETHEA\SVGShellExtensions\Bin64\SVGTextEditor.exe
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to continue...
pause > NUL
)
)
echo.
echo Adding the digital signature to: D:\ETHEA\SVGShellExtensions\Bin32\SVGTextEditor.exe
call D:\ETHEA\Certificate\SignFileWithSectico.bat D:\ETHEA\SVGShellExtensions\Bin32\SVGTextEditor.exe
if errorlevel 1 (
echo.
echo ERROR signing: D:\ETHEA\SVGShellExtensions\Bin32\SVGTextEditor.exe
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to continue...
pause > NUL
)
)
echo.
echo Adding the digital signature to: D:\ETHEA\SVGShellExtensions\Bin64\SVGToPNG.exe
call D:\ETHEA\Certificate\SignFileWithSectico.bat D:\ETHEA\SVGShellExtensions\Bin64\SVGToPNG.exe
if errorlevel 1 (
echo.
echo ERROR signing: D:\ETHEA\SVGShellExtensions\Bin64\SVGToPNG.exe
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to continue...
pause > NUL
)
)
echo.
echo Adding the digital signature to: D:\ETHEA\SVGShellExtensions\Bin32\SVGToPNG.exe
call D:\ETHEA\Certificate\SignFileWithSectico.bat D:\ETHEA\SVGShellExtensions\Bin32\SVGToPNG.exe
if errorlevel 1 (
echo.
echo ERROR signing: D:\ETHEA\SVGShellExtensions\Bin32\SVGToPNG.exe
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to continue...
pause > NUL
)
)
echo.
echo **********************************************************************************************
echo Building "D:\ETHEA\SVGShellExtensions\Setup\SVGShellExtensions.iss" with InnoSetup
echo **********************************************************************************************
echo.
"C:\Program Files (x86)\Inno Setup 6\iscc.exe" "D:\ETHEA\SVGShellExtensions\Setup\SVGShellExtensions.iss"
if errorlevel 1 (
echo.
echo ERROR building "D:\ETHEA\SVGShellExtensions\Setup\SVGShellExtensions.iss" with InnoSetup
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to exit...
pause > NUL
)
exit /b 1
)
echo.
echo Adding the digital signature to: D:\ETHEA\SVGShellExtensions\Setup\Output\SVGShellExtensionsSetup.exe
call D:\ETHEA\Certificate\SignFileWithSectico.bat D:\ETHEA\SVGShellExtensions\Setup\Output\SVGShellExtensionsSetup.exe
if errorlevel 1 (
echo.
echo ERROR signing: D:\ETHEA\SVGShellExtensions\Setup\Output\SVGShellExtensionsSetup.exe
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to continue...
pause > NUL
)
)
echo.
echo Done.
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to exit...
pause > NUL
)
exit /b 0