Repository navigation
Expand file tree
/
Copy pathBuild.bat
More file actions
173 lines (159 loc) · 5.4 KB
/
Copy pathBuild.bat
File metadata and controls
173 lines (159 loc) · 5.4 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
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 Markdown 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 MDShellExtensions ^(Delphi13/Win64/Release^)
echo **************************************************************************
echo.
msbuild.exe "Source\MDShellExtensions.dproj" /target:Clean;Build /p:Platform=Win64 /p:config=Release /v:minimal /p:DCC_Hints=false
if errorlevel 1 (
echo.
echo ERROR building MDShellExtensions ^(Delphi13/Win64/Release^)
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to exit...
pause > NUL
)
exit /b 1
)
echo.
echo **************************************************************************
echo Building MDShellExtensions32 ^(Delphi13/Win32/Release^)
echo **************************************************************************
echo.
msbuild.exe "Source\MDShellExtensions32.dproj" /target:Clean;Build /p:Platform=Win32 /p:config=Release /v:minimal /p:DCC_Hints=false
if errorlevel 1 (
echo.
echo ERROR building MDShellExtensions32 ^(Delphi13/Win32/Release^)
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to exit...
pause > NUL
)
exit /b 1
)
echo.
echo **************************************************************************
echo Building MDTextEditor ^(Delphi13/Win64/Release^)
echo **************************************************************************
echo.
msbuild.exe "Source\MDTextEditor.dproj" /target:Clean;Build /p:Platform=Win64 /p:config=Release /v:minimal /p:DCC_Hints=false
if errorlevel 1 (
echo.
echo ERROR building MDTextEditor ^(Delphi13/Win64/Release^)
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to exit...
pause > NUL
)
exit /b 1
)
echo.
echo **************************************************************************
echo Building MDTextEditor ^(Delphi13/Win32/Release^)
echo **************************************************************************
echo.
msbuild.exe "Source\MDTextEditor.dproj" /target:Clean;Build /p:Platform=Win32 /p:config=Release /v:minimal /p:DCC_Hints=false
if errorlevel 1 (
echo.
echo ERROR building MDTextEditor ^(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\MarkDownShellExtensions\Bin64\MDTextEditor.exe
call D:\ETHEA\Certificate\SignFileWithSectico.bat D:\ETHEA\MarkDownShellExtensions\Bin64\MDTextEditor.exe
if errorlevel 1 (
echo.
echo ERROR signing: D:\ETHEA\MarkDownShellExtensions\Bin64\MDTextEditor.exe
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to continue...
pause > NUL
)
)
echo.
echo Adding the digital signature to: D:\ETHEA\MarkDownShellExtensions\Bin32\MDTextEditor.exe
call D:\ETHEA\Certificate\SignFileWithSectico.bat D:\ETHEA\MarkDownShellExtensions\Bin32\MDTextEditor.exe
if errorlevel 1 (
echo.
echo ERROR signing: D:\ETHEA\MarkDownShellExtensions\Bin32\MDTextEditor.exe
if "%FROM_EXPLORER%" == "1" (
echo.
echo Press ENTER to continue...
pause > NUL
)
)
echo.
echo **********************************************************************************************
echo Building "D:\ETHEA\MarkDownShellExtensions\Setup\MDShellExtensions.iss" with InnoSetup
echo **********************************************************************************************
echo.
"C:\Program Files (x86)\Inno Setup 6\iscc.exe" "D:\ETHEA\MarkDownShellExtensions\Setup\MDShellExtensions.iss"
if errorlevel 1 (
echo.
echo ERROR building "D:\ETHEA\MarkDownShellExtensions\Setup\MDShellExtensions.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\MarkDownShellExtensions\Setup\Output\MDShellExtensionsSetup.exe
call D:\ETHEA\Certificate\SignFileWithSectico.bat D:\ETHEA\MarkDownShellExtensions\Setup\Output\MDShellExtensionsSetup.exe
if errorlevel 1 (
echo.
echo ERROR signing: D:\ETHEA\MarkDownShellExtensions\Setup\Output\MDShellExtensionsSetup.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