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