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