]> git.saurik.com Git - wxWidgets.git/blob - distrib/scripts/msw/makesetup.sh
Make the picker headers accessible to all
[wxWidgets.git] / distrib / scripts / msw / makesetup.sh
1 #!/bin/sh
2
3 # Make a distribution of an application on MSW.
4 # Example:
5 # ../distrib/msw/makesetup.sh --wxmsw --verbose &> log
6
7 # If your zip accepts Cygwin-style paths, then
8 # use cygpath, else substitute echo
9 CYGPATHPROG=cygpath
10 #CYGPATHPROG=echo
11
12 INNO=1
13 SPINMSW=0
14 SPINOS2=0
15 SPINDOCS=0
16 SPINALL=0
17 SPINWXALL=0
18 SPINBASE=0
19 GETMAKEFILES=0
20 VERBOSE=0
21 ZIPFLAGS=
22
23 PROGNAME=$0
24 SCRIPTDIR=$WXWIN/distrib/scripts
25 . $SCRIPTDIR/msw/setup.var
26 . $SCRIPTDIR/utils.inc
27
28 MANIFESTDIR=$SCRIPTDIR/manifests
29 WEBFILES=c:/wx2dev/wxWebSite
30 if [ ! "$CYGPATH" = "" ]; then
31 WEBFILES=`$CYGPATH "$WEBFILES"`
32 fi
33
34 # Set this to the required version
35 if [ "$VERSION" = "" ]; then
36 VERSION=2.6.2
37 fi
38
39 getfilelist(){
40 port=$1
41 outfile=$2
42
43 filelist="base.rsp"
44 contribfiles="stc.rsp contrib.rsp ogl.rsp"
45 utilsfiles="tex2rtf.rsp utils.rsp utilmake.rsp"
46 commonfiles="generic.rsp jpeg.rsp tiff.rsp xml.rsp deprecated.rsp makefile.rsp $utilsfiles $contribfiles"
47
48 if [ ! $port = "base" ]; then
49 filelist="$filelist $commonfiles"
50 fi
51
52 if [ $port = "msw" ] || [ $port = "all" ]; then
53 filelist="$filelist msw.rsp univ.rsp vc.rsp mmedia.rsp wince.rsp palmos.rsp dmc.rsp"
54 fi
55
56 if [ $port = "os2" ] || [ $port = "all" ]; then
57 filelist="$filelist os2.rsp"
58 fi
59
60 if [ $port = "all" ]; then
61 filelist="$filelist x11.rsp gtk.rsp cocoa.rsp motif.rsp mac.rsp mgl.rsp"
62 fi
63
64 tempfile="/tmp/wx$port.files.in"
65 rm -f $tempfile
66 rm -f $outfile
67
68 olddir=$PWD
69 cd $MANIFESTDIR
70
71 cat $filelist > $tempfile
72
73 cd $APPDIR
74 expandlines $tempfile $outfile
75
76 cd $olddir
77 }
78
79 doreplace()
80 {
81 thefile=$1
82 theexpr=$2
83
84 if [ -f $thefile ]; then
85 sed -e "$theexpr" < $thefile > $thefile.tmp
86 mv $thefile.tmp $thefile
87 else
88 echo "*** $thefile not found."
89 fi
90 }
91
92 unix2dosname()
93 {
94 echo $1 | sed -e "s/\//\\\\\\\/g" > /tmp/filename.tmp
95 RETVALUE=`cat /tmp/filename.tmp`
96 rm -f /tmp/filename.tmp
97 }
98
99 unix2dosname2()
100 {
101 echo $1 | sed -e "s/\//\\\\/g" > /tmp/filename.tmp
102 RETVALUE=`cat /tmp/filename.tmp`
103 rm -f /tmp/filename.tmp
104 }
105
106 doinit()
107 {
108 if [ "$VERBOSE" != "1" ]; then
109 ZIPFLAGS=-q
110 fi
111 }
112
113 rearchive()
114 {
115 archive=$1
116 dirname=$2
117 changeto=$3
118
119 echo Re-archiving $archive as $dirname
120
121 pushd $changeto
122
123 if [ -d $dirname ]; then
124 rm -f -r $dirname
125 fi
126 mkdir $dirname
127 cd $dirname
128 unzip $ZIPFLAGS ../$archive
129 cd ..
130 rm -f $archive
131 zip $ZIPFLAGS -r $archive $dirname/*
132
133 popd
134 }
135
136 rearchivetar()
137 {
138 archive=$1
139 dirname=$2
140 changeto=$3
141
142 echo Re-tarring $archive as $dirname
143
144 pushd $changeto
145
146 if [ -d $dirname ]; then
147 rm -f -r $dirname
148 fi
149 mkdir $dirname
150 cd $dirname
151 tar xfz ../$archive
152 cd ..
153 rm -f $archive
154 tar cfz $archive $dirname/*
155
156 popd
157 }
158
159 # Find the version from wx/version.h
160 # Not yet used
161 findversion()
162 {
163 echo "#include <stdio.h>" > /tmp/appver.c
164 echo "#include \"$VERSIONSYMBOLFILE\"" >> /tmp/appver.c
165 echo "int main() { printf(\"%.2f\", $VERSIONSYMBOL); }" >> /tmp/appver.c
166 gcc /tmp/appver.c -I$APPDIR -o /tmp/appver
167 VERSION=`/tmp/appver`
168 rm -f /tmp/appver /tmp/appver.c
169 }
170
171 dospinos2()
172 {
173 echo Zipping OS/2...
174
175 cd $APPDIR
176 getfilelist "os2" /tmp/os2files
177
178 # Zip up the complete wxOS2-xxx.zip file
179 zip $ZIPFLAGS -@ $DESTDIR/wxOS2-$VERSION.zip < /tmp/os2files
180
181 # Rearchive under wxWidgets-$VERSION
182 if [ -d $DESTDIR/wxWidgets-$VERSION ]; then
183 rm -f -r $DESTDIR/wxWidgets-$VERSION
184 fi
185
186 mkdir $DESTDIR/wxWidgets-$VERSION
187 cd $DESTDIR/wxWidgets-$VERSION
188 unzip $ZIPFLAGS ../wxOS2-$VERSION.zip
189
190 echo Copying readme files...
191 cp $APPDIR/docs/os2/install.txt INSTALL-OS2.txt
192
193 cd $DESTDIR
194
195 rm -f wxOS2-$VERSION.zip
196 zip $ZIPFLAGS -r wxOS2-$VERSION.zip wxWidgets-$VERSION/*
197 }
198
199 dospinmsw()
200 {
201 echo Zipping wxMSW...
202
203 cd $APPDIR
204
205 # now expand the wildcards to actual file names
206 getfilelist "msw" /tmp/mswfiles
207
208 # Create wxWidgets-$VERSION-win.zip which is used to create wxMSW
209 echo Zipping individual components
210 rm -f $DESTDIR/wxWidgets-$VERSION-win.zip
211 zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-win.zip < /tmp/mswfiles
212 }
213
214 dospinwxall()
215 {
216 echo Zipping wxAll...
217 cd $APPDIR
218
219 echo Zipping individual components
220 rm -f $DESTDIR/wxWidgets-$VERSION-all.zip
221
222 # Save adding all the wxMSW files again
223 if [ ! -f $DESTDIR/wxWidgets-$VERSION-win.zip ]; then
224 dospinmsw
225 fi
226 cp $DESTDIR/wxWidgets-$VERSION-win.zip $DESTDIR/wxWidgets-$VERSION-all.zip
227
228 cat $MANIFESTDIR/cw_mac.rsp $MANIFESTDIR/vc.rsp $MANIFESTDIR/x11.rsp $MANIFESTDIR/gtk.rsp $MANIFESTDIR/cocoa.rsp $MANIFESTDIR/motif.rsp $MANIFESTDIR/mac.rsp $MANIFESTDIR/mgl.rsp $MANIFESTDIR/os2.rsp $MANIFESTDIR/palmos.rsp | sort | uniq > /tmp/all.txt
229 zip $ZIPFLAGS -@ -u $DESTDIR/wxWidgets-$VERSION-all.zip < /tmp/all.txt
230
231 if [ -d $DESTDIR/wxWidgets-$VERSION ]; then
232 rm -f -r $DESTDIR/wxWidgets-$VERSION
233 fi
234
235 mkdir $DESTDIR/wxWidgets-$VERSION
236 cd $DESTDIR/wxWidgets-$VERSION
237 unzip $ZIPFLAGS ../wxWidgets-$VERSION-all.zip
238
239 cd $DESTDIR
240
241 rm -f $DESTDIR/wxWidgets-$VERSION-all.zip
242 zip $ZIPFLAGS -r wxWidgets-$VERSION.zip wxWidgets-$VERSION/*
243 }
244
245 dospinbase()
246 {
247 cd $APPDIR
248
249 echo Zipping wxBase...
250 rm -f $DESTDIR/wxBase-$VERSION.zip
251 expandlines $MANIFESTDIR/base.rsp /tmp/basefiles
252 zip $ZIPFLAGS -@ $DESTDIR/wxBase-$VERSION.zip < /tmp/basefiles
253
254 if [ -d $DESTDIR/wxWidgets-$VERSION ]; then
255 rm -f -r $DESTDIR/wxWidgets-$VERSION
256 fi
257
258 mkdir $DESTDIR/wxWidgets-$VERSION
259 cd $DESTDIR/wxWidgets-$VERSION
260 unzip $ZIPFLAGS ../wxBase-$VERSION.zip
261
262 echo Copying readme files...
263 cp $APPDIR/docs/base/readme.txt README.txt
264
265 cd $DESTDIR
266
267 rm -f wxBase-$VERSION.zip
268 zip $ZIPFLAGS -r wxBase-$VERSION.zip wxWidgets-$VERSION/*
269 }
270
271 dospindocs()
272 {
273 cd $APPDIR
274
275 echo Creating $DESTDIR/wxWidgets-$VERSION-DocSource.zip
276 expandlines $MANIFESTDIR/docsrc.rsp /tmp/docsources
277 zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-DocSource.zip < /tmp/docsources
278 rearchive wxWidgets-$VERSION-DocSource.zip wxWidgets-$VERSION $DESTDIR
279
280 echo Creating $DESTDIR/wxWidgets-$VERSION-WinHelp.zip
281 expandlines $MANIFESTDIR/wx_hlp.rsp /tmp/winhelp
282 zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-WinHelp.zip < /tmp/winhelp
283 rearchive wxWidgets-$VERSION-WinHelp.zip wxWidgets-$VERSION $DESTDIR
284
285 echo Creating $DESTDIR/wxWidgets-$VERSION-HTML.zip
286 expandlines $MANIFESTDIR/wx_html.rsp /tmp/htmldocs
287 zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-HTML.zip < /tmp/htmldocs
288 rearchive wxWidgets-$VERSION-HTML.zip wxWidgets-$VERSION $DESTDIR
289
290 echo Creating $DESTDIR/wxWidgets-$VERSION-PDF.zip
291 expandlines $MANIFESTDIR/wx_pdf.rsp /tmp/pdfdocs
292 zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-PDF.zip < /tmp/pdfdocs
293 rearchive wxWidgets-$VERSION-PDF.zip wxWidgets-$VERSION $DESTDIR
294
295 echo Creating $DESTDIR/wxWidgets-$VERSION-PDF.tar.gz
296 tar zcf /c/wx2dev/wxWindows/deliver/wxWidgets-$VERSION-PDF.tar.gz docs/pdf/*.pdf
297 rearchivetar wxWidgets-$VERSION-PDF.tar.gz wxWidgets-$VERSION /c/wx2dev/wxWindows/deliver
298
299 echo Creating $DESTDIR/wxWidgets-$VERSION-HTB.zip
300 expandlines $MANIFESTDIR/wx_htb.rsp /tmp/htbdocs
301 zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-HTB.zip < /tmp/htbdocs
302 rearchive wxWidgets-$VERSION-HTB.zip wxWidgets-$VERSION $DESTDIR
303
304 echo Creating $DESTDIR/wxWidgets-$VERSION-HTMLHelp.zip
305 expandlines $MANIFESTDIR/wx_chm.rsp /tmp/chmdocs
306 zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-HTMLHelp.zip < /tmp/chmdocs
307 rearchive wxWidgets-$VERSION-HTMLHelp.zip wxWidgets-$VERSION $DESTDIR
308
309 # Add Linuxy docs to a separate archive to be transported to Linux for the
310 # Linux-based releases
311 echo Creating $DESTDIR/wxWidgets-$VERSION-LinuxDocs.zip
312
313 cat $MANIFESTDIR/wx_html.rsp $MANIFESTDIR/wx_pdf.rsp $MANIFESTDIR/wx_htb.rsp > /tmp/linuxdocs.in
314 expandlines /tmp/linuxdocs.in /tmp/linuxdocs
315
316 zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-LinuxDocs.zip < /tmp/linuxdocs
317
318 # PDF/HTML docs that should go into the Windows setup because
319 # there are no WinHelp equivalents
320 echo Creating $DESTDIR/wxWidgets-$VERSION-ExtraDoc.zip
321 expandlines $SCRIPT/extradoc.rsp /tmp/extradocs
322 zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-ExtraDoc.zip < /tmp/extradocs
323 rearchive wxWidgets-$VERSION-ExtraDoc.zip wxWidgets-$VERSION $DESTDIR
324 }
325
326
327 dospinport(){
328 port=$1
329
330 upperport="`echo $port|tr '[a-z]' '[A-Z]'`"
331 echo "Zipping wx$upperport..."
332
333 cd $APPDIR
334 portfiles="/tmp/wx$port.files"
335 getfilelist "$port" "$portfiles"
336
337 zip $ZIPFLAGS -@ $DESTDIR/wx$upperport-$VERSION.zip < $portfiles
338 zip $ZIPFLAGS -g $DESTDIR/wx$upperport-$VERSION.zip LICENSE.txt COPYING.LIB CHANGES.txt README.txt
339
340 if [ $port = "msw" ] || [ $port = "all" ]; then
341 zip $ZIPFLAGS -g $DESTDIR/wx$upperport-$VERSION.zip README-MSW.txt INSTALL-MSW.txt
342 fi
343
344 if [ $port = "os2" ] || [ $port = "all" ]; then
345 zip $ZIPFLAGS -g $DESTDIR/wx$upperport-$VERSION.zip INSTALL-OS2.txt
346 fi
347
348 # put all files in a wxWidgets-$VERSION subdir in the zip archive
349 rearchive wx$upperport-$VERSION.zip wxWidgets-$VERSION $DESTDIR
350 }
351
352 dospininstaller()
353 {
354 cd $DESTDIR
355
356 rm -f -r wxWidgets-$VERSION
357
358 echo Unzipping the Windows files into wxWidgets-$VERSION
359
360 mkdir -p wxWidgets-$VERSION
361
362 unzip $ZIPFLAGS -o wxWidgets-$VERSION-HTMLHelp.zip
363 unzip $ZIPFLAGS -o wxWidgets-$VERSION-ExtraDoc.zip
364
365 # After this change of directory, we're in the
366 # temporary 'wx' directory and not acting on
367 # the source wxWidgets directory.
368 cd $DESTDIR/wxWidgets-$VERSION
369
370 # Now delete a few files that are unnecessary
371 #attrib -R *
372 rm -f BuildCVS.txt descrip.mms
373 rm -f setup.h_vms
374 rm -f docs/html/wxbook.htm docs/html/roadmap.htm
375 rm -f -r contrib/docs/latex/ogl
376 rm -f src/mingegcs.bat
377 rm -f -r distrib
378 rm -f *.spec
379 rm -f src/gtk/descrip.mms src/motif/descrip.mms
380
381
382 # Disabled for now - Now cp some binary files to 'bin'
383 if [ ! -d bin ]; then
384 mkdir bin
385 fi
386
387 cp $APPDIR/bin/tex2rtf.exe bin
388 cp $APPDIR/bin/tex2rtf.chm bin
389 cp $APPDIR/bin/widgets.exe bin
390 cp $APPDIR/bin/life.exe bin
391 cp $APPDIR/demos/life/breeder.lif bin
392 cp $APPDIR/docs/htmlhelp/tex2rtf.chm bin
393
394 if [ ! -d docs/pdf ]; then
395 mkdir docs/pdf
396 fi
397 #cp $APPDIR/docs/pdf/wxTutorial.pdf docs/pdf
398
399 # Make wxMSW-xxx.zip
400 cd $DESTDIR
401 zip $ZIPFLAGS -r wxMSW-$VERSION.zip wxWidgets-$VERSION/*
402 cd wxWidgets-$VERSION
403
404 if [ "$INNO" != "0" ]; then
405 echo Generating $SETUPSCRIPTNAME
406 rm -f $SETUPSCRIPTNAME
407
408 sh $SCRIPTDIR/msw/makeinno.sh $SETUPIMAGEDIR $INNOTOP $INNOBOTTOM $SETUPSCRIPTNAME
409
410 if [ ! -f $SETUPSCRIPTNAME ]; then
411 echo "*** Error - something went wrong with the script file generation."
412 exit 1
413 fi
414
415 # Now replace %VERSION% with the real application version, and other
416 # variables
417 echo Replacing variables in the setup script
418 doreplace $SETUPSCRIPTNAME "s/%VERSION%/$VERSION/g"
419 doreplace $SETUPSCRIPTNAME "s/%COPYRIGHTHOLDER%/$AUTHOR/g"
420 doreplace $SETUPSCRIPTNAME "s/%VENDOR%/$VENDOR/g"
421
422 unix2dosname $READMEFILE
423 doreplace $SETUPSCRIPTNAME "s;%READMEFILE%;$RETVALUE;g"
424
425 unix2dosname $READMEAFTERFILE
426 doreplace $SETUPSCRIPTNAME "s;%READMEAFTERFILE%;$RETVALUE;g"
427
428 unix2dosname $LICENSEFILE
429 doreplace $SETUPSCRIPTNAME "s;%LICENSEFILE%;$RETVALUE;g"
430
431 doreplace $SETUPSCRIPTNAME "s/%APPNAME%/$APPNAME/g"
432 doreplace $SETUPSCRIPTNAME "s/%APPTITLE%/$APPTITLE/g"
433
434 unix2dosname $SETUPIMAGEDIR
435 doreplace $SETUPSCRIPTNAME "s;%SOURCEDIR%;$RETVALUE;g"
436
437 unix2dosname $DESTDIR
438 doreplace $SETUPSCRIPTNAME "s;%OUTPUTDIR%;$RETVALUE;g"
439
440 doreplace $SETUPSCRIPTNAME "s/%APPEXTENSION%/$APPEXTENSION/g"
441
442 # FIXME: how do we get the first name in the list?
443 if [ "$MANUALFILES" != "" ]; then
444 HELPFILE=`basename $MANUALFILES`
445 unix2dosname $HELPFILE
446 doreplace $SETUPSCRIPTNAME "s;%HELPFILE%;$RETVALUE;g"
447 fi
448
449 rm -f $DESTDIR/setup*.* $DESTDIR/wxMSW-$VERSION-Setup.exe
450
451 # Inno Setup complains if this step is not done
452 unix2dos --unix2dos $SETUPSCRIPTNAME
453
454 # Now invoke INNO compiler on the new ISS file
455 # First, make a DOS filename or Inno Setup will get confused.
456
457 unix2dosname2 $SETUPSCRIPTNAME
458 DOSFILENAME=$RETVALUE
459
460 # Note: the double slash is Mingw32/MSYS convention for
461 # denoting a switch, that must not be converted into
462 # a path (otherwise /c = c:/)
463
464 cd `dirname $SETUPSCRIPTNAME`
465 BASESCRIPTNAME=`basename $SETUPSCRIPTNAME`
466 echo Invoking Inno Setup compiler on $BASESCRIPTNAME
467
468 "$SETUPCOMPILER" //cc $BASESCRIPTNAME
469
470 if [ ! -f $DESTDIR/setup.exe ]; then
471 echo "*** Error - the setup.exe was not generated."
472 exit
473 fi
474
475 cd $DESTDIR
476 mv setup.exe wxMSW-$VERSION-Setup.exe
477
478 fi
479 # echo Putting all the setup files into a single zip archive
480 # zip wxMSW-$VERSION-setup.zip readme-$VERSION.txt setup*.*
481
482 rm -f wxWidgets-$VERSION-ExtraDoc.zip
483 rm -f wxWidgets-$VERSION-DocSource.zip
484 rm -f wxWidgets-$VERSION-LinuxDocs.zip
485
486 echo If you saw no warnings or errors, $APPTITLE was successfully spun.
487 echo
488 }
489
490 makesetup()
491 {
492
493 if [ ! -d $SETUPIMAGEDIR ]; then
494 echo Making the $SETUPIMAGEDIR for preparing the setup
495 mkdir -p $SETUPIMAGEDIR
496 fi
497
498 # Copying readmes
499 if [ "$READMEFILE" != "" ] && [ -f $READMEFILE ]; then
500 echo Copying readme.txt
501 cp $READMEFILE $SETUPIMAGEDIR
502 # else
503 # echo "*** Warning - $READMEFILE not found"
504 fi
505
506 if [ "$LICENSEFILE" != "" ] && [ -f $LICENSEFILE ]; then
507 echo Copying licence.txt
508 cp $LICENSEFILE $SETUPIMAGEDIR
509 # else
510 # echo "*** Warning - $LICENSEFILE not found"
511 fi
512
513 if [ "$MAKEMANUAL" != "0" ]; then
514 if [ -d $MANUALDIR ]; then
515 cd $MANUALDIR
516 make
517 else
518 echo "*** Warning - $MANUALDIR not found"
519 fi
520 fi
521
522 rm -f $DESTDIR/wx*.zip
523 rm -f $DESTDIR/*.htb
524 rm -f $DESTDIR/ogl3*.zip
525 rm -f $DESTDIR/contrib*.zip
526 rm -f $DESTDIR/tex2rtf2*.zip
527 rm -f $DESTDIR/mmedia*.zip
528 rm -f $DESTDIR/jpeg*.zip
529 rm -f $DESTDIR/tiff*.zip
530 rm -f $DESTDIR/utils*.zip
531 rm -f $DESTDIR/extradoc*.zip
532 rm -f $DESTDIR/stc*.zip
533 rm -f $DESTDIR/*-win32*.zip
534 rm -f $DESTDIR/setup*.*
535 rm -f $DESTDIR/*.txt
536 rm -f $DESTDIR/make*
537
538 if [ -d $DESTDIR/wx ]; then
539 rm -f -r $DESTDIR/wx
540 fi
541
542 if [ ! -d $DESTDIR ]; then
543 mkdir $DESTDIR
544 fi
545 if [ -d $DESTDIR/wxWidgets-$VERSION ]; then
546 rm -f -r $DESTDIR/wxWidgets-$VERSION
547 fi
548
549 # Copy FAQ from wxWebSite CVS
550 #if [ ! -d $WEBFILES ]; then
551 # echo Error - $WEBFILES does not exist
552 # exit
553 #fi
554
555 echo Copying FAQ and other files from $WEBFILES
556 cp $WEBFILES/site/faq*.htm $APPDIR/docs/html
557 cp $WEBFILES/site/platform.htm $APPDIR/docs/html
558 cp $WEBFILES/site/i18n.htm $APPDIR/docs/html
559
560 echo Copying readme files...
561 cp $APPDIR/docs/msw/readme.txt README-MSW.txt
562 cp $APPDIR/docs/msw/install.txt INSTALL-MSW.txt
563 cp $APPDIR/docs/os2/install.txt INSTALL-OS2.txt
564 cp $APPDIR/docs/licence.txt LICENCE.txt
565 cp $APPDIR/docs/lgpl.txt COPYING.LIB
566 cp $APPDIR/docs/changes.txt CHANGES.txt
567 cp $APPDIR/docs/readme.txt README.txt
568
569 # Copy setup0.h files to setup.h
570 # OS/2 always built with configure now
571 # cp $APPDIR/include/wx/os2/setup0.h $APPDIR/include/wx/os2/setup.h
572 cp $APPDIR/include/wx/msw/setup0.h $APPDIR/include/wx/msw/setup.h
573 cp $APPDIR/include/wx/univ/setup0.h $APPDIR/include/wx/univ/setup.h
574
575 # Do OS/2 spin
576 if [ "$SPINOS2" = "1" ] || [ "$SPINALL" = "1" ]; then
577 dospinport "os2" #dospinos2
578 fi
579
580 # Do MSW spin
581 if [ "$SPINMSW" = "1" ] || [ "$SPINALL" = "1" ]; then
582 dospinport "msw" #dospinmsw
583 fi
584
585 # Do wxBase spin
586 if [ "$SPINBASE" = "1" ] || [ "$SPINALL" = "1" ]; then
587 dospinport "base" #dospinbase
588 fi
589
590 # Do wxAll spin
591 if [ "$SPINWXALL" = "1" ] || [ "$SPINALL" = "1" ]; then
592 dospinport "all" #dospinwxall
593 fi
594
595 # Do docs spin
596 if [ "$SPINDOCS" = "1" ] || [ "$SPINALL" = "1" ]; then
597 dospindocs
598 fi
599
600 docopydocs $APPDIR $DESTDIR
601
602 # Time to regenerate the Inno Install script
603 dospininstaller
604 }
605
606 # Get the makefiles that aren't in CVS and unarchive them
607 getmakefiles()
608 {
609 echo Getting eVC++ project files...
610 curl http://biolpc22.york.ac.uk/pub/CVS_Makefiles/wx-mk-evcprj.zip --output /c/transit/wx-mk-evcprj.zip
611 echo Getting Digital Mars makefiles...
612 curl http://biolpc22.york.ac.uk/pub/CVS_Makefiles/wx-mk-dmars.zip --output /c/transit/wx-mk-dmars.zip
613 echo Getting VC++ makefiles...
614 curl http://biolpc22.york.ac.uk/pub/CVS_Makefiles/wx-mk-msvc.zip --output /c/transit/wx-mk-msvc.zip
615
616 cd $APPDIR
617 echo Unarchiving makefiles and project files...
618 unzip -o -a /c/transit/wx-mk-evcprj.zip
619 unzip -o -a /c/transit/wx-mk-dmars.zip
620 unzip -o -a /c/transit/wx-mk-msvc.zip
621 echo Done getting makefiles and project files.
622 }
623
624 usage()
625 {
626 echo "Usage: $PROGNAME [ options ]" 1>&2
627 echo Options:
628 echo " --help Display this help message"
629 echo " --upx Compress executable with UPX"
630 echo " --no-upx Do not compress executable with UPX"
631 echo " --inno Build the setup.exe"
632 echo " --no-inno Do not build the setup.exe"
633 echo " --wxmac Build wxMac distribution"
634 echo " --wxmsw Build wxMSW distribution"
635 echo " --wxos2 Build wxOS2 distribution"
636 echo " --wxall Build wxAll zip distribution"
637 echo " --wxbase Build wxBase zip distribution"
638 echo " --docs Build docs archives"
639 echo " --all Build all distributions (the default)"
640 echo " --getmakefiles Get out-of-CVS makefiles and unarchive into the wxWidgets source tree"
641 echo " --verbose Verbose zip operation"
642 echo.
643 echo Note that options only override settings in $SCRIPTDIR/msw/setup.var.
644 exit 1
645 }
646
647 # Process command line options.
648
649 for i in "$@"; do
650
651 case "$i" in
652 --inno) INNO=1 ;;
653 --no-inno) INNO=0 ;;
654 --upx) UPX=1 ;;
655 --no-upx) UPX=0 ;;
656 --wxmac) SPINMAC=1; SPINALL=0 ;;
657 --wxmsw) SPINMSW=1; SPINALL=0 ;;
658 --wxos2) SPINOS2=1; SPINALL=0 ;;
659 --wxall) SPINWXALL=1; SPINALL=0 ;;
660 --wxbase) SPINBASE=1; SPINALL=0 ;;
661 --getmakefiles) GETMAKEFILES=1; SPINALL=0 ;;
662 --docs) SPINDOCS=1; SPINALL=0 ;;
663 --all) SPINALL=1 ;;
664 --verbose) VERBOSE=1 ;;
665 *)
666 usage
667 exit
668 ;;
669 esac
670 done
671
672
673 doinit
674
675 if [ "$GETMAKEFILES" = "1" ]; then
676 getmakefiles
677 exit
678 fi
679
680 # findversion
681 makesetup
682