2 Rem This script compiles wxWindows and some samples/demos with
3 Rem a range of compilers.
4 Rem Note that it currently uses batch scripts local to Julian Smart's machine,
5 Rem to set up the environment correctly.
6 Rem This is a 4DOS batch file, though 4DOS dependencies have been kept to
8 Rem Julian Smart, August 12th, 2000
9 Rem TODO: making a Unicode distribution by modifying setup.h programmatically.
10 Rem TODO: check differing setup.h options, again by programmatic modification
15 if not %@INDEX
["%WXDIR%","wxWindows"] == "-1" set FATWXWIN
=%@
PATH[%WXDIR%]wxwind~
1
16 if not %@INDEX
["%WXDIR%","wxWindows"] == "-1" set FULLWXWIN
=%@
PATH[%WXDIR%]wxWindows
18 Rem The following line is for a specific environment -- edit, or comment out
19 Rem Not working in 4NT?
20 Rem if not %@INDEX["%WXDIR%","wx2stable"] == "-1" set FATWXWIN=c:\wx2sta~1\wxwind~1
22 echo Full wxWindows
path is
%FULLWXWIN%, FAT
path is
%FATWXWIN%
23 set BUILDDEST
=%TEMP%\wxWinBuild
24 Rem Only carry on if we haven't specified a single target
29 if "%1" == "vc6" goto dovc6
30 if "%1" == "bc55" goto dobc55
31 if "%1" == "bc50" goto dobc50
32 if "%1" == "ming2952" goto doming2952
33 if "%1" == "cygwin11" goto docygwin11
34 if "%1" == "vc1" goto dovc1
35 if "%1" == "bc16" goto dobc16
39 if not direxist
%BUILDDEST% mkdir /S
%BUILDDEST%
48 cd %WXDIR%\contrib\samples
50 cd %WXDIR%\utils
\tex
2rtf\src
53 echo Starting wxWindows build at
%_TIME
, %_DATE
60 Rem Set up the environment
63 echo *** VC
++ Debug ***
66 nmake
-f makefile.vc cleanall
68 if not direxist
%BUILDDEST%\VC6Debug
mkdir /S
%BUILDDEST%\VC6Debug
69 erase /F
/Y
%BUILDDEST%\VC6Debug
71 nmake
-f makefile.vc clean
73 Rem Make one sample, just to make sure Debug mode is OK
74 cd %WXDIR%\samples\controls
76 copy controls.exe
%BUILDDEST%\VC6Debug
77 nmake
-f makefile.vc clean
80 nmake
-f makefile.vc cleanall
82 echo *** VC
++ Release
***
84 nmake
-f makefile.vc cleanall FINAL
=1
85 nmake
-f makefile.vc FINAL
=1
87 if not direxist
%BUILDDEST%\VC6Release
mkdir /S
%BUILDDEST%\VC6Release
88 erase /F
/Y
%BUILDDEST%\VC6Release
91 nmake
-f makefile.vc clean FINAL
=1
92 nmake
-f makefile.vc FINAL
=1
93 Rem Copy all executables to VC6Release
94 Rem Euch, this is the only way I can think of right now
95 Rem to copy them to the same directory. Daft but...
97 zip16
-r
%TEMP%\temp.zip
*.exe
98 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\VC6Release
99 nmake
-f makefile.vc clean FINAL
=1
102 nmake
-f makefile.vc clean FINAL
=1
103 nmake
-f makefile.vc FINAL
=1
104 Rem Copy all executables to VC6Release
105 erase %TEMP%\temp.zip
106 zip16
-r
%TEMP%\temp.zip
*.exe
107 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\VC6Release
108 nmake
-f makefile.vc clean FINAL
=1
111 cd %WXDIR%\contrib\src\ogl
112 nmake
-f makefile.vc clean FINAL
=1
113 nmake
-f makefile.vc FINAL
=1
114 cd %WXDIR%\contrib\samples\ogl\ogledit
115 nmake
-f makefile.vc clean FINAL
=1
116 nmake
-f makefile.vc FINAL
=1
117 copy *.exe
%BUILDDEST%\VC6Release
118 nmake
-f makefile.vc clean FINAL
=1
119 cd %WXDIR%\contrib\samples\ogl\studio
120 nmake
-f makefile.vc clean FINAL
=1
121 nmake
-f makefile.vc FINAL
=1
122 copy *.exe
%BUILDDEST%\VC6Release
123 nmake
-f makefile.vc clean FINAL
=1
124 cd %WXDIR%\contrib\src\ogl
125 nmake
-f makefile.vc clean FINAL
=1
128 cd %WXDIR%\utils
\tex
2rtf\src
129 nmake
-f makefile.vc clean FINAL
=1
130 nmake
-f makefile.vc FINAL
=1
131 copy *.exe
%BUILDDEST%\VC6Release
132 nmake
-f makefile.vc clean FINAL
=1
137 nmake
-f makefile.vc cleanall FINAL
=1
139 echo *** VC
++ Debug DLL
***
141 nmake
-f makefile.vc cleanall WXMAKINGDLL
=1
142 nmake
-f makefile.vc dll pch
144 if not direxist
%BUILDDEST%\VC6DebugDLL
mkdir /S
%BUILDDEST%\VC6DebugDLL
145 erase /F
/Y
%BUILDDEST%\VC6DebugDLL
147 copy %WXDIR%\lib\
*d.dll
%BUILDDEST%\VC6DebugDLL
149 Rem Make one sample, for a sanity check
151 cd %WXDIR%\samples\controls
152 nmake
-f makefile.vc WXUSINGDLL
=1
153 copy controls.exe
%BUILDDEST%\VC6DebugDLL
154 nmake
-f makefile.vc clean
157 nmake
-f makefile.vc cleanall WXMAKINGDLL
=1
159 echo *** VC
++ Release DLL
***
161 nmake
-f makefile.vc cleanall FINAL
=1 WXMAKINGDLL
=1
162 nmake
-f makefile.vc dll pch FINAL
=1
164 if not direxist
%BUILDDEST%\VC6ReleaseDLL
mkdir /S
%BUILDDEST%\VC6ReleaseDLL
165 erase /F
/Y
%BUILDDEST%\VC6ReleaseDLL
167 copy %WXDIR%\lib\
*.dll
%BUILDDEST%\VC6ReleaseDLL
169 Rem Make one sample, for a sanity check
171 cd %WXDIR%\samples\controls
172 nmake
-f makefile.vc WXUSINGDLL
=1 FINAL
=1
173 copy controls.exe
%BUILDDEST%\VC6ReleaseDLL
174 nmake
-f makefile.vc clean FINAL
=1
177 nmake
-f makefile.vc cleanall WXMAKINGDLL
=1 FINAL
=1
179 if "%CARRYON" == "0" goto end
183 echo === BC
++ 5.5 ===
184 echo ================
188 echo *** WIN32 BC
++ Debug ***
192 make
-f makefile.b32 cleanall
194 if not direxist
%BUILDDEST%\BC55Debug
mkdir /S
%BUILDDEST%\BC55Debug
195 erase /F
/Y
%BUILDDEST%\BC55Debug
197 make
-f makefile.b32 clean
199 Rem Make one sample, just to make sure Debug mode is OK
200 cd %WXDIR%\samples\controls
202 copy controls.exe
%BUILDDEST%\BC55Debug
203 make
-f makefile.b32 clean
206 cd %WXDIR%\contrib\src\ogl
207 make
-f makefile.b32 clean
209 cd %WXDIR%\contrib\samples\ogl\ogledit
210 make
-f makefile.b32 clean
212 copy *.exe
%BUILDDEST%\BC55Debug
213 make
-f makefile.b32 clean
214 cd %WXDIR%\contrib\samples\ogl\studio
215 make
-f makefile.b32 clean
217 copy *.exe
%BUILDDEST%\BC55Debug
218 make
-f makefile.b32 clean
219 cd %WXDIR%\contrib\src\ogl
220 make
-f makefile.b32 clean
223 make
-f makefile.b32 cleanall
227 echo *** WIN32 BC
++ Release
***
229 make
-f makefile.b32 cleanall FINAL
=1
230 make
-f makefile.b32 FINAL
=1
232 if not direxist
%BUILDDEST%\BC55Release
mkdir /S
%BUILDDEST%\BC55Release
233 erase /F
/Y
%BUILDDEST%\BC55Release
236 make
-f makefile.b32 clean FINAL
=1
237 make
-f makefile.b32 FINAL
=1
238 Rem Copy all executables to BC55Release
239 erase %TEMP%\temp.zip
240 zip16
-r
%TEMP%\temp.zip
*.exe
241 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\BC55Release
242 make
-f makefile.b32 clean FINAL
=1
245 make
-f makefile.b32 clean FINAL
=1
246 make
-f makefile.b32 FINAL
=1
247 Rem Copy all executables to BC55Release
248 erase %TEMP%\temp.zip
249 zip16
-r
%TEMP%\temp.zip
*.exe
250 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\BC55Release
251 make
-f makefile.b32 clean FINAL
=1
254 cd %WXDIR%\contrib\src\ogl
255 make
-f makefile.b32 clean FINAL
=1
256 make
-f makefile.b32 FINAL
=1
257 cd %WXDIR%\contrib\samples\ogl\ogledit
258 make
-f makefile.b32 clean FINAL
=1
259 make
-f makefile.b32 FINAL
=1
260 copy *.exe
%BUILDDEST%\BC55Release
261 make
-f makefile.b32 clean FINAL
=1
262 cd %WXDIR%\contrib\samples\ogl\studio
263 make
-f makefile.b32 clean FINAL
=1
264 make
-f makefile.b32 FINAL
=1
265 copy *.exe
%BUILDDEST%\BC55Release
266 make
-f makefile.b32 clean FINAL
=1
267 cd %WXDIR%\contrib\src\ogl
268 make
-f makefile.b32 clean FINAL
=1
271 cd %WXDIR%\utils
\tex
2rtf\src
272 make
-f makefile.b32 clean FINAL
=1
273 make
-f makefile.b32 FINAL
=1
274 copy *.exe
%BUILDDEST%\BC55Release
275 make
-f makefile.b32 clean FINAL
=1
280 make
-f makefile.b32 cleanall FINAL
=1
284 echo *** WIN32 BC
++ Debug DLL
***
286 make
-f makefile.b32 cleanall
287 make
-f makefile.b32 dll
289 if not direxist
%BUILDDEST%\BC55DebugDLL
mkdir /S
%BUILDDEST%\BC55DebugDLL
290 erase /F
/Y
%BUILDDEST%\BC55DebugDLL
292 copy %WXDIR%\lib\
*.dll
%BUILDDEST%\BC55DebugDLL
294 Rem Make one sample, for a sanity check
296 cd %WXDIR%\samples\controls
297 make
-f makefile.b32 WXUSINGDLL
=1
298 copy controls.exe
%BUILDDEST%\BC55DebugDLL
299 make
-f makefile.b32 clean
302 make
-f makefile.b32 cleanall
304 if "%CARRYON" == "0" goto end
306 Rem Skip BC++ 5.0, obsolete
311 echo === BC
++ 5.0 ===
312 echo ================
316 echo *** WIN32 BC
++ Debug ***
320 make
-f makefile.b32 cleanall
322 if not direxist
%BUILDDEST%\BC50Debug
mkdir /S
%BUILDDEST%\BC50Debug
323 erase /F
/Y
%BUILDDEST%\BC50Debug
325 make
-f makefile.b32 clean
327 Rem Make one sample, just to make sure Debug mode is OK
328 cd %WXDIR%\samples\controls
330 copy controls.exe
%BUILDDEST%\BC50Debug
331 make
-f makefile.b32 clean
334 make
-f makefile.b32 cleanall
336 if "%CARRYON" == "0" goto end
341 echo === Cygwin
1.1 ===
342 echo ==================
346 echo *** Cygwin
Debug ***
350 make
-f makefile.g95 cleanall
351 make
-f makefile.g95 FINAL
=1
352 if not direxist
%BUILDDEST%\Cygwin11Release
mkdir /S
%BUILDDEST%\Cygwin11Release
353 erase /F
/Y
%BUILDDEST%\Cygwin11Release
355 make
-f makefile.g95 clean FINAL
=1
357 if not direxist
%BUILDDEST%\Cygwin11Release
mkdir /S
%BUILDDEST%\Cygwin11Release
358 erase /F
/Y
%BUILDDEST%\Cygwin11Release
361 make
-f makefile.g95 clean FINAL
=1
362 make
-f makefile.g95 FINAL
=1
363 Rem Copy all executables to Cygwin11Release
364 erase %TEMP%\temp.zip
365 zip16
-r
%TEMP%\temp.zip
*.exe
366 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\Cygwin11Release
367 make
-f makefile.g95 clean FINAL
=1
370 make
-f makefile.g95 clean FINAL
=1
371 make
-f makefile.g95 FINAL
=1
372 Rem Copy all executables to Cygwin11Release
373 erase %TEMP%\temp.zip
374 zip16
-r
%TEMP%\temp.zip
*.exe
375 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\Cygwin11Release
376 make
-f makefile.g95 clean FINAL
=1
379 cd %WXDIR%\contrib\src\ogl
380 make
-f makefile.g95 clean FINAL
=1
381 make
-f makefile.g95 FINAL
=1
382 cd %WXDIR%\contrib\samples\ogl\ogledit
383 make
-f makefile.g95 clean FINAL
=1
384 make
-f makefile.g95 FINAL
=1
385 copy *.exe
%BUILDDEST%\Cygwin11Release
386 make
-f makefile.g95 clean FINAL
=1
387 cd %WXDIR%\contrib\samples\ogl\studio
388 make
-f makefile.g95 clean FINAL
=1
389 make
-f makefile.g95 FINAL
=1
390 copy *.exe
%BUILDDEST%\Cygwin11Release
391 make
-f makefile.g95 clean FINAL
=1
392 cd %WXDIR%\contrib\src\ogl
393 make
-f makefile.g95 clean FINAL
=1
396 cd %WXDIR%\utils
\tex
2rtf\src
397 make
-f makefile.g95 clean FINAL
=1
398 make
-f makefile.g95 FINAL
=1
399 copy *.exe
%BUILDDEST%\Cygwin11Release
400 make
-f makefile.g95 clean FINAL
=1
402 echo Stripping executables...
403 strip
%BUILDDEST%\Cygwin11Release\
*.exe
408 make
-f makefile.g95 cleanall
410 if "%CARRYON" == "0" goto end
414 echo === Mingw32
2.95.2 ===
415 echo ======================
419 echo *** Cygwin
Debug ***
423 make
-f makefile.g95 cleanall
424 make
-f makefile.g95 FINAL
=1
425 if not direxist
%BUILDDEST%\Ming2952Release
mkdir /S
%BUILDDEST%\Ming2952Release
426 erase /F
/Y
%BUILDDEST%\Ming2952Release
428 make
-f makefile.g95 clean FINAL
=1
430 if not direxist
%BUILDDEST%\Ming2952Release
mkdir /S
%BUILDDEST%\Ming2952Release
431 erase /F
/Y
%BUILDDEST%\Ming2952Release
434 make
-f makefile.g95 clean FINAL
=1
435 make
-f makefile.g95 FINAL
=1
436 Rem Copy all executables to Ming2952Release
437 erase %TEMP%\temp.zip
438 zip16
-r
%TEMP%\temp.zip
*.exe
439 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\Ming2952Release
440 make
-f makefile.g95 clean FINAL
=1
443 make
-f makefile.g95 clean FINAL
=1
444 make
-f makefile.g95 FINAL
=1
445 Rem Copy all executables to Ming2952Release
446 erase %TEMP%\temp.zip
447 zip16
-r
%TEMP%\temp.zip
*.exe
448 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\Ming2952Release
449 make
-f makefile.g95 clean FINAL
=1
452 cd %WXDIR%\contrib\src\ogl
453 make
-f makefile.g95 clean FINAL
=1
454 make
-f makefile.g95 FINAL
=1
455 cd %WXDIR%\contrib\samples\ogl\ogledit
456 make
-f makefile.g95 clean FINAL
=1
457 make
-f makefile.g95 FINAL
=1
458 copy *.exe
%BUILDDEST%\Ming2952Release
459 make
-f makefile.g95 clean FINAL
=1
460 cd %WXDIR%\contrib\samples\ogl\studio
461 make
-f makefile.g95 clean FINAL
=1
462 make
-f makefile.g95 FINAL
=1
463 copy *.exe
%BUILDDEST%\Ming2952Release
464 make
-f makefile.g95 clean FINAL
=1
465 cd %WXDIR%\contrib\src\ogl
466 make
-f makefile.g95 clean FINAL
=1
469 cd %WXDIR%\utils
\tex
2rtf\src
470 make
-f makefile.g95 clean FINAL
=1
471 make
-f makefile.g95 FINAL
=1
472 copy *.exe
%BUILDDEST%\Ming2952Release
473 make
-f makefile.g95 clean FINAL
=1
475 echo Stripping executables...
476 strip
%BUILDDEST%\Ming2952Release\
*.exe
481 make
-f makefile.g95 cleanall
483 if "%CARRYON" == "0" goto end
487 echo === 16-bit VC
++ ===
488 echo ===================
490 Rem Set up the environment
493 Rem Needs full wxWindows path for making libraries
494 set WXWIN
=%FULLWXWIN%
496 echo *** VC
++ Debug ***
499 nmake
-f makefile.dos cleanall
500 nmake
-f makefile.dos
501 if not direxist
%BUILDDEST%\VC1Debug
mkdir /S
%BUILDDEST%\VC1Debug
502 erase /F
/Y
%BUILDDEST%\VC1Debug
504 Rem Make one sample, just to make sure Debug mode is OK
505 cd %WXDIR%\samples\minimal
506 nmake
-f makefile.dos clean
507 Rem Needs FAT wxWindows path for making executables
509 nmake
-f makefile.dos
511 copy minimal.exe
/S
%BUILDDEST%\VC1Debug
512 nmake
-f makefile.dos clean
515 nmake
-f makefile.dos cleanall
517 Rem Needs full wxWindows path for making libraries
518 set WXWIN
=%FULLWXWIN%
520 echo *** VC
++ Release
***
522 nmake
-f makefile.dos cleanall FINAL
=1
523 nmake
-f makefile.dos FINAL
=1
525 if not direxist
%BUILDDEST%\VC1Release
mkdir /S
%BUILDDEST%\VC1Release
526 erase /F
/Y
%BUILDDEST%\VC1Release
528 Rem Make one sample, just to make sure Release mode is OK
529 cd %WXDIR%\samples\minimal
530 nmake
-f makefile.dos clean
531 nmake
-f makefile.dos FINAL
=1
532 Rem Needs FAT wxWindows path for making executables
534 nmake
-f makefile.dos FINAL
=1
535 copy minimal.exe
/S
%BUILDDEST%\VC1Release
536 nmake
-f makefile.dos clean
542 nmake
-f makefile.dos cleanall FINAL
=1
544 if "%CARRYON" == "0" goto end
548 echo === 16-bit BC
++ ===
549 echo ===================
551 Rem Set up the environment
554 echo *** 16-bit BC
++ Debug ***
555 Rem 16-bit BC++ Debug
557 make
-f makefile.bcc cleanall
559 if not direxist
%BUILDDEST%\BC16Debug
mkdir /S
%BUILDDEST%\BC16Debug
560 erase /F
/Y
%BUILDDEST%\BC16Debug
562 Rem Make one sample, just to make sure Debug mode is OK
563 cd %WXDIR%\samples\minimal
564 make
-f makefile.bcc clean
566 copy minimal.exe
/S
%BUILDDEST%\BC16Debug
567 make
-f makefile.bcc clean
570 make
-f makefile.bcc cleanall
572 echo *** 16-bit BC
++ Release
***
574 make
-f makefile.bcc cleanall FINAL
=1
575 make
-f makefile.bcc FINAL
=1
577 if not direxist
%BUILDDEST%\BC16Release
mkdir /S
%BUILDDEST%\BC16Release
578 erase /F
/Y
%BUILDDEST%\BC16Release
580 Rem Make one sample, just to make sure Release mode is OK
581 cd %WXDIR%\samples\minimal
582 make
-f makefile.bcc clean
583 make
-f makefile.bcc FINAL
=1
584 copy minimal.exe
/S
%BUILDDEST%\BC16Release
585 make
-f makefile.bcc clean
590 make
-f makefile.bcc cleanall FINAL
=1
594 echo Finished wxWindows build at
%_TIME
, %_DATE