]> git.saurik.com Git - wxWidgets.git/blame - distrib/scripts/mac/tardist
removed code inside USE_SIZABLE_CALENDAR, we should allow making the main calendar...
[wxWidgets.git] / distrib / scripts / mac / tardist
CommitLineData
ad17c279
KO
1#!/bin/sh
2# tardist: make up a tar.gz distribution of wxWidgets 2
3# Supply a source (e.g. ~/wx2) and destination (e.g. ~/wx2/deliver)
4
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
8# blank lines.
9
10PROGNAME=$0
11WXSRC=$1
12WXDEST=$2
13WXVER=$3
14
15# for docopyreadmefiles and docopysetup_h
16SCRIPTDIR=$WXSRC/distrib/scripts
17. $SCRIPTDIR/utils.inc
18
19TAR=tar
20ARCH=`arch`
21if [ "$ARCH" = "ppc" ]; then
22 TAR=gnutar
23fi
24
25expandlines()
26{
27 toexpand=$1
28 outputfile=$2
29
30 rm -f $outputfile
31 touch $outputfile
32 for line in `cat $toexpand` ; do
33 if [ "$line" != "" ]; then
34 ls $line >> $outputfile
35 fi
36 uniq < $outputfile > /tmp/uniqtemp.txt
37 mv /tmp/uniqtemp.txt $outputfile
38 done
39}
40
41doinit()
42{
43 cd $WXSRC
44 echo Removing backup files...
45 rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~
46
47 rm -f $WXDEST/wx*-${WXVER}*.tar.gz
48 # Copy setup files
49 cp $WXSRC/include/wx/msw/setup0.h $WXSRC/include/wx/msw/setup.h
50 cp $WXSRC/include/wx/univ/setup0.h $WXSRC/include/wx/univ/setup.h
51
52 # Copy readme and other files
53 docopydocs $WXSRC $WXDEST
54
55 # Make .mo files
56 cd $WXSRC/locale
57 make allmo
58}
59
60dospinwxmac()
61{
62echo Tarring wxMac...
63### wxMac
64cp $WXSRC/include/wx/mac/setup0.h $WXSRC/include/wx/setup.h
65cp $WXSRC/include/wx/mac/setup0.h $WXSRC/include/wx/mac/setup.h
66cd $WXSRC
67cat $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
68expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt
69$TAR cf $WXDEST/wxMac-${WXVER}.tar -T /tmp/wxmac.txt
70
71rm -f $WXSRC/include/wx/setup.h
72
73echo Re-tarring wxMac in a subdirectory...
74cd $WXDEST
75mkdir wxMac-${WXVER}
76cd wxMac-${WXVER}
77
78$TAR xf ../wxMac-${WXVER}.tar
79rm -f -r contrib/src/mmedia contrib/samples/mmedia
80echo Copying readme files...
81cp $WXSRC/docs/mac/readme.txt README-MAC.txt
82cp $WXSRC/docs/mac/install.txt INSTALL-MAC.txt
83
84cd ..
85rm -f wxMac-${WXVER}.tar
86$TAR cf $WXDEST/wxMac-${WXVER}.tar wxMac-${WXVER}/*
87rm -f -r wxMac-${WXVER}
88gzip $WXDEST/wxMac-${WXVER}.tar
89}
90
91### wxUniv: universal-specific files
92#cd $WXSRC
93#cat $SCRIPTDIR/manifests/univ.rsp > /tmp/wxuniv_in.txt
94#expandlines /tmp/wxuniv_in.txt /tmp/wxuniv.txt
95#$TAR cf $WXDEST/wxWidgets-${WXVER}-Univ.tar -T /tmp/wxuniv.txt
96#
97#echo Re-tarring wxUniversal in a subdirectory...
98#cd $WXDEST
99#mkdir wxWidgets-${WXVER}
100#cd wxWidgets-${WXVER}
101#$TAR xf ../wxWidgets-${WXVER}-Univ.tar
102#cd ..
103#rm -f wxWidgets-${WXVER}-Univ.tar
104#$TAR cf $WXDEST/wxWidgets-${WXVER}-Univ.tar wxWidgets-${WXVER}/*
105#rm -f -r wxWidgets-${WXVER}
106#gzip $WXDEST/wxWidgets-${WXVER}-Univ.tar
107
108dospinwxall()
109{
110echo Tarring wxAll...
111
112### wxAll: all distributions in one giant archive
113cd $WXSRC
114cat $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
115expandlines /tmp/wxall_in.txt /tmp/wxall.txt
116$TAR cf $WXDEST/wxWidgets-${WXVER}.tar -T /tmp/wxall.txt
117
118echo Re-tarring wxAll in a subdirectory...
119cd $WXDEST
120mkdir wxWidgets-${WXVER}
121
122cd wxWidgets-${WXVER}
123
124# If we have the full set of VC++ project files,
125# get them
126if [ -f $WXDEST/extra/wxWidgets-${WXVER}-VC.zip ]; then
127 unzip -o $WXDEST/extra/wxWidgets-${WXVER}-VC.zip
128else
129 echo "Warning - did not find $WXDEST/deliver/extra/wxWidgets-${WXVER}-VC.zip"
130fi
131
132# If we have the full set of eVC++ project files,
133# get them
134if [ -f $WXDEST/extra/wxWidgets-${WXVER}-eVC.zip ]; then
135 unzip -o $WXDEST/extra/wxWidgets-${WXVER}-eVC.zip
136else
137 echo "Warning - did not find $WXDEST/deliver/extra/wxWidgets-${WXVER}-eVC.zip"
138fi
139
140# If we have the full set of DMC project files,
141# get them
142if [ -f $WXDEST/extra/wxWidgets-${WXVER}-DMC.zip ]; then
143 unzip -o $WXDEST/extra/wxWidgets-${WXVER}-DMC.zip
144else
145 echo "Warning - did not find $WXDEST/deliver/extra/wxWidgets-${WXVER}-DMC.zip"
146fi
147
148$TAR xf ../wxWidgets-${WXVER}.tar
149
150# Translate all .dsp and .dsw files to DOS format
151unix2dos --unix2dos `cat $SCRIPTDIR/manifests/vc.rsp`
152
153cd ..
154rm -f wxWidgets-${WXVER}.tar
155$TAR cf $WXDEST/wxWidgets-${WXVER}.tar wxWidgets-${WXVER}/*
156rm -f -r wxWidgets-${WXVER}
157gzip -c $WXDEST/wxWidgets-${WXVER}.tar > $WXDEST/wxWidgets-${WXVER}.tar.gz
158bzip2 $WXDEST/wxWidgets-${WXVER}.tar
159}
160
161domakedocs()
162{
163 mkdir -p $WXSRC/docs/html/wx
164 mkdir -p $WXSRC/docs/html/tex2rtf
165 mkdir -p $WXSRC/docs/html/fl
166 mkdir -p $WXSRC/docs/html/ogl
167 mkdir -p $WXSRC/docs/htb
168
169 rm -f -r $WXSRC/docs/html/wx/*.htm*
170 rm -f -r $WXSRC/docs/htb/wx.htb
171
172 echo Making HTML wxWidgets manual...
173 cd $WXSRC/docs/latex/wx
174 cp *.gif $WXSRC/docs/html/wx
175 tex2rtf manual.tex $WXSRC/docs/html/wx/wx.htm -twice -html
176
177 echo Making HTB wxWidgets manual...
178 cd $WXSRC/docs/html/wx
179 zip -q $WXSRC/docs/htb/wx.htb *.html *.gif *.hhp *.hhc *.hhk
180
181 echo Done making manuals.
182}
183
184init=""
185if [ "$1" = "" ]
186then
187 echo Usage: tardist wx-dir output-dir version
188 exit
189fi
190
191if [ "$2" = "" ]
192then
193 echo Usage: tardist wx-dir output-dir version
194 exit
195fi
196
197if [ "$3" = "" ]
198then
199 echo Usage: tardist wx-dir output-dir version
200 exit
201fi
202
203SPINWXALL=0
204SPINWXMAC=0
205SPINEVERYTHING=0
e8e59fe6 206SILENT=0
ad17c279
KO
207
208usage()
209{
210 echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]"
211 echo Options:
212 echo " --help Display this help message"
213 echo " --wxall Spin wxAll"
214 echo " --wxmac Spin wxMac"
215 echo " --all Spin EVERYTHING"
e8e59fe6 216 echo " --silent Don't ask for confirmation before running"
ad17c279
KO
217
218 exit 1
219}
220
221# Process command line options.
222shift 3
223for i in "$@"; do
224 case "$i" in
225 --wxall) SPINWXALL=1 ;;
226 --wxmac) SPINWXMAC=1 ;;
227 --all) SPINEVERYTHING=1 ;;
e8e59fe6 228 --silent) SILENT=1 ;;
ad17c279
KO
229 *)
230 usage
231 exit
232 ;;
233 esac
234done
235
e8e59fe6
KO
236if [ "$SILENT" = "0" ]; then
237 echo About to archive wxWidgets:
238 echo From $WXSRC
239 echo To $WXDEST
240 echo Version $WXVER
241 echo CTRL-C if this is not correct.
242 read dummy
243fi
ad17c279
KO
244
245doinit
246
247if [ "$SPINWXMAC" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
248 dospinwxmac
249fi
250
251if [ "$SPINWXALL" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
252 dospinwxall
253fi
254