-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
buildapp.bat
208 lines (166 loc) · 5.87 KB
/
buildapp.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
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
@echo off
rem
rem $Id: BuildApp.bat $
rem
:BUILDAPP
cls
pushd "%~dp0"
set HG_START_DP_BUILDAPP_BAT=%CD%
popd
if /I not "%1" == "/C" goto ROOT
shift
set HG_ROOT=
set HG_HRB=
set HG_MINGW=
set HG_BCC=
set HG_CCOMP=
set LIB_GUI=
set LIB_HRB=
set BIN_HRB=
:ROOT
if not "%HG_ROOT%" == "" goto TEST
set HG_ROOT=%HG_START_DP_BUILDAPP_BAT%
:TEST
if /I "%1" == "HM30" goto TEST_HM30
if /I "%1" == "HM32" goto TEST_HM32
if /I "%1" == "HM3264" goto TEST_HM3264
if /I "%1" == "HM34" goto TEST_HM34
if /I "%1" == "HM3464" goto TEST_HM3464
:DETECT_HM30
if not exist "%HG_ROOT%\BuildApp30.bat" goto DETECT_HM32
if exist "%HG_ROOT%\BuildApp32.bat" goto SYNTAX
if exist "%HG_ROOT%\BuildApp3264.bat" goto SYNTAX
if exist "%HG_ROOT%\BuildApp34.bat" goto SYNTAX
if exist "%HG_ROOT%\BuildApp3464.bat" goto SYNTAX
goto TEST_HM30
:DETECT_HM32
if not exist "%HG_ROOT%\BuildApp32.bat" goto DETECT_HM3264
if exist "%HG_ROOT%\BuildApp3264.bat" goto SYNTAX
if exist "%HG_ROOT%\BuildApp34.bat" goto SYNTAX
if exist "%HG_ROOT%\BuildApp3464.bat" goto SYNTAX
goto TEST_HM32
:DETECT_HM3264
if not exist "%HG_ROOT%\BuildApp3264.bat" goto DETECT_HM34
if exist "%HG_ROOT%\BuildApp34.bat" goto SYNTAX
if exist "%HG_ROOT%\BuildApp3464.bat" goto SYNTAX
goto TEST_HM3264
:DETECT_HM34
if not exist "%HG_ROOT%\BuildApp34.bat" goto DETECT_HM3464
if exist "%HG_ROOT%\BuildApp3464.bat" goto SYNTAX
goto TEST_HM34
:DETECT_HM3464
if exist "%HG_ROOT%\BuildApp3464.bat" goto TEST_HM3464
echo File %HG_ROOT%\BuildApp30.bat not found !!!
echo File %HG_ROOT%\BuildApp32.bat not found !!!
echo File %HG_ROOT%\BuildApp3264.bat not found !!!
echo File %HG_ROOT%\BuildApp34.bat not found !!!
echo File %HG_ROOT%\BuildApp3464.bat not found !!!
echo.
goto END
:SYNTAX
echo Syntax:
echo To build with Harbour 3.0 and MinGW
echo BuildApp [/C] HM30 file [options]
echo To build with Harbour 3.2 and MinGW
echo BuildApp [/C] HM32 file [options]
echo To build with Harbour 3.2 and MinGW, 64 bits
echo BuildApp [/C] HM3264 file [options]
echo To build with Harbour 3.4 and MinGW
echo BuildApp [/C] HM34 file [options]
echo To build with Harbour 3.4 and MinGW, 64 bits
echo BuildApp [/C] HM3464 file [options]
echo.
echo Options:
echo -sl to suppress logging to error.log
echo -nr to avoid run after build
echo -rebuild to force compiling of all sources
echo -trace to see the commands generated by hbmk2
echo -info to see informational messages
echo -gtwin to build a console or mixed mode app
echo -nohbc to build without OOHG.HBC file
echo -norc to build without OOHG resources
echo other hbmk2 options
echo.
goto END
:TEST_HM30
if /I "%1" == "HM30" shift
if exist "%HG_ROOT%\BuildApp30.bat" goto BUILDAPP_HM30
echo File %HG_ROOT%\BuildApp30.bat not found !!!
echo.
goto END
:TEST_HM32
if /I "%1" == "HM32" shift
if exist "%HG_ROOT%\BuildApp32.bat" goto BUILDAPP_HM32
echo File %HG_ROOT%\BuildApp32.bat not found !!!
echo.
goto END
:TEST_HM3264
if /I "%1" == "HM3264" shift
if exist "%HG_ROOT%\BuildApp3264.bat" goto BUILDAPP_HM3264
echo File %HG_ROOT%\BuildApp3264.bat not found !!!
echo.
goto END
:TEST_HM34
if /I "%1" == "HM34" shift
if exist "%HG_ROOT%\BuildApp34.bat" goto BUILDAPP_HM34
echo File %HG_ROOT%\BuildApp34.bat not found !!!
echo.
goto END
:TEST_HM3464
if /I "%1" == "HM3464" shift
if exist "%HG_ROOT%\BuildApp3464.bat" goto BUILDAPP_HM3464
echo File %HG_ROOT%\BuildApp3464.bat not found !!!
echo.
goto END
:BUILDAPP_HM30
if "%HG_HRB%" == "" set HG_HRB=%HG_ROOT%\hb30
if "%HG_MINGW%" == "" set HG_MINGW=%HG_CCOMP%
if "%HG_MINGW%" == "" set HG_MINGW=%HG_HRB%\comp\mingw
set HG_CCOMP=%HG_MINGW%
if "%LIB_GUI%" == "" set LIB_GUI=lib
if "%LIB_HRB%" == "" set LIB_HRB=lib
if "%BIN_HRB%" == "" set BIN_HRB=bin
call "%HG_ROOT%\BuildApp_hbmk2.bat" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto END
:BUILDAPP_HM32
if "%HG_HRB%" == "" set HG_HRB=%HG_ROOT%\hb32
if "%HG_MINGW%" == "" set HG_MINGW=%HG_CCOMP%
if "%HG_MINGW%" == "" set HG_MINGW=%HG_HRB%\comp\mingw
set HG_CCOMP=%HG_MINGW%
if "%LIB_GUI%" == "" set LIB_GUI=lib\hb\mingw
if "%LIB_HRB%" == "" set LIB_HRB=lib\win\mingw
if "%BIN_HRB%" == "" set BIN_HRB=bin
call "%HG_ROOT%\BuildApp_hbmk2.bat" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto END
:BUILDAPP_HM3264
if "%HG_HRB%" == "" set HG_HRB=%HG_ROOT%\hb3264
if "%HG_MINGW%" == "" set HG_MINGW=%HG_CCOMP%
if "%HG_MINGW%" == "" set HG_MINGW=%HG_HRB%\comp\mingw
set HG_CCOMP=%HG_MINGW%
if "%LIB_GUI%" == "" set LIB_GUI=lib\hb\mingw64
if "%LIB_HRB%" == "" set LIB_HRB=lib\win\mingw64
if "%BIN_HRB%" == "" set BIN_HRB=bin
call "%HG_ROOT%\BuildApp_hbmk2.bat" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto END
:BUILDAPP_HM34
if "%HG_HRB%" == "" set HG_HRB=%HG_ROOT%\hb34
if "%HG_MINGW%" == "" set HG_MINGW=%HG_CCOMP%
if "%HG_MINGW%" == "" set HG_MINGW=%HG_HRB%\comp\mingw
set HG_CCOMP=%HG_MINGW%
if "%LIB_GUI%" == "" set LIB_GUI=lib\hb34\mingw
if "%LIB_HRB%" == "" set LIB_HRB=lib\win\clang
if "%BIN_HRB%" == "" set BIN_HRB=bin
call "%HG_ROOT%\BuildApp_hbmk2.bat" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto END
:BUILDAPP_HM3464
if "%HG_HRB%" == "" set HG_HRB=%HG_ROOT%\hb3464
if "%HG_MINGW%" == "" set HG_MINGW=%HG_CCOMP%
if "%HG_MINGW%" == "" set HG_MINGW=%HG_HRB%\comp\mingw
set HG_CCOMP=%HG_MINGW%
if "%LIB_GUI%" == "" set LIB_GUI=lib\hb34\mingw64
if "%LIB_HRB%" == "" set LIB_HRB=lib\win\clang64
if "%BIN_HRB%" == "" set BIN_HRB=bin
call "%HG_ROOT%\BuildApp_hbmk2.bat" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto END
:END
set HG_START_DP_BUILDAPP_BAT=