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\dialoged\src
52 cd %WXDIR%\utils
\tex
2rtf\src
55 echo Starting wxWindows build at
%_TIME
, %_DATE
62 Rem Set up the environment
65 echo *** VC
++ Debug ***
68 nmake
-f makefile.vc cleanall
70 if not direxist
%BUILDDEST%\VC6Debug
mkdir /S
%BUILDDEST%\VC6Debug
71 erase /F
/Y
%BUILDDEST%\VC6Debug
73 nmake
-f makefile.vc clean
75 Rem Make one sample, just to make sure Debug mode is OK
76 cd %WXDIR%\samples\controls
78 copy controls.exe
%BUILDDEST%\VC6Debug
79 nmake
-f makefile.vc clean
82 nmake
-f makefile.vc cleanall
84 echo *** VC
++ Release
***
86 nmake
-f makefile.vc cleanall FINAL
=1
87 nmake
-f makefile.vc FINAL
=1
89 if not direxist
%BUILDDEST%\VC6Release
mkdir /S
%BUILDDEST%\VC6Release
90 erase /F
/Y
%BUILDDEST%\VC6Release
93 nmake
-f makefile.vc clean FINAL
=1
94 nmake
-f makefile.vc FINAL
=1
95 Rem Copy all executables to VC6Release
96 Rem Euch, this is the only way I can think of right now
97 Rem to copy them to the same directory. Daft but...
99 zip16
-r
%TEMP%\temp.zip
*.exe
100 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\VC6Release
101 nmake
-f makefile.vc clean FINAL
=1
104 nmake
-f makefile.vc clean FINAL
=1
105 nmake
-f makefile.vc FINAL
=1
106 Rem Copy all executables to VC6Release
107 erase %TEMP%\temp.zip
108 zip16
-r
%TEMP%\temp.zip
*.exe
109 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\VC6Release
110 nmake
-f makefile.vc clean FINAL
=1
113 cd %WXDIR%\contrib\src\ogl
114 nmake
-f makefile.vc clean FINAL
=1
115 nmake
-f makefile.vc FINAL
=1
116 cd %WXDIR%\contrib\samples\ogl\ogledit
117 nmake
-f makefile.vc clean FINAL
=1
118 nmake
-f makefile.vc FINAL
=1
119 copy *.exe
%BUILDDEST%\VC6Release
120 nmake
-f makefile.vc clean FINAL
=1
121 cd %WXDIR%\contrib\samples\ogl\studio
122 nmake
-f makefile.vc clean FINAL
=1
123 nmake
-f makefile.vc FINAL
=1
124 copy *.exe
%BUILDDEST%\VC6Release
125 nmake
-f makefile.vc clean FINAL
=1
126 cd %WXDIR%\contrib\src\ogl
127 nmake
-f makefile.vc clean FINAL
=1
129 Rem Compile Dialog Editor
130 cd %WXDIR%\utils\dialoged\src
131 nmake
-f makefile.vc clean FINAL
=1
132 nmake
-f makefile.vc FINAL
=1
133 copy *.exe
%BUILDDEST%\VC6Release
134 nmake
-f makefile.vc clean FINAL
=1
137 cd %WXDIR%\utils
\tex
2rtf\src
138 nmake
-f makefile.vc clean FINAL
=1
139 nmake
-f makefile.vc FINAL
=1
140 copy *.exe
%BUILDDEST%\VC6Release
141 nmake
-f makefile.vc clean FINAL
=1
146 nmake
-f makefile.vc cleanall FINAL
=1
148 echo *** VC
++ Debug DLL
***
150 nmake
-f makefile.vc cleanall WXMAKINGDLL
=1
151 nmake
-f makefile.vc dll pch
153 if not direxist
%BUILDDEST%\VC6DebugDLL
mkdir /S
%BUILDDEST%\VC6DebugDLL
154 erase /F
/Y
%BUILDDEST%\VC6DebugDLL
156 copy %WXDIR%\lib\
*d.dll
%BUILDDEST%\VC6DebugDLL
158 Rem Make one sample, for a sanity check
160 cd %WXDIR%\samples\controls
161 nmake
-f makefile.vc WXUSINGDLL
=1
162 copy controls.exe
%BUILDDEST%\VC6DebugDLL
163 nmake
-f makefile.vc clean
166 nmake
-f makefile.vc cleanall WXMAKINGDLL
=1
168 echo *** VC
++ Release DLL
***
170 nmake
-f makefile.vc cleanall FINAL
=1 WXMAKINGDLL
=1
171 nmake
-f makefile.vc dll pch FINAL
=1
173 if not direxist
%BUILDDEST%\VC6ReleaseDLL
mkdir /S
%BUILDDEST%\VC6ReleaseDLL
174 erase /F
/Y
%BUILDDEST%\VC6ReleaseDLL
176 copy %WXDIR%\lib\
*.dll
%BUILDDEST%\VC6ReleaseDLL
178 Rem Make one sample, for a sanity check
180 cd %WXDIR%\samples\controls
181 nmake
-f makefile.vc WXUSINGDLL
=1 FINAL
=1
182 copy controls.exe
%BUILDDEST%\VC6ReleaseDLL
183 nmake
-f makefile.vc clean FINAL
=1
186 nmake
-f makefile.vc cleanall WXMAKINGDLL
=1 FINAL
=1
188 if "%CARRYON" == "0" goto end
192 echo === BC
++ 5.5 ===
193 echo ================
197 echo *** WIN32 BC
++ Debug ***
201 make
-f makefile.b32 cleanall
203 if not direxist
%BUILDDEST%\BC55Debug
mkdir /S
%BUILDDEST%\BC55Debug
204 erase /F
/Y
%BUILDDEST%\BC55Debug
206 make
-f makefile.b32 clean
208 Rem Make one sample, just to make sure Debug mode is OK
209 cd %WXDIR%\samples\controls
211 copy controls.exe
%BUILDDEST%\BC55Debug
212 make
-f makefile.b32 clean
215 cd %WXDIR%\contrib\src\ogl
216 make
-f makefile.b32 clean
218 cd %WXDIR%\contrib\samples\ogl\ogledit
219 make
-f makefile.b32 clean
221 copy *.exe
%BUILDDEST%\BC55Debug
222 make
-f makefile.b32 clean
223 cd %WXDIR%\contrib\samples\ogl\studio
224 make
-f makefile.b32 clean
226 copy *.exe
%BUILDDEST%\BC55Debug
227 make
-f makefile.b32 clean
228 cd %WXDIR%\contrib\src\ogl
229 make
-f makefile.b32 clean
232 make
-f makefile.b32 cleanall
236 echo *** WIN32 BC
++ Release
***
238 make
-f makefile.b32 cleanall FINAL
=1
239 make
-f makefile.b32 FINAL
=1
241 if not direxist
%BUILDDEST%\BC55Release
mkdir /S
%BUILDDEST%\BC55Release
242 erase /F
/Y
%BUILDDEST%\BC55Release
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 make
-f makefile.b32 clean FINAL
=1
255 make
-f makefile.b32 FINAL
=1
256 Rem Copy all executables to BC55Release
257 erase %TEMP%\temp.zip
258 zip16
-r
%TEMP%\temp.zip
*.exe
259 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\BC55Release
260 make
-f makefile.b32 clean FINAL
=1
263 cd %WXDIR%\contrib\src\ogl
264 make
-f makefile.b32 clean FINAL
=1
265 make
-f makefile.b32 FINAL
=1
266 cd %WXDIR%\contrib\samples\ogl\ogledit
267 make
-f makefile.b32 clean FINAL
=1
268 make
-f makefile.b32 FINAL
=1
269 copy *.exe
%BUILDDEST%\BC55Release
270 make
-f makefile.b32 clean FINAL
=1
271 cd %WXDIR%\contrib\samples\ogl\studio
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
276 cd %WXDIR%\contrib\src\ogl
277 make
-f makefile.b32 clean FINAL
=1
279 Rem Compile Dialog Editor
280 cd %WXDIR%\utils\dialoged\src
281 make
-f makefile.b32 clean FINAL
=1
282 make
-f makefile.b32 FINAL
=1
283 copy *.exe
%BUILDDEST%\BC55Release
284 make
-f makefile.b32 clean FINAL
=1
287 cd %WXDIR%\utils
\tex
2rtf\src
288 make
-f makefile.b32 clean FINAL
=1
289 make
-f makefile.b32 FINAL
=1
290 copy *.exe
%BUILDDEST%\BC55Release
291 make
-f makefile.b32 clean FINAL
=1
296 make
-f makefile.b32 cleanall FINAL
=1
300 echo *** WIN32 BC
++ Debug DLL
***
302 make
-f makefile.b32 cleanall
303 make
-f makefile.b32 dll
305 if not direxist
%BUILDDEST%\BC55DebugDLL
mkdir /S
%BUILDDEST%\BC55DebugDLL
306 erase /F
/Y
%BUILDDEST%\BC55DebugDLL
308 copy %WXDIR%\lib\
*.dll
%BUILDDEST%\BC55DebugDLL
310 Rem Make one sample, for a sanity check
312 cd %WXDIR%\samples\controls
313 make
-f makefile.b32 WXUSINGDLL
=1
314 copy controls.exe
%BUILDDEST%\BC55DebugDLL
315 make
-f makefile.b32 clean
318 make
-f makefile.b32 cleanall
320 if "%CARRYON" == "0" goto end
322 Rem Skip BC++ 5.0, obsolete
327 echo === BC
++ 5.0 ===
328 echo ================
332 echo *** WIN32 BC
++ Debug ***
336 make
-f makefile.b32 cleanall
338 if not direxist
%BUILDDEST%\BC50Debug
mkdir /S
%BUILDDEST%\BC50Debug
339 erase /F
/Y
%BUILDDEST%\BC50Debug
341 make
-f makefile.b32 clean
343 Rem Make one sample, just to make sure Debug mode is OK
344 cd %WXDIR%\samples\controls
346 copy controls.exe
%BUILDDEST%\BC50Debug
347 make
-f makefile.b32 clean
350 make
-f makefile.b32 cleanall
352 if "%CARRYON" == "0" goto end
357 echo === Cygwin
1.1 ===
358 echo ==================
362 echo *** Cygwin
Debug ***
366 make
-f makefile.g95 cleanall
367 make
-f makefile.g95 FINAL
=1
368 if not direxist
%BUILDDEST%\Cygwin11Release
mkdir /S
%BUILDDEST%\Cygwin11Release
369 erase /F
/Y
%BUILDDEST%\Cygwin11Release
371 make
-f makefile.g95 clean FINAL
=1
373 if not direxist
%BUILDDEST%\Cygwin11Release
mkdir /S
%BUILDDEST%\Cygwin11Release
374 erase /F
/Y
%BUILDDEST%\Cygwin11Release
377 make
-f makefile.g95 clean FINAL
=1
378 make
-f makefile.g95 FINAL
=1
379 Rem Copy all executables to Cygwin11Release
380 erase %TEMP%\temp.zip
381 zip16
-r
%TEMP%\temp.zip
*.exe
382 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\Cygwin11Release
383 make
-f makefile.g95 clean FINAL
=1
386 make
-f makefile.g95 clean FINAL
=1
387 make
-f makefile.g95 FINAL
=1
388 Rem Copy all executables to Cygwin11Release
389 erase %TEMP%\temp.zip
390 zip16
-r
%TEMP%\temp.zip
*.exe
391 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\Cygwin11Release
392 make
-f makefile.g95 clean FINAL
=1
395 cd %WXDIR%\contrib\src\ogl
396 make
-f makefile.g95 clean FINAL
=1
397 make
-f makefile.g95 FINAL
=1
398 cd %WXDIR%\contrib\samples\ogl\ogledit
399 make
-f makefile.g95 clean FINAL
=1
400 make
-f makefile.g95 FINAL
=1
401 copy *.exe
%BUILDDEST%\Cygwin11Release
402 make
-f makefile.g95 clean FINAL
=1
403 cd %WXDIR%\contrib\samples\ogl\studio
404 make
-f makefile.g95 clean FINAL
=1
405 make
-f makefile.g95 FINAL
=1
406 copy *.exe
%BUILDDEST%\Cygwin11Release
407 make
-f makefile.g95 clean FINAL
=1
408 cd %WXDIR%\contrib\src\ogl
409 make
-f makefile.g95 clean FINAL
=1
411 Rem Compile Dialog Editor
412 cd %WXDIR%\utils\dialoged\src
413 make
-f makefile.g95 clean FINAL
=1
414 make
-f makefile.g95 FINAL
=1
415 copy *.exe
%BUILDDEST%\Cygwin11Release
416 make
-f makefile.g95 clean FINAL
=1
419 cd %WXDIR%\utils
\tex
2rtf\src
420 make
-f makefile.g95 clean FINAL
=1
421 make
-f makefile.g95 FINAL
=1
422 copy *.exe
%BUILDDEST%\Cygwin11Release
423 make
-f makefile.g95 clean FINAL
=1
425 echo Stripping executables...
426 strip
%BUILDDEST%\Cygwin11Release\
*.exe
431 make
-f makefile.g95 cleanall
433 if "%CARRYON" == "0" goto end
437 echo === Mingw32
2.95.2 ===
438 echo ======================
442 echo *** Cygwin
Debug ***
446 make
-f makefile.g95 cleanall
447 make
-f makefile.g95 FINAL
=1
448 if not direxist
%BUILDDEST%\Ming2952Release
mkdir /S
%BUILDDEST%\Ming2952Release
449 erase /F
/Y
%BUILDDEST%\Ming2952Release
451 make
-f makefile.g95 clean FINAL
=1
453 if not direxist
%BUILDDEST%\Ming2952Release
mkdir /S
%BUILDDEST%\Ming2952Release
454 erase /F
/Y
%BUILDDEST%\Ming2952Release
457 make
-f makefile.g95 clean FINAL
=1
458 make
-f makefile.g95 FINAL
=1
459 Rem Copy all executables to Ming2952Release
460 erase %TEMP%\temp.zip
461 zip16
-r
%TEMP%\temp.zip
*.exe
462 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\Ming2952Release
463 make
-f makefile.g95 clean FINAL
=1
466 make
-f makefile.g95 clean FINAL
=1
467 make
-f makefile.g95 FINAL
=1
468 Rem Copy all executables to Ming2952Release
469 erase %TEMP%\temp.zip
470 zip16
-r
%TEMP%\temp.zip
*.exe
471 unzip32
-o
%TEMP%\temp.zip
-d
%BUILDDEST%\Ming2952Release
472 make
-f makefile.g95 clean FINAL
=1
475 cd %WXDIR%\contrib\src\ogl
476 make
-f makefile.g95 clean FINAL
=1
477 make
-f makefile.g95 FINAL
=1
478 cd %WXDIR%\contrib\samples\ogl\ogledit
479 make
-f makefile.g95 clean FINAL
=1
480 make
-f makefile.g95 FINAL
=1
481 copy *.exe
%BUILDDEST%\Ming2952Release
482 make
-f makefile.g95 clean FINAL
=1
483 cd %WXDIR%\contrib\samples\ogl\studio
484 make
-f makefile.g95 clean FINAL
=1
485 make
-f makefile.g95 FINAL
=1
486 copy *.exe
%BUILDDEST%\Ming2952Release
487 make
-f makefile.g95 clean FINAL
=1
488 cd %WXDIR%\contrib\src\ogl
489 make
-f makefile.g95 clean FINAL
=1
491 Rem Compile Dialog Editor
492 cd %WXDIR%\utils\dialoged\src
493 make
-f makefile.g95 clean FINAL
=1
494 make
-f makefile.g95 FINAL
=1
495 copy *.exe
%BUILDDEST%\Ming2952Release
496 make
-f makefile.g95 clean FINAL
=1
499 cd %WXDIR%\utils
\tex
2rtf\src
500 make
-f makefile.g95 clean FINAL
=1
501 make
-f makefile.g95 FINAL
=1
502 copy *.exe
%BUILDDEST%\Ming2952Release
503 make
-f makefile.g95 clean FINAL
=1
505 echo Stripping executables...
506 strip
%BUILDDEST%\Ming2952Release\
*.exe
511 make
-f makefile.g95 cleanall
513 if "%CARRYON" == "0" goto end
517 echo === 16-bit VC
++ ===
518 echo ===================
520 Rem Set up the environment
523 Rem Needs full wxWindows path for making libraries
524 set WXWIN
=%FULLWXWIN%
526 echo *** VC
++ Debug ***
529 nmake
-f makefile.dos cleanall
530 nmake
-f makefile.dos
531 if not direxist
%BUILDDEST%\VC1Debug
mkdir /S
%BUILDDEST%\VC1Debug
532 erase /F
/Y
%BUILDDEST%\VC1Debug
534 Rem Make one sample, just to make sure Debug mode is OK
535 cd %WXDIR%\samples\minimal
536 nmake
-f makefile.dos clean
537 Rem Needs FAT wxWindows path for making executables
539 nmake
-f makefile.dos
541 copy minimal.exe
/S
%BUILDDEST%\VC1Debug
542 nmake
-f makefile.dos clean
545 nmake
-f makefile.dos cleanall
547 Rem Needs full wxWindows path for making libraries
548 set WXWIN
=%FULLWXWIN%
550 echo *** VC
++ Release
***
552 nmake
-f makefile.dos cleanall FINAL
=1
553 nmake
-f makefile.dos FINAL
=1
555 if not direxist
%BUILDDEST%\VC1Release
mkdir /S
%BUILDDEST%\VC1Release
556 erase /F
/Y
%BUILDDEST%\VC1Release
558 Rem Make one sample, just to make sure Release mode is OK
559 cd %WXDIR%\samples\minimal
560 nmake
-f makefile.dos clean
561 nmake
-f makefile.dos FINAL
=1
562 Rem Needs FAT wxWindows path for making executables
564 nmake
-f makefile.dos FINAL
=1
565 copy minimal.exe
/S
%BUILDDEST%\VC1Release
566 nmake
-f makefile.dos clean
572 nmake
-f makefile.dos cleanall FINAL
=1
574 if "%CARRYON" == "0" goto end
578 echo === 16-bit BC
++ ===
579 echo ===================
581 Rem Set up the environment
584 echo *** 16-bit BC
++ Debug ***
585 Rem 16-bit BC++ Debug
587 make
-f makefile.bcc cleanall
589 if not direxist
%BUILDDEST%\BC16Debug
mkdir /S
%BUILDDEST%\BC16Debug
590 erase /F
/Y
%BUILDDEST%\BC16Debug
592 Rem Make one sample, just to make sure Debug mode is OK
593 cd %WXDIR%\samples\minimal
594 make
-f makefile.bcc clean
596 copy minimal.exe
/S
%BUILDDEST%\BC16Debug
597 make
-f makefile.bcc clean
600 make
-f makefile.bcc cleanall
602 echo *** 16-bit BC
++ Release
***
604 make
-f makefile.bcc cleanall FINAL
=1
605 make
-f makefile.bcc FINAL
=1
607 if not direxist
%BUILDDEST%\BC16Release
mkdir /S
%BUILDDEST%\BC16Release
608 erase /F
/Y
%BUILDDEST%\BC16Release
610 Rem Make one sample, just to make sure Release mode is OK
611 cd %WXDIR%\samples\minimal
612 make
-f makefile.bcc clean
613 make
-f makefile.bcc FINAL
=1
614 copy minimal.exe
/S
%BUILDDEST%\BC16Release
615 make
-f makefile.bcc clean
620 make
-f makefile.bcc cleanall FINAL
=1
624 echo Finished wxWindows build at
%_TIME
, %_DATE