]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tardist
Added another reference to adding the zip handler.
[wxWidgets.git] / distrib / msw / tardist
CommitLineData
33b64e6f
JS
1#!/bin/sh
2# tardist: make up a tar.gz distribution of wxWindows 2
3# Supply a source (e.g. ~/wx2) and destination (e.g. ~/wx2/deliver)
4
7a5e6267
JS
5# We can't use e.g. this:
6# ls `cat $SRC/distrib/msw/makefile.rsp` zip -@ -u $DEST/wxWindows-$VERSION-gen.zip
7# because there's not enough space on the command line, plus we need to ignore the
8# blank lines.
9
332b8edb
JS
10TAR=tar
11ARCH=`arch`
12if [ "$ARCH" = "ppc" ]; then
13 TAR=gnutar
14fi
15
7a5e6267
JS
16expandlines()
17{
18 toexpand=$1
19 outputfile=$2
20
21 rm -f $outputfile
22 touch $outputfile
23 for line in `cat $toexpand` ; do
84c9e2f8 24 if [ "$line" != "" ]; then
7a5e6267
JS
25 ls $line >> $outputfile
26 fi
8f8edad8
JS
27 uniq < $outputfile > /tmp/uniqtemp.txt
28 mv /tmp/uniqtemp.txt $outputfile
7a5e6267
JS
29 done
30}
31
32
33b64e6f 33init=""
84c9e2f8 34if [ "$1" = "" ]
33b64e6f 35then
84c9e2f8 36 echo Usage: tardist wx-dir output-dir version
33b64e6f
JS
37 exit
38fi
39
84c9e2f8 40if [ "$2" = "" ]
33b64e6f 41then
84c9e2f8 42 echo Usage: tardist wx-dir output-dir version
33b64e6f
JS
43 exit
44fi
45
84c9e2f8
JS
46if [ "$3" = "" ]
47then
48 echo Usage: tardist wx-dir output-dir version
49 exit
50fi
51
52WXVER=$3
53
33b64e6f
JS
54echo About to archive wxWindows:
55echo From $1
56echo To $2
57echo CTRL-C if this is not correct.
58read dummy
59
60cd $1
61
62echo Removing backup files...
63rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~
64
2c7b88e6 65rm -f $2/wx*-${WXVER}*.tar.gz
33b64e6f 66
c9b3918a
JS
67# Copy setup files
68cp $1/include/wx/os2/setup0.h $1/include/wx/os2/setup.h
69cp $1/include/wx/msw/setup0.h $1/include/wx/msw/setup.h
70
33b64e6f
JS
71echo Tarring...
72
b69f1bd1 73### Generic
94d86127
JS
74#cat $1/distrib/msw/generic.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/makefile.rsp > /tmp/wxgen_in.txt
75#expandlines /tmp/wxgen_in.txt /tmp/wxgen.txt
76#$TAR cf $2/wxWindows-${WXVER}-gen.tar -T /tmp/wxgen.txt
77#gzip $2/wxWindows-${WXVER}-gen.tar
78#mv $2/wxWindows-${WXVER}-gen.tar.gz $2/wxWindows-${WXVER}-gen.tgz
b69f1bd1 79
33b64e6f 80### wxGTK
94d86127 81cd $1
332b8edb 82cat $1/distrib/msw/generic.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/gtk.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxgtk_in.txt
8f8edad8 83expandlines /tmp/wxgtk_in.txt /tmp/wxgtk.txt
332b8edb
JS
84$TAR cf $2/wxGTK-${WXVER}.tar -T /tmp/wxgtk.txt
85
86echo Re-tarring wxGTK in a subdirectory...
87cd $2
88mkdir wxWindows-${WXVER}
89cd wxWindows-${WXVER}
90$TAR xf ../wxGTK-${WXVER}.tar
91cd ..
92rm -f wxGTK-${WXVER}.tar
93$TAR cf $2/wxGTK-${WXVER}.tar wxWindows-${WXVER}/*
94rm -f -r wxWindows-${WXVER}
d7dcb939 95gzip $2/wxGTK-${WXVER}.tar
33b64e6f
JS
96
97### wxMotif
d7ada452 98cd $1
8f8edad8
JS
99cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmotif_in.txt
100expandlines /tmp/wxmotif_in.txt /tmp/wxmotif.txt
332b8edb
JS
101$TAR cf $2/wxMotif-${WXVER}.tar -T /tmp/wxmotif.txt
102
103echo Re-tarring wxMotif in a subdirectory...
104cd $2
105mkdir wxWindows-${WXVER}
106cd wxWindows-${WXVER}
107$TAR xf ../wxMotif-${WXVER}.tar
108cd ..
109rm -f wxMotif-${WXVER}.tar
110$TAR cf $2/wxMotif-${WXVER}.tar wxWindows-${WXVER}/*
111rm -f -r wxWindows-${WXVER}
d7dcb939 112gzip $2/wxMotif-${WXVER}.tar
33b64e6f 113
4869c7db 114### wxX11: combined wxMotif and wxX11 distributions
d7ada452 115cd $1
8f8edad8
JS
116cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxx11_in.txt
117expandlines /tmp/wxx11_in.txt /tmp/wxx11.txt
332b8edb
JS
118$TAR cf $2/wxX11-${WXVER}.tar -T /tmp/wxx11.txt
119
120echo Re-tarring wxX11 in a subdirectory...
121cd $2
122mkdir wxWindows-${WXVER}
123cd wxWindows-${WXVER}
124$TAR xf ../wxX11-${WXVER}.tar
125cd ..
126rm -f wxX11-${WXVER}.tar
127$TAR cf $2/wxX11-${WXVER}.tar wxWindows-${WXVER}/*
128rm -f -r wxWindows-${WXVER}
2c7b88e6 129gzip $2/wxX11-${WXVER}.tar
c2ff68d3 130
13bf613e 131### wxMSW
d7ada452 132# cd $1
8f8edad8
JS
133# cat $1/distrib/msw/msw.rsp $1/distrib/msw/vc.rsp $1/distrib/msw/bc.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmsw_in.txt
134# expandlines /tmp/wxmsw_in.txt /tmp/wxmsw.txt
332b8edb 135# $TAR cf $2/wxMSW-${WXVER}.tar -T /tmp/wxmsw.txt
4869c7db 136# gzip $2/wxMSW-${WXVER}.tar
13bf613e 137
38be1092 138### wxMac
c9b3918a 139cp $1/include/wx/mac/setup0.h $1/include/wx/setup.h
d7ada452 140cd $1
fde719f9 141cat $1/distrib/msw/mac.rsp $1/distrib/msw/generic.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmac_in.txt
8f8edad8 142expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt
332b8edb
JS
143$TAR cf $2/wxMac-${WXVER}.tar -T /tmp/wxmac.txt
144
c9b3918a
JS
145rm -f $1/include/wx/setup.h
146
332b8edb
JS
147echo Re-tarring wxMac in a subdirectory...
148cd $2
149mkdir wxWindows-${WXVER}
150cd wxWindows-${WXVER}
151$TAR xf ../wxMac-${WXVER}.tar
94d86127 152rm -f -r contrib/src/mmedia contrib/samples/mmedia
332b8edb
JS
153cd ..
154rm -f wxMac-${WXVER}.tar
155$TAR cf $2/wxMac-${WXVER}.tar wxWindows-${WXVER}/*
156rm -f -r wxWindows-${WXVER}
38be1092
JS
157gzip $2/wxMac-${WXVER}.tar
158
33b64e6f 159### Doc sources
94d86127
JS
160#cd $1
161#cat $1/distrib/msw/docsrc.rsp > /tmp/docsrc_in.txt
162#expandlines /tmp/docsrc_in.txt /tmp/docsrc.txt
163#$TAR cf $2/wxWindows-${WXVER}-doc.tar -T /tmp/docsrc.txt
164#
165#echo Re-tarring docs in a subdirectory...
166#cd $2
167#mkdir wxWindows-${WXVER}
168#cd wxWindows-${WXVER}
169#$TAR xf ../wxWindows-${WXVER}-doc.tar
170#cd ..
171#rm -f wxWindows-${WXVER}-doc.tar
172#$TAR cf $2/wxWindows-${WXVER}-doc.tar wxWindows-${WXVER}/*
173#rm -f -r wxWindows-${WXVER}
174#gzip $2/wxWindows-${WXVER}-doc.tar
33b64e6f
JS
175
176### HTML docs
d7ada452 177cd $1
8f8edad8
JS
178cat $1/distrib/msw/wx_html.rsp > /tmp/html_in.txt
179expandlines /tmp/html_in.txt /tmp/html.txt
e492150d 180$TAR cf $2/wxWindows-${WXVER}-HTML.tar -T /tmp/html.txt
332b8edb
JS
181
182echo Re-tarring HTML in a subdirectory...
183cd $2
184mkdir wxWindows-${WXVER}
185cd wxWindows-${WXVER}
e492150d 186$TAR xf ../wxWindows-${WXVER}-HTML.tar
332b8edb 187cd ..
e492150d
JS
188rm -f wxWindows-${WXVER}-HTML.tar
189$TAR cf $2/wxWindows-${WXVER}-HTML.tar wxWindows-${WXVER}/*
332b8edb 190rm -f -r wxWindows-${WXVER}
e492150d 191gzip $2/wxWindows-${WXVER}-HTML.tar
33b64e6f 192
94d86127
JS
193### HTB docs
194cd $1
195cat $1/distrib/msw/wx_htb.rsp > /tmp/htb_in.txt
196expandlines /tmp/htb_in.txt /tmp/htb.txt
e492150d 197$TAR cf $2/wxWindows-${WXVER}-HTB.tar -T /tmp/htb.txt
94d86127
JS
198
199echo Re-tarring HTB in a subdirectory...
200cd $2
201mkdir wxWindows-${WXVER}
202cd wxWindows-${WXVER}
e492150d 203$TAR xf ../wxWindows-${WXVER}-HTB.tar
94d86127 204cd ..
e492150d
JS
205rm -f wxWindows-${WXVER}-HTB.tar
206$TAR cf $2/wxWindows-${WXVER}-HTB.tar wxWindows-${WXVER}/*
94d86127 207rm -f -r wxWindows-${WXVER}
e492150d 208gzip $2/wxWindows-${WXVER}-HTB.tar
94d86127 209
33b64e6f 210### PDF docs
d7ada452 211cd $1
8f8edad8
JS
212cat $1/distrib/msw/wx_pdf.rsp > /tmp/pdf_in.txt
213expandlines /tmp/pdf_in.txt /tmp/pdf.txt
e492150d 214$TAR cf $2/wxWindows-${WXVER}-PDF.tar -T /tmp/pdf.txt
332b8edb
JS
215
216echo Re-tarring PDF in a subdirectory...
217cd $2
218mkdir wxWindows-${WXVER}
219cd wxWindows-${WXVER}
e492150d 220$TAR xf ../wxWindows-${WXVER}-PDF.tar
332b8edb 221cd ..
e492150d
JS
222rm -f wxWindows-${WXVER}-PDF.tar
223$TAR cf $2/wxWindows-${WXVER}-PDF.tar wxWindows-${WXVER}/*
332b8edb 224rm -f -r wxWindows-${WXVER}
e492150d 225gzip $2/wxWindows-${WXVER}-PDF.tar
33b64e6f 226
33b64e6f 227### Tex2RTF
94d86127
JS
228#cd $1
229#cat $1/distrib/msw/tex2rtf.rsp > /tmp/tex2rtf_in.txt
230#expandlines /tmp/tex2rtf_in.txt /tmp/tex2rtf.txt
231#$TAR cf $2/wxWindows-${WXVER}-tex2rtf.tar -T /tmp/tex2rtf.txt
232#
233#echo Re-tarring Tex2RTF in a subdirectory...
234#cd $2
235#mkdir wxWindows-${WXVER}
236#cd wxWindows-${WXVER}
237#$TAR xf ../wxWindows-${WXVER}-tex2rtf.tar
238#cd ..
239#rm -f wxWindows-${WXVER}-tex2rtf.tar
240#$TAR cf $2/wxWindows-${WXVER}-tex2rtf.tar wxWindows-${WXVER}/*
241#rm -f -r wxWindows-${WXVER}
242#gzip $2/wxWindows-${WXVER}-tex2rtf.tar
33b64e6f
JS
243
244### OGL
94d86127
JS
245#cd $1
246#cat $1/distrib/msw/ogl.rsp > /tmp/ogl_in.txt
247#expandlines /tmp/ogl_in.txt /tmp/ogl.txt
248#$TAR cf $2/wxWindows-${WXVER}-ogl.tar -T /tmp/ogl.txt
249#
250#echo Re-tarring OGL in a subdirectory...
251#cd $2
252#mkdir wxWindows-${WXVER}
253#cd wxWindows-${WXVER}
254#$TAR xf ../wxWindows-${WXVER}-ogl.tar
255#cd ..
256#rm -f wxWindows-${WXVER}-ogl.tar
257#$TAR cf $2/wxWindows-${WXVER}-ogl.tar wxWindows-${WXVER}/*
258#rm -f -r wxWindows-${WXVER}
259#gzip $2/wxWindows-${WXVER}-ogl.tar
33b64e6f 260
75737d05 261### JPEG
94d86127
JS
262#cd $1
263#cat $1/distrib/msw/jpeg.rsp > /tmp/jpeg_in.txt
264#expandlines /tmp/jpeg_in.txt /tmp/jpeg.txt
265#$TAR cf $2/wxWindows-${WXVER}-jpeg.tar -T /tmp/jpeg.txt
266#
267#echo Re-tarring jpeg in a subdirectory...
268#cd $2
269#mkdir wxWindows-${WXVER}
270#cd wxWindows-${WXVER}
271#$TAR xf ../wxWindows-${WXVER}-jpeg.tar
272#cd ..
273#rm -f wxWindows-${WXVER}-jpeg.tar
274#$TAR cf $2/wxWindows-${WXVER}-jpeg.tar wxWindows-${WXVER}/*
275#rm -f -r wxWindows-${WXVER}
276#gzip $2/wxWindows-${WXVER}-jpeg.tar
75737d05 277
f6bcfd97 278### TIFF
94d86127
JS
279#cd $1
280#cat $1/distrib/msw/tiff.rsp > /tmp/tiff_in.txt
281#expandlines /tmp/tiff_in.txt /tmp/tiff.txt
282#$TAR cf $2/wxWindows-${WXVER}-tiff.tar -T /tmp/tiff.txt
283#
284#echo Re-tarring docs in a subdirectory...
285#cd $2
286#mkdir wxWindows-${WXVER}
287#cd wxWindows-${WXVER}
288#$TAR xf ../wxWindows-${WXVER}-tiff.tar
289#cd ..
290#rm -f wxWindows-${WXVER}-tiff.tar
291#$TAR cf $2/wxWindows-${WXVER}-tiff.tar wxWindows-${WXVER}/*
292#rm -f -r wxWindows-${WXVER}
293#gzip $2/wxWindows-${WXVER}-tiff.tar
2c7b88e6
JS
294
295# Copy readme and other files
d7ada452 296cd $1
4869c7db
JS
297cp $1/docs/readme.txt $2/readme-${WXVER}.txt
298cp $1/docs/changes.txt $2/changes-${WXVER}.txt
332b8edb
JS
299cp $1/docs/mgl/readme.txt $2/readme-mgl-${WXVER}.txt
300cp $1/docs/mgl/install.txt $2/install-mgl-${WXVER}.txt
301cp $1/docs/x11/readme.txt $2/readme-x11-${WXVER}.txt
302cp $1/docs/x11/readme-nanox.txt $2/readme-nanox-${WXVER}.txt
303cp $1/docs/x11/install.txt $2/install-x11-${WXVER}.txt
304cp $1/docs/motif/readme.txt $2/readme-motif-${WXVER}.txt
305cp $1/docs/motif/install.txt $2/install-motif-${WXVER}.txt
306cp $1/docs/msw/readme.txt $2/readme-msw-${WXVER}.txt
307cp $1/docs/msw/install.txt $2/install-msw-${WXVER}.txt
308cp $1/docs/gtk/readme.txt $2/readme-gtk-${WXVER}.txt
309cp $1/docs/gtk/install.txt $2/install-gtk-${WXVER}.txt
310cp $1/docs/mac/readme.txt $2/readme-mac-${WXVER}.txt
311cp $1/docs/mac/install.txt $2/install-mac-${WXVER}.txt
312cp $1/docs/os2/install.txt $2/install-os2-${WXVER}.txt
f6bcfd97 313
33b64e6f 314echo Done!