2 # tardist: make up a tar.gz distribution of wxWidgets 2
3 # Supply a source (e.g. ~/wx2) and destination (e.g. ~/wx2/deliver)
5 # We can't use e.g. this:
6 # ls `cat $SRC/distrib/msw/makefile.rsp` zip -@ -u $DEST/wxWidgets-$VERSION-gen.zip
7 # because there's not enough space on the command line, plus we need to ignore the
17 # for docopyreadmefiles and docopysetup_h
18 SCRIPTDIR=$WXSRC/distrib/scripts
19 . $SCRIPTDIR/utils.inc
23 if [ "$ARCH" = "ppc" ]; then
34 for line in `cat $toexpand` ; do
35 if [ "$line" != "" ]; then
36 ls $line >> $outputfile
38 uniq < $outputfile > /tmp/uniqtemp.txt
39 mv /tmp/uniqtemp.txt $outputfile
46 echo Removing backup files...
47 rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~
49 rm -f $WXDEST/wx*-${WXVER}*.tar.gz
51 cp $WXSRC/include/wx/msw/setup0.h $WXSRC/include/wx/msw/setup.h
52 cp $WXSRC/include/wx/univ/setup0.h $WXSRC/include/wx/univ/setup.h
54 # Copy readme and other files
55 docopydocs $WXSRC $WXDEST
66 cp $WXSRC/include/wx/mac/setup0.h $WXSRC/include/wx/setup.h
67 cp $WXSRC/include/wx/mac/setup0.h $WXSRC/include/wx/mac/setup.h
69 cat $SCRIPTDIR/manifests/mac.rsp $SCRIPTDIR/manifests/cocoa.rsp $SCRIPTDIR/manifests/generic.rsp $SCRIPTDIR/manifests/cw_mac.rsp $SCRIPTDIR/manifests/tex2rtf.rsp $SCRIPTDIR/manifests/utils.rsp $SCRIPTDIR/manifests/ogl.rsp $SCRIPTDIR/manifests/stc.rsp $SCRIPTDIR/manifests/xml.rsp $SCRIPTDIR/manifests/contrib.rsp $SCRIPTDIR/manifests/deprecated.rsp $SCRIPTDIR/manifests/makefile.rsp $SCRIPTDIR/manifests/tiff.rsp $SCRIPTDIR/manifests/jpeg.rsp > /tmp/wxmac_in.txt
70 expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt
71 $TAR cf $WXDEST/wxMac-${WXVER}.tar -T /tmp/wxmac.txt
73 rm -f $WXSRC/include/wx/setup.h
75 echo Re-tarring wxMac in a subdirectory...
80 $TAR xf ../wxMac-${WXVER}.tar
81 rm -f -r contrib/src/mmedia contrib/samples/mmedia
82 echo Copying readme files...
83 cp $WXSRC/docs/mac/readme.txt README-MAC.txt
84 cp $WXSRC/docs/mac/install.txt INSTALL-MAC.txt
87 rm -f wxMac-${WXVER}.tar
88 $TAR cf $WXDEST/wxMac-${WXVER}.tar wxMac-${WXVER}/*
89 rm -f -r wxMac-${WXVER}
90 gzip $WXDEST/wxMac-${WXVER}.tar
93 ### wxUniv: universal-specific files
95 #cat $SCRIPTDIR/manifests/univ.rsp > /tmp/wxuniv_in.txt
96 #expandlines /tmp/wxuniv_in.txt /tmp/wxuniv.txt
97 #$TAR cf $WXDEST/wxWidgets-${WXVER}-Univ.tar -T /tmp/wxuniv.txt
99 #echo Re-tarring wxUniversal in a subdirectory...
101 #mkdir wxWidgets-${WXVER}
102 #cd wxWidgets-${WXVER}
103 #$TAR xf ../wxWidgets-${WXVER}-Univ.tar
105 #rm -f wxWidgets-${WXVER}-Univ.tar
106 #$TAR cf $WXDEST/wxWidgets-${WXVER}-Univ.tar wxWidgets-${WXVER}/*
107 #rm -f -r wxWidgets-${WXVER}
108 #gzip $WXDEST/wxWidgets-${WXVER}-Univ.tar
112 echo Tarring wxAll...
114 ### wxAll: all distributions in one giant archive
116 cat $SCRIPTDIR/manifests/generic.rsp $SCRIPTDIR/manifests/msw.rsp $SCRIPTDIR/manifests/wince.rsp $SCRIPTDIR/manifests/vc.rsp $SCRIPTDIR/manifests/cw.rsp $SCRIPTDIR/manifests/cw_mac.rsp $SCRIPTDIR/manifests/gtk.rsp $SCRIPTDIR/manifests/x11.rsp $SCRIPTDIR/manifests/motif.rsp $SCRIPTDIR/manifests/mac.rsp $SCRIPTDIR/manifests/cocoa.rsp $SCRIPTDIR/manifests/os2.rsp $SCRIPTDIR/manifests/palmos.rsp $SCRIPTDIR/manifests/x11.rsp $SCRIPTDIR/manifests/univ.rsp $SCRIPTDIR/manifests/mgl.rsp $SCRIPTDIR/manifests/contrib.rsp $SCRIPTDIR/manifests/deprecated.rsp $SCRIPTDIR/manifests/utilmake.rsp $SCRIPTDIR/manifests/utils.rsp $SCRIPTDIR/manifests/mmedia.rsp $SCRIPTDIR/manifests/tex2rtf.rsp $SCRIPTDIR/manifests/stc.rsp $SCRIPTDIR/manifests/xml.rsp $SCRIPTDIR/manifests/ogl.rsp $SCRIPTDIR/manifests/makefile.rsp $SCRIPTDIR/manifests/tiff.rsp $SCRIPTDIR/manifests/jpeg.rsp $SCRIPTDIR/manifests/docsrc.rsp | uniq > /tmp/wxall_in.txt
117 expandlines /tmp/wxall_in.txt /tmp/wxall.txt
118 $TAR cf $WXDEST/wxWidgets-${WXVER}.tar -T /tmp/wxall.txt
120 echo Re-tarring wxAll in a subdirectory...
122 mkdir wxWidgets-${WXVER}
124 cd wxWidgets-${WXVER}
126 # If we have the full set of VC++ project files,
128 if [ -f $WXDEST/extra/wxWidgets-${WXVER}-VC.zip ]; then
129 unzip -o $WXDEST/extra/wxWidgets-${WXVER}-VC.zip
131 echo "Warning - did not find $WXDEST/deliver/extra/wxWidgets-${WXVER}-VC.zip"
134 # If we have the full set of eVC++ project files,
136 if [ -f $WXDEST/extra/wxWidgets-${WXVER}-eVC.zip ]; then
137 unzip -o $WXDEST/extra/wxWidgets-${WXVER}-eVC.zip
139 echo "Warning - did not find $WXDEST/deliver/extra/wxWidgets-${WXVER}-eVC.zip"
142 # If we have the full set of DMC project files,
144 if [ -f $WXDEST/extra/wxWidgets-${WXVER}-DMC.zip ]; then
145 unzip -o $WXDEST/extra/wxWidgets-${WXVER}-DMC.zip
147 echo "Warning - did not find $WXDEST/deliver/extra/wxWidgets-${WXVER}-DMC.zip"
150 $TAR xf ../wxWidgets-${WXVER}.tar
152 # Translate all .dsp and .dsw files to DOS format
153 unix2dos --unix2dos `cat $SCRIPTDIR/manifests/vc.rsp`
156 rm -f wxWidgets-${WXVER}.tar
157 $TAR cf $WXDEST/wxWidgets-${WXVER}.tar wxWidgets-${WXVER}/*
158 rm -f -r wxWidgets-${WXVER}
159 gzip -c $WXDEST/wxWidgets-${WXVER}.tar > $WXDEST/wxWidgets-${WXVER}.tar.gz
160 bzip2 $WXDEST/wxWidgets-${WXVER}.tar
165 mkdir -p $WXSRC/docs/html/wx
166 mkdir -p $WXSRC/docs/html/tex2rtf
167 mkdir -p $WXSRC/docs/html/fl
168 mkdir -p $WXSRC/docs/html/ogl
169 mkdir -p $WXSRC/docs/htb
171 rm -f -r $WXSRC/docs/html/wx/*.htm*
172 rm -f -r $WXSRC/docs/htb/wx.htb
174 echo Making HTML wxWidgets manual...
175 cd $WXSRC/docs/latex/wx
176 cp *.gif $WXSRC/docs/html/wx
177 tex2rtf manual.tex $WXSRC/docs/html/wx/wx.htm -twice -html
179 echo Making HTB wxWidgets manual...
180 cd $WXSRC/docs/html/wx
181 zip -q $WXSRC/docs/htb/wx.htb *.html *.gif *.hhp *.hhc *.hhk
183 echo Done making manuals.
189 echo Usage: tardist wx-dir output-dir version
195 echo Usage: tardist wx-dir output-dir version
201 echo Usage: tardist wx-dir output-dir version
212 echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]"
214 echo " --help Display this help message"
215 echo " --wxall Spin wxAll"
216 echo " --wxmac Spin wxMac"
217 echo " --all Spin EVERYTHING"
218 echo " --silent Don't ask for confirmation before running"
223 # Process command line options.
227 --wxall) SPINWXALL=1 ;;
228 --wxmac) SPINWXMAC=1 ;;
229 --all) SPINEVERYTHING=1 ;;
230 --silent) SILENT=1 ;;
238 if [ "$SILENT" = "0" ]; then
239 echo About to archive wxWidgets:
243 echo CTRL-C if this is not correct.
249 if [ "$SPINWXMAC" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
253 if [ "$SPINWXALL" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then