3 # Make a distribution of an application on MSW.
5 # ../distrib/msw/makesetup.sh --wxmsw --verbose &> log
7 # If your zip accepts Cygwin-style paths, then
8 # use cygpath, else substitute echo
25 SCRIPTDIR
=$WXWIN/distrib
/msw
26 WEBFILES
=c
:/wx
2dev
/wxWebSite
27 # Set this to the required version
30 .
$SCRIPTDIR/setup.var
37 if [ -f $thefile ]; then
38 sed -e "$theexpr" < $thefile > $thefile.tmp
39 mv $thefile.tmp
$thefile
41 echo "*** $thefile not found."
47 echo $1 | sed -e "s/\//\\\\\\\/g" > /tmp
/filename.tmp
48 RETVALUE
=`cat /tmp/filename.tmp`
49 rm -f /tmp
/filename.tmp
54 echo $1 | sed -e "s/\//\\\\/g" > /tmp
/filename.tmp
55 RETVALUE
=`cat /tmp/filename.tmp`
56 rm -f /tmp
/filename.tmp
61 if [ "$VERBOSE" != "1" ]; then
72 echo Re
-archiving $archive as
$dirname
76 if [ -d $dirname ]; then
81 unzip $ZIPFLAGS ..
/$archive
84 zip $ZIPFLAGS -r $archive $dirname/*
95 echo Re
-tarring $archive as
$dirname
99 if [ -d $dirname ]; then
107 tar cfz
$archive $dirname/*
112 # Find the version from wx/version.h
116 echo "#include <stdio.h>" > /tmp
/appver.c
117 echo "#include \"$VERSIONSYMBOLFILE\"" >> /tmp
/appver.c
118 echo "int main() { printf(\"%.2f\", $VERSIONSYMBOL); }" >> /tmp
/appver.c
119 gcc
/tmp
/appver.c
-I$APPDIR -o /tmp
/appver
120 VERSION
=`/tmp/appver`
121 rm -f /tmp
/appver
/tmp
/appver.c
129 # Zip up the complete wxOS2-xxx.zip file
130 zip $ZIPFLAGS -@
$DESTDIR/wxOS2
-$VERSION.
zip < $APPDIR/distrib
/msw
/generic.rsp
131 zip $ZIPFLAGS -@
-u $DESTDIR/wxOS2
-$VERSION.
zip < $APPDIR/distrib
/msw
/os2.rsp
132 zip $ZIPFLAGS -@
-u $DESTDIR/wxOS2
-$VERSION.
zip < $APPDIR/distrib
/msw
/jpeg.rsp
133 zip $ZIPFLAGS -@
-u $DESTDIR/wxOS2
-$VERSION.
zip < $APPDIR/distrib
/msw
/tiff.rsp
134 zip $ZIPFLAGS -u -@
$DESTDIR/wxOS2
-$VERSION.
zip < $APPDIR/distrib
/msw
/tiff.rsp
135 zip $ZIPFLAGS -u -@
$DESTDIR/wxOS2
-$VERSION.
zip < $APPDIR/distrib
/msw
/jpeg.rsp
136 zip $ZIPFLAGS -u -@
$DESTDIR/wxOS2
-$VERSION.
zip < $APPDIR/distrib
/msw
/utils.rsp
137 zip $ZIPFLAGS -u -@
$DESTDIR/wxOS2
-$VERSION.
zip < $APPDIR/distrib
/msw
/tex2rtf.rsp
138 zip $ZIPFLAGS -u -@
$DESTDIR/wxOS2
-$VERSION.
zip < $APPDIR/distrib
/msw
/ogl.rsp
139 zip $ZIPFLAGS -u -@
$DESTDIR/wxOS2
-$VERSION.
zip < $APPDIR/distrib
/msw
/xml.rsp
140 zip $ZIPFLAGS -u -@
$DESTDIR/wxOS2
-$VERSION.
zip < $APPDIR/distrib
/msw
/contrib.rsp
141 zip $ZIPFLAGS -u -@
$DESTDIR/wxOS2
-$VERSION.
zip < $APPDIR/distrib
/msw
/deprecated.rsp
142 zip $ZIPFLAGS -u -@
$DESTDIR/wxOS2
-$VERSION.
zip < $APPDIR/distrib
/msw
/makefile.rsp
144 # Rearchive under wxWidgets-$VERSION
145 if [ -d $DESTDIR/wxWidgets
-$VERSION ]; then
146 rm -f -r $DESTDIR/wxWidgets
-$VERSION
149 mkdir $DESTDIR/wxWidgets
-$VERSION
150 cd $DESTDIR/wxWidgets
-$VERSION
151 unzip $ZIPFLAGS ..
/wxOS2
-$VERSION.
zip
152 # No longer do this, configure should be OK
153 # echo Overwriting with OS2-specific versions of configure files...
154 # unzip $ZIPFLAGS -o $APPDIR/distrib/os2/os2-specific.zip
155 rm -f src
/gtk
/descrip.mms src
/motif
/descrip.mms docs
/pdf
/*.pdf
156 rm -f src
/tiff
/*.mcp src
/jpeg
/*.mcp src
/png
/*.mcp src
/zlib
/*.mcp
157 rm -f -r docs
/html
/tex2rtf
159 # echo Making OS/2 files lower case...
160 # no longer necessary
161 # $SCRIPTDIR/namedown include/wx/os2/*.H
162 # $SCRIPTDIR/namedown src/os2/*.CPP src/os2/*.I
164 echo Copying readme files...
165 cp $APPDIR/docs
/os
2/install.txt INSTALL
-OS2.txt
166 cp $APPDIR/docs
/licence.txt LICENCE.txt
167 cp $APPDIR/docs
/lgpl.txt COPYING.LIB
168 cp $APPDIR/docs
/changes.txt CHANGES.txt
169 cp $APPDIR/docs
/readme.txt README.txt
173 rm -f wxOS2
-$VERSION.
zip
174 zip $ZIPFLAGS -r wxOS2
-$VERSION.
zip wxWidgets
-$VERSION/*
179 echo Spinning wxMac...
182 echo Zipping wxMac distribution
184 cp $APPDIR/include
/wx
/mac
/setup0.h
$APPDIR/include
/wx
/setup.h
186 zip $ZIPFLAGS -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/generic.rsp
187 zip $ZIPFLAGS -u -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/mac.rsp
188 zip $ZIPFLAGS -u -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/cocoa.rsp
189 zip $ZIPFLAGS -u -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/cw_mac.rsp
190 zip $ZIPFLAGS -u -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/tiff.rsp
191 zip $ZIPFLAGS -u -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/jpeg.rsp
192 zip $ZIPFLAGS -u -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/utils.rsp
193 zip $ZIPFLAGS -u -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/tex2rtf.rsp
194 zip $ZIPFLAGS -u -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/ogl.rsp
195 zip $ZIPFLAGS -u -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/xml.rsp
196 zip $ZIPFLAGS -u -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/stc.rsp
197 zip $ZIPFLAGS -u -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/contrib.rsp
198 zip $ZIPFLAGS -u -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/deprecated.rsp
199 zip $ZIPFLAGS -u -@
$DESTDIR/wxMac
-$VERSION.
zip < $APPDIR/distrib
/msw
/makefile.rsp
201 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-CW-Mac.
zip < $APPDIR/distrib
/msw
/cw_mac.rsp
203 rm -f $APPDIR/include
/wx
/setup.h
205 if [ -d $DESTDIR/wxWidgets
-$VERSION ]; then
206 rm -f -r $DESTDIR/wxWidgets
-$VERSION
209 mkdir $DESTDIR/wxWidgets
-$VERSION
210 cd $DESTDIR/wxWidgets
-$VERSION
211 unzip $ZIPFLAGS ..
/wxMac
-$VERSION.
zip
212 rm -f src
/gtk
/descrip.mms src
/motif
/descrip.mms docs
/pdf
/*.pdf
213 rm -f -r docs
/html
/tex2rtf docs
/htmlhelp
215 echo Copying readme files...
216 cp $APPDIR/docs
/mac
/readme.txt README
-MAC.txt
217 cp $APPDIR/docs
/mac
/install.txt INSTALL
-MAC.txt
218 cp $APPDIR/docs
/licence.txt LICENCE.txt
219 cp $APPDIR/docs
/lgpl.txt COPYING.LIB
220 cp $APPDIR/docs
/changes.txt CHANGES.txt
221 cp $APPDIR/docs
/readme.txt README.txt
225 rm -f wxMac
-$VERSION.
zip
226 zip $ZIPFLAGS -r wxMac
-$VERSION.
zip wxWidgets
-$VERSION/*
231 echo Zipping wxMSW...
234 # Create wxWidgets-$VERSION-win.zip which is used to create wxMSW
235 echo Zipping individual components
236 rm -f $DESTDIR/wxWidgets
-$VERSION-win.
zip
237 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/generic.rsp
238 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/makefile.rsp
239 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/msw.rsp
240 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/ogl.rsp
241 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/mmedia.rsp
242 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/stc.rsp
243 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/tex2rtf.rsp
244 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/jpeg.rsp
245 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/tiff.rsp
246 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/xml.rsp
247 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/contrib.rsp
248 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/deprecated.rsp
249 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/utils.rsp
250 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/utilmake.rsp
251 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/univ.rsp
252 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-win.
zip < $APPDIR/distrib
/msw
/wince.rsp
258 echo Zipping wxAll...
261 echo Zipping individual components
262 rm -f $DESTDIR/wxWidgets
-$VERSION-all.
zip
264 # Save adding all the wxMSW files again
265 if [ ! -f $DESTDIR/wxWidgets
-$VERSION-win.
zip ]; then
268 cp $DESTDIR/wxWidgets
-$VERSION-win.
zip $DESTDIR/wxWidgets
-$VERSION-all.
zip
270 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-all.
zip < `cat $APPDIR/distrib/msw/cw_mac.rsp $APPDIR/distrib/msw/x11.rsp $APPDIR/distrib/msw/cocoa.rsp $APPDIR/distrib/msw/motif.rsp $APPDIR/distrib/msw/mac.rsp $APPDIR/distrib/msw/wince.rsp $APPDIR/distrib/msw/mgl.rsp $APPDIR/distrib/msw/os2.rsp`
272 if [ -d $DESTDIR/wxWidgets
-$VERSION ]; then
273 rm -f -r $DESTDIR/wxWidgets
-$VERSION
276 mkdir $DESTDIR/wxWidgets
-$VERSION
277 cd $DESTDIR/wxWidgets
-$VERSION
278 unzip $ZIPFLAGS ..
/wxWidgets
-$VERSION-all.
zip
280 echo Copying readme files...
281 cp $APPDIR/docs
/licence.txt LICENCE.txt
282 cp $APPDIR/docs
/lgpl.txt COPYING.LIB
283 cp $APPDIR/docs
/changes.txt CHANGES.txt
284 cp $APPDIR/docs
/readme.txt README.txt
288 rm -f $DESTDIR/wxWidgets
-$VERSION-all.
zip
289 zip $ZIPFLAGS -r wxAll
-$VERSION.
zip wxWidgets
-$VERSION/*
296 echo Zipping wxBase...
297 rm -f $DESTDIR/wxBase
-$VERSION.
zip
298 zip $ZIPFLAGS -@
$DESTDIR/wxBase
-$VERSION.
zip < $APPDIR/distrib
/msw
/base.rsp
300 if [ -d $DESTDIR/wxWidgets
-$VERSION ]; then
301 rm -f -r $DESTDIR/wxWidgets
-$VERSION
304 mkdir $DESTDIR/wxWidgets
-$VERSION
305 cd $DESTDIR/wxWidgets
-$VERSION
306 unzip $ZIPFLAGS ..
/wxBase
-$VERSION.
zip
308 echo Copying readme files...
309 cp $APPDIR/docs
/base
/readme.txt README.txt
310 cp $APPDIR/docs
/licence.txt LICENCE.txt
311 cp $APPDIR/docs
/lgpl.txt COPYING.LIB
312 cp $APPDIR/docs
/changes.txt CHANGES.txt
313 cp $APPDIR/docs
/readme.txt README2.txt
317 rm -f wxBase
-$VERSION.
zip
318 zip $ZIPFLAGS -r wxBase
-$VERSION.
zip wxWidgets
-$VERSION/*
325 echo Creating
$DESTDIR/wxWidgets
-$VERSION-DocSource.
zip
326 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-DocSource.
zip < $APPDIR/distrib
/msw
/docsrc.rsp
327 rearchive wxWidgets
-$VERSION-DocSource.
zip wxWidgets
-$VERSION $DESTDIR
329 echo Creating
$DESTDIR/wxWidgets
-$VERSION-WinHelp.
zip
330 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-WinHelp.
zip < $APPDIR/distrib
/msw
/wx_hlp.rsp
331 rearchive wxWidgets
-$VERSION-WinHelp.
zip wxWidgets
-$VERSION $DESTDIR
333 echo Creating
$DESTDIR/wxWidgets
-$VERSION-HTML.
zip
334 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-HTML.
zip < $APPDIR/distrib
/msw
/wx_html.rsp
335 rearchive wxWidgets
-$VERSION-HTML.
zip wxWidgets
-$VERSION $DESTDIR
337 echo Creating
$DESTDIR/wxWidgets
-$VERSION-PDF.
zip
338 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-PDF.
zip < $APPDIR/distrib
/msw
/wx_pdf.rsp
339 rearchive wxWidgets
-$VERSION-PDF.
zip wxWidgets
-$VERSION $DESTDIR
341 echo Creating
$DESTDIR/wxWidgets
-$VERSION-PDF.
tar.gz
342 tar zcf
/c
/wx
2dev
/wxWindows
/deliver
/wxWidgets
-$VERSION-PDF.
tar.gz docs
/pdf
/*.pdf
343 rearchivetar wxWidgets
-$VERSION-PDF.
tar.gz wxWidgets
-$VERSION /c
/wx
2dev
/wxWindows
/deliver
345 # zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-Word.zip < $APPDIR/distrib/msw/wx_word.rsp
346 # rearchive wxWidgets-$VERSION-Word.zip wxWidgets-$VERSION $DESTDIR
348 echo Creating
$DESTDIR/wxWidgets
-$VERSION-HTB.
zip
349 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-HTB.
zip < $APPDIR/distrib
/msw
/wx_htb.rsp
350 rearchive wxWidgets
-$VERSION-HTB.
zip wxWidgets
-$VERSION $DESTDIR
352 echo Creating
$DESTDIR/wxWidgets
-$VERSION-HTMLHelp.
zip
353 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-HTMLHelp.
zip < $APPDIR/distrib
/msw
/wx_chm.rsp
354 rearchive wxWidgets
-$VERSION-HTMLHelp.
zip wxWidgets
-$VERSION $DESTDIR
356 # Add Linuxy docs to a separate archive to be transported to Linux for the
357 # Linux-based releases
358 echo Creating
$DESTDIR/wxWidgets
-$VERSION-LinuxDocs.
zip
359 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-LinuxDocs.
zip < $APPDIR/distrib
/msw
/wx_html.rsp
360 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-LinuxDocs.
zip < $APPDIR/distrib
/msw
/wx_pdf.rsp
361 zip $ZIPFLAGS -@
-u $DESTDIR/wxWidgets
-$VERSION-LinuxDocs.
zip < $APPDIR/distrib
/msw
/wx_htb.rsp
363 # PDF/HTML docs that should go into the Windows setup because
364 # there are no WinHelp equivalents
365 echo Creating
$DESTDIR/wxWidgets
-$VERSION-ExtraDoc.
zip
366 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-ExtraDoc.
zip < $APPDIR/distrib
/msw
/extradoc.rsp
367 rearchive wxWidgets
-$VERSION-ExtraDoc.
zip wxWidgets
-$VERSION $DESTDIR
374 # zip up Univ-specific files
375 echo Creating
$DESTDIR/wxWidgets
-$VERSION-Univ.
zip
376 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-Univ.
zip < $APPDIR/distrib
/msw
/univ.rsp
377 rearchive wxWidgets
-$VERSION-Univ.
zip wxWidgets
-$VERSION $DESTDIR
380 echo Creating
$DESTDIR/wxWidgets
-$VERSION-VC.
zip
381 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-VC.
zip < $APPDIR/distrib
/msw
/vc.rsp
382 # rearchive wxWidgets-$VERSION-VC.zip wxWidgets-$VERSION $DESTDIR
384 # eVC++ project files
385 echo Creating
$DESTDIR/wxWidgets
-$VERSION-eVC.
zip
386 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-eVC.
zip < $APPDIR/distrib
/msw
/wince.rsp
387 # rearchive wxWidgets-$VERSION-eVC.zip wxWidgets-$VERSION $DESTDIR
390 echo Creating
$DESTDIR/wxWidgets
-$VERSION-DMC.
zip
391 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-DMC.
zip < $APPDIR/distrib
/msw
/dmc.rsp
392 # rearchive wxWidgets-$VERSION-DMC.zip wxWidgets-$VERSION $DESTDIR
395 echo Creating
$DESTDIR/wxWidgets
-$VERSION-BC.
zip
396 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-BC.
zip < $APPDIR/distrib
/msw
/bc.rsp
397 # rearchive wxWidgets-$VERSION-BC.zip wxWidgets-$VERSION $DESTDIR
399 # CodeWarrior project files
400 echo Creating
$DESTDIR/wxWidgets
-$VERSION-CW.
zip
401 zip $ZIPFLAGS -@
$DESTDIR/wxWidgets
-$VERSION-CW.
zip < $APPDIR/distrib
/msw
/cw.rsp
402 # rearchive wxWidgets-$VERSION-CW.zip wxWidgets-$VERSION $DESTDIR
409 # Put all archives for transit to Linux in a zip file
410 echo Creating
$DESTDIR/wxWidgets
-$VERSION-LinuxTransit.
zip
411 rm -f $DESTDIR/wxWidgets
-$VERSION-LinuxTransit.
zip
412 zip $ZIPFLAGS $DESTDIR/wxWidgets
-$VERSION-LinuxTransit.
zip wxWidgets
-$VERSION-LinuxDocs.
zip wxWidgets
-$VERSION-VC.
zip wxWidgets
-$VERSION-DMC.
zip wxWidgets
-$VERSION-eVC.
zip wxWidgets
-$VERSION-CW-Mac.
zip
414 echo Unzipping the Windows files into wxWidgets
-$VERSION
416 mkdir -p wxWidgets
-$VERSION
418 unzip $ZIPFLAGS -o wxWidgets
-$VERSION-win.
zip -d wxWidgets
-$VERSION
419 unzip $ZIPFLAGS -o wxWidgets
-$VERSION-VC.
zip -d wxWidgets
-$VERSION
420 unzip $ZIPFLAGS -o wxWidgets
-$VERSION-DMC.
zip -d wxWidgets
-$VERSION
421 unzip $ZIPFLAGS -o wxWidgets
-$VERSION-BC.
zip -d wxWidgets
-$VERSION
422 unzip $ZIPFLAGS -o wxWidgets
-$VERSION-CW.
zip -d wxWidgets
-$VERSION
423 unzip $ZIPFLAGS -o wxWidgets
-$VERSION-HTMLHelp.
zip
424 unzip $ZIPFLAGS -o wxWidgets
-$VERSION-ExtraDoc.
zip
426 # After this change of directory, we're in the
427 # temporary 'wx' directory and not acting on
428 # the source wxWidgets directory.
429 cd $DESTDIR/wxWidgets
-$VERSION
431 # Now delete a few files that are unnecessary
433 rm -f BuildCVS.txt descrip.mms
435 rm -f docs
/html
/wxbook.htm docs
/html
/roadmap.htm
436 rm -f -r contrib
/docs
/latex
/ogl
437 rm -f src
/mingegcs.bat
440 rm -f -r contrib
/utils
/wxrcedit
441 rm -f src
/gtk
/descrip.mms src
/motif
/descrip.mms
443 echo Copying readme files...
444 cp $APPDIR/docs
/msw
/readme.txt README
-MSW.txt
445 cp $APPDIR/docs
/msw
/install.txt INSTALL
-MSW.txt
446 cp $APPDIR/docs
/licence.txt LICENCE.txt
447 cp $APPDIR/docs
/lgpl.txt COPYING.LIB
448 cp $APPDIR/docs
/changes.txt CHANGES.txt
449 cp $APPDIR/docs
/readme.txt README.txt
451 # Now cp some binary files to 'bin'
452 if [ ! -d bin
]; then
455 cp $APPDIR/bin
/tex2rtf.exe bin
456 cp $APPDIR/bin
/tex2rtf.chm bin
457 cp $APPDIR/bin
/widgets.exe bin
458 cp $APPDIR/bin
/life.exe bin
459 cp $APPDIR/demos
/life
/breeder.lif bin
460 cp $APPDIR/docs
/htmlhelp
/tex2rtf.chm bin
462 if [ ! -d docs
/pdf
]; then
465 #cp $APPDIR/docs/pdf/wxTutorial.pdf docs/pdf
469 zip $ZIPFLAGS -r wxMSW
-$VERSION.
zip wxWidgets
-$VERSION/*
470 cd wxWidgets
-$VERSION
472 echo Generating
$SETUPSCRIPTNAME
473 rm -f $SETUPSCRIPTNAME
475 sh
$SCRIPTDIR/makeinno.sh
$SETUPIMAGEDIR $INNOTOP $INNOBOTTOM $SETUPSCRIPTNAME
477 if [ ! -f $SETUPSCRIPTNAME ]; then
478 echo "*** Error - something went wrong with the script file generation."
482 # Now replace %VERSION% with the real application version, and other
484 echo Replacing variables
in the setup
script
485 doreplace
$SETUPSCRIPTNAME "s/%VERSION%/$VERSION/g"
486 doreplace
$SETUPSCRIPTNAME "s/%COPYRIGHTHOLDER%/$AUTHOR/g"
487 doreplace
$SETUPSCRIPTNAME "s/%VENDOR%/$VENDOR/g"
489 unix2dosname
$READMEFILE
490 doreplace
$SETUPSCRIPTNAME "s;%READMEFILE%;$RETVALUE;g"
492 unix2dosname
$READMEAFTERFILE
493 doreplace
$SETUPSCRIPTNAME "s;%READMEAFTERFILE%;$RETVALUE;g"
495 unix2dosname
$LICENSEFILE
496 doreplace
$SETUPSCRIPTNAME "s;%LICENSEFILE%;$RETVALUE;g"
498 doreplace
$SETUPSCRIPTNAME "s/%APPNAME%/$APPNAME/g"
499 doreplace
$SETUPSCRIPTNAME "s/%APPTITLE%/$APPTITLE/g"
501 unix2dosname
$SETUPIMAGEDIR
502 doreplace
$SETUPSCRIPTNAME "s;%SOURCEDIR%;$RETVALUE;g"
504 unix2dosname
$DESTDIR
505 doreplace
$SETUPSCRIPTNAME "s;%OUTPUTDIR%;$RETVALUE;g"
507 doreplace
$SETUPSCRIPTNAME "s/%APPEXTENSION%/$APPEXTENSION/g"
509 # FIXME: how do we get the first name in the list?
510 if [ "$MANUALFILES" != "" ]; then
511 HELPFILE
=`basename $MANUALFILES`
512 unix2dosname
$HELPFILE
513 doreplace
$SETUPSCRIPTNAME "s;%HELPFILE%;$RETVALUE;g"
516 rm -f $DESTDIR/setup
*.
*
518 # Inno Setup complains if this step is not done
519 unix2dos
--unix2dos $SETUPSCRIPTNAME
521 # Now invoke INNO compiler on the new ISS file
522 # First, make a DOS filename or Inno Setup will get confused.
524 unix2dosname2
$SETUPSCRIPTNAME
525 DOSFILENAME
=$RETVALUE
527 # Note: the double slash is Mingw32/MSYS convention for
528 # denoting a switch, that must not be converted into
529 # a path (otherwise /c = c:/)
531 cd `dirname $SETUPSCRIPTNAME`
532 BASESCRIPTNAME
=`basename $SETUPSCRIPTNAME`
533 echo Invoking Inno Setup compiler on
$BASESCRIPTNAME
535 "$SETUPCOMPILER" //cc
$BASESCRIPTNAME
537 if [ ! -f $DESTDIR/setup.exe
]; then
538 echo "*** Error - the setup.exe was not generated."
543 # mv setup.exe $APPNAME-$VERSION-setup.exe
545 echo Putting all the setup files into a single
zip archive
546 zip wxMSW
-$VERSION-setup.
zip readme
-$VERSION.txt setup
*.
*
548 rm -f wxWidgets
-$VERSION-win.
zip
549 rm -f wxWidgets
-$VERSION-ExtraDoc.
zip
551 echo If you saw no warnings or errors
, $APPTITLE was successfully spun.
557 # if [ -d $SETUPIMAGEDIR ]; then
558 # echo Removing contents of existing $SETUPIMAGEDIR
559 # rm -f -r $SETUPIMAGEDIR/*
562 if [ ! -d $SETUPIMAGEDIR ]; then
563 echo Making the
$SETUPIMAGEDIR for preparing the setup
564 mkdir -p $SETUPIMAGEDIR
568 if [ "$READMEFILE" != "" ] && [ -f $READMEFILE ]; then
569 echo Copying readme.txt
570 cp $READMEFILE $SETUPIMAGEDIR
572 # echo "*** Warning - $READMEFILE not found"
575 if [ "$LICENSEFILE" != "" ] && [ -f $LICENSEFILE ]; then
576 echo Copying licence.txt
577 cp $LICENSEFILE $SETUPIMAGEDIR
579 # echo "*** Warning - $LICENSEFILE not found"
582 if [ "$MAKEMANUAL" != "0" ]; then
583 if [ -d $MANUALDIR ]; then
587 echo "*** Warning - $MANUALDIR not found"
591 rm -f $DESTDIR/wx
*.
zip
593 rm -f $DESTDIR/ogl3
*.
zip
594 rm -f $DESTDIR/contrib
*.
zip
595 rm -f $DESTDIR/tex2rtf2
*.
zip
596 rm -f $DESTDIR/mmedia
*.
zip
597 rm -f $DESTDIR/jpeg
*.
zip
598 rm -f $DESTDIR/tiff
*.
zip
599 rm -f $DESTDIR/utils
*.
zip
600 rm -f $DESTDIR/extradoc
*.
zip
601 rm -f $DESTDIR/stc
*.
zip
602 rm -f $DESTDIR/*-win32*.
zip
603 rm -f $DESTDIR/setup
*.
*
607 if [ -d $DESTDIR/wx
]; then
611 if [ ! -d $DESTDIR ]; then
614 if [ -d $DESTDIR/wxWidgets
-$VERSION ]; then
615 rm -f -r $DESTDIR/wxWidgets
-$VERSION
618 # Copy FAQ from wxWebSite CVS
619 if [ ! -d $WEBFILES ]; then
620 echo Error
- $WEBFILES does not exist
624 echo Copying FAQ and other files from
$WEBFILES
625 cp $WEBFILES/site
/faq
*.htm
$APPDIR/docs
/html
626 cp $WEBFILES/site
/platform.htm
$APPDIR/docs
/html
627 cp $WEBFILES/site
/i18n.htm
$APPDIR/docs
/html
629 # Copy setup0.h files to setup.h
630 cp $APPDIR/include
/wx
/os
2/setup0.h
$APPDIR/include
/wx
/os
2/setup.h
631 cp $APPDIR/include
/wx
/msw
/setup0.h
$APPDIR/include
/wx
/msw
/setup.h
632 cp $APPDIR/include
/wx
/univ
/setup0.h
$APPDIR/include
/wx
/univ
/setup.h
635 if [ "$SPINOS2" = "1" ] || [ "$SPINALL" = "1" ]; then
640 if [ "$SPINMAC" = "1" ] || [ "$SPINALL" = "1" ]; then
645 if [ "$SPINMSW" = "1" ] || [ "$SPINALL" = "1" ]; then
650 if [ "$SPINBASE" = "1" ] || [ "$SPINALL" = "1" ]; then
655 if [ "$SPINWXALL" = "1" ] || [ "$SPINALL" = "1" ]; then
660 if [ "$SPINDOCS" = "1" ] || [ "$SPINALL" = "1" ]; then
667 cp $APPDIR/docs
/changes.txt
$DESTDIR/changes
-$VERSION.txt
668 cp $APPDIR/docs
/readme.txt
$DESTDIR/readme
-$VERSION.txt
670 cp $APPDIR/docs
/msw
/readme.txt
$DESTDIR/readme
-msw-$VERSION.txt
671 cp $APPDIR/docs
/msw
/install.txt
$DESTDIR/install-msw-$VERSION.txt
673 cp $APPDIR/docs
/mac
/readme.txt
$DESTDIR/readme
-mac-$VERSION.txt
674 cp $APPDIR/docs
/mac
/install.txt
$DESTDIR/install-mac-$VERSION.txt
676 cp $APPDIR/docs
/motif
/readme.txt
$DESTDIR/readme
-motif-$VERSION.txt
677 cp $APPDIR/docs
/motif
/install.txt
$DESTDIR/install-motif-$VERSION.txt
679 cp $APPDIR/docs
/gtk
/readme.txt
$DESTDIR/readme
-gtk-$VERSION.txt
680 cp $APPDIR/docs
/gtk
/install.txt
$DESTDIR/install-gtk-$VERSION.txt
682 cp $APPDIR/docs
/x
11/readme.txt
$DESTDIR/readme
-x11-$VERSION.txt
683 # cp $APPDIR/docs/x11/readme-nanox.txt $DESTDIR/readme-nanox-$VERSION.txt
684 cp $APPDIR/docs
/x
11/install.txt
$DESTDIR/install-x11-$VERSION.txt
686 cp $APPDIR/docs
/mgl
/readme.txt
$DESTDIR/readme
-mgl-$VERSION.txt
687 cp $APPDIR/docs
/mgl
/install.txt
$DESTDIR/install-mgl-$VERSION.txt
689 cp $APPDIR/docs
/cocoa
/readme.txt
$DESTDIR/readme
-cocoa-$VERSION.txt
690 cp $APPDIR/docs
/cocoa
/install.txt
$DESTDIR/install-cocoa-$VERSION.txt
692 cp $APPDIR/docs
/base
/readme.txt
$DESTDIR/readme
-base-$VERSION.txt
694 cp $APPDIR/docs
/os
2/install.txt
$DESTDIR/install-os2-$VERSION.txt
696 cp $APPDIR/docs
/univ
/readme.txt
$DESTDIR/readme
-univ-$VERSION.txt
698 cp $APPDIR/docs
/readme_vms.txt
$DESTDIR/readme
-vms-$VERSION.txt
700 # cp $APPDIR/docs/motif/makewxmotif $DESTDIR/makewxmotif-$VERSION
701 # cp $APPDIR/docs/gtk/makewxgtk $DESTDIR/makewxgtk-$VERSION
703 # Time to regenerate the Inno Install script
704 if [ "$INNO" != "0" ]; then
709 # Get the makefiles that aren't in CVS and unarchive them
712 echo Getting eVC
++ project files...
713 curl http
://biolpc22.york.ac.uk
/pub
/CVS_Makefiles
/wx
-mk-evcprj.
zip --output /c
/transit
/wx
-mk-evcprj.
zip
714 echo Getting Digital Mars makefiles...
715 curl http
://biolpc22.york.ac.uk
/pub
/CVS_Makefiles
/wx
-mk-dmars.
zip --output /c
/transit
/wx
-mk-dmars.
zip
716 echo Getting VC
++ makefiles...
717 curl http
://biolpc22.york.ac.uk
/pub
/CVS_Makefiles
/wx
-mk-msvc.
zip --output /c
/transit
/wx
-mk-msvc.
zip
720 echo Unarchiving makefiles and project files...
721 unzip -o -a /c
/transit
/wx
-mk-evcprj.
zip
722 unzip -o -a /c
/transit
/wx
-mk-dmars.
zip
723 unzip -o -a /c
/transit
/wx
-mk-msvc.
zip
724 echo Done getting makefiles and project files.
727 # We can't use e.g. this:
728 # ls `cat $SRC/distrib/msw/makefile.rsp` zip -@ -u $DEST/wxWidgets-$VERSION-gen.zip
729 # because there's not enough space on the command line, plus we need to ignore the
731 # So if we need to (not in this script so far) we do something like this instead:
732 # expandlines $SRC/setup/files.rsp temp.txt
733 # zip -@ `$CYGPATHPROG -w $DEST/archive.zip` < temp.txt
742 for line
in `cat $toexpand` ; do
743 if [ $line != "" ]; then
744 ls $line >> $outputfile
751 echo "Usage: $PROGNAME [ options ]" 1>&2
753 echo " --help Display this help message"
754 echo " --upx Compress executable with UPX"
755 echo " --no-upx Do not compress executable with UPX"
756 echo " --inno Build the setup.exe"
757 echo " --no-inno Do not build the setup.exe"
758 echo " --wxmac Build wxMac distribution"
759 echo " --wxmsw Build wxMSW distribution"
760 echo " --wxos2 Build wxOS2 distribution"
761 echo " --wxall Build wxAll zip distribution"
762 echo " --wxbase Build wxBase zip distribution"
763 echo " --docs Build docs archives"
764 echo " --all Build all distributions (the default)"
765 echo " --getmakefiles Get out-of-CVS makefiles and unarchive into the wxWidgets source tree"
766 echo " --verbose Verbose zip operation"
768 echo Note that options only override settings
in $SCRIPTDIR/setup.var.
772 # Process command line options.
780 --wxmac) SPINMAC
=1; SPINALL
=0 ;;
781 --wxmsw) SPINMSW
=1; SPINALL
=0 ;;
782 --wxos2) SPINOS2
=1; SPINALL
=0 ;;
783 --wxall) SPINWXALL
=1; SPINALL
=0 ;;
784 --wxbase) SPINBASE
=1; SPINALL
=0 ;;
785 --getmakefiles) GETMAKEFILES
=1; SPINALL
=0 ;;
786 --docs) SPINDOCS
=1; SPINALL
=0 ;;
788 --verbose) VERBOSE
=1 ;;
799 if [ "$GETMAKEFILES" = "1" ]; then