]>
Commit | Line | Data |
---|---|---|
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 |
10 | TAR=tar |
11 | ARCH=`arch` | |
12 | if [ "$ARCH" = "ppc" ]; then | |
13 | TAR=gnutar | |
14 | fi | |
15 | ||
7a5e6267 JS |
16 | expandlines() |
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 | 33 | init="" |
84c9e2f8 | 34 | if [ "$1" = "" ] |
33b64e6f | 35 | then |
84c9e2f8 | 36 | echo Usage: tardist wx-dir output-dir version |
33b64e6f JS |
37 | exit |
38 | fi | |
39 | ||
84c9e2f8 | 40 | if [ "$2" = "" ] |
33b64e6f | 41 | then |
84c9e2f8 | 42 | echo Usage: tardist wx-dir output-dir version |
33b64e6f JS |
43 | exit |
44 | fi | |
45 | ||
84c9e2f8 JS |
46 | if [ "$3" = "" ] |
47 | then | |
48 | echo Usage: tardist wx-dir output-dir version | |
49 | exit | |
50 | fi | |
51 | ||
52 | WXVER=$3 | |
53 | ||
33b64e6f JS |
54 | echo About to archive wxWindows: |
55 | echo From $1 | |
56 | echo To $2 | |
57 | echo CTRL-C if this is not correct. | |
58 | read dummy | |
59 | ||
60 | cd $1 | |
61 | ||
62 | echo Removing backup files... | |
63 | rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~ | |
64 | ||
2c7b88e6 | 65 | rm -f $2/wx*-${WXVER}*.tar.gz |
33b64e6f | 66 | |
c9b3918a | 67 | # Copy setup files |
af8fe023 | 68 | cp $1/include/wx/os2/SETUP0.H $1/include/wx/os2/setup.h |
c9b3918a JS |
69 | cp $1/include/wx/msw/setup0.h $1/include/wx/msw/setup.h |
70 | ||
33b64e6f JS |
71 | echo 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 | 81 | cd $1 |
332b8edb | 82 | cat $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 | 83 | expandlines /tmp/wxgtk_in.txt /tmp/wxgtk.txt |
332b8edb JS |
84 | $TAR cf $2/wxGTK-${WXVER}.tar -T /tmp/wxgtk.txt |
85 | ||
86 | echo Re-tarring wxGTK in a subdirectory... | |
87 | cd $2 | |
88 | mkdir wxWindows-${WXVER} | |
89 | cd wxWindows-${WXVER} | |
90 | $TAR xf ../wxGTK-${WXVER}.tar | |
91 | cd .. | |
92 | rm -f wxGTK-${WXVER}.tar | |
93 | $TAR cf $2/wxGTK-${WXVER}.tar wxWindows-${WXVER}/* | |
94 | rm -f -r wxWindows-${WXVER} | |
d7dcb939 | 95 | gzip $2/wxGTK-${WXVER}.tar |
33b64e6f JS |
96 | |
97 | ### wxMotif | |
d7ada452 | 98 | cd $1 |
8f8edad8 JS |
99 | cat $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 |
100 | expandlines /tmp/wxmotif_in.txt /tmp/wxmotif.txt | |
332b8edb JS |
101 | $TAR cf $2/wxMotif-${WXVER}.tar -T /tmp/wxmotif.txt |
102 | ||
103 | echo Re-tarring wxMotif in a subdirectory... | |
104 | cd $2 | |
105 | mkdir wxWindows-${WXVER} | |
106 | cd wxWindows-${WXVER} | |
107 | $TAR xf ../wxMotif-${WXVER}.tar | |
108 | cd .. | |
109 | rm -f wxMotif-${WXVER}.tar | |
110 | $TAR cf $2/wxMotif-${WXVER}.tar wxWindows-${WXVER}/* | |
111 | rm -f -r wxWindows-${WXVER} | |
d7dcb939 | 112 | gzip $2/wxMotif-${WXVER}.tar |
33b64e6f | 113 | |
4869c7db | 114 | ### wxX11: combined wxMotif and wxX11 distributions |
d7ada452 | 115 | cd $1 |
8f8edad8 JS |
116 | cat $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 |
117 | expandlines /tmp/wxx11_in.txt /tmp/wxx11.txt | |
332b8edb JS |
118 | $TAR cf $2/wxX11-${WXVER}.tar -T /tmp/wxx11.txt |
119 | ||
120 | echo Re-tarring wxX11 in a subdirectory... | |
121 | cd $2 | |
122 | mkdir wxWindows-${WXVER} | |
123 | cd wxWindows-${WXVER} | |
124 | $TAR xf ../wxX11-${WXVER}.tar | |
125 | cd .. | |
126 | rm -f wxX11-${WXVER}.tar | |
127 | $TAR cf $2/wxX11-${WXVER}.tar wxWindows-${WXVER}/* | |
128 | rm -f -r wxWindows-${WXVER} | |
2c7b88e6 | 129 | gzip $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 | 139 | cp $1/include/wx/mac/setup0.h $1/include/wx/setup.h |
d7ada452 | 140 | cd $1 |
fde719f9 | 141 | cat $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 | 142 | expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt |
332b8edb JS |
143 | $TAR cf $2/wxMac-${WXVER}.tar -T /tmp/wxmac.txt |
144 | ||
c9b3918a JS |
145 | rm -f $1/include/wx/setup.h |
146 | ||
332b8edb JS |
147 | echo Re-tarring wxMac in a subdirectory... |
148 | cd $2 | |
149 | mkdir wxWindows-${WXVER} | |
150 | cd wxWindows-${WXVER} | |
151 | $TAR xf ../wxMac-${WXVER}.tar | |
94d86127 | 152 | rm -f -r contrib/src/mmedia contrib/samples/mmedia |
332b8edb JS |
153 | cd .. |
154 | rm -f wxMac-${WXVER}.tar | |
155 | $TAR cf $2/wxMac-${WXVER}.tar wxWindows-${WXVER}/* | |
156 | rm -f -r wxWindows-${WXVER} | |
38be1092 JS |
157 | gzip $2/wxMac-${WXVER}.tar |
158 | ||
6b978929 JS |
159 | ### wxAll: all distributions in one giant archive |
160 | cd $1 | |
af8fe023 | 161 | cat $1/distrib/msw/generic.rsp $1/distrib/msw/msw.rsp $1/distrib/msw/vc.rsp $1/distrib/msw/cw.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/gtk.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/mac.rsp $1/distrib/msw/os2.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/mgl.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/utilmake.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/mmedia.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/stc.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 $1/distrib/msw/docsrc.rsp | uniq > /tmp/wxall_in.txt |
6b978929 JS |
162 | expandlines /tmp/wxall_in.txt /tmp/wxall.txt |
163 | $TAR cf $2/wxAll-${WXVER}.tar -T /tmp/wxall.txt | |
164 | ||
165 | echo Re-tarring wxAll in a subdirectory... | |
166 | cd $2 | |
167 | mkdir wxWindows-${WXVER} | |
168 | cd wxWindows-${WXVER} | |
169 | $TAR xf ../wxAll-${WXVER}.tar | |
170 | cd .. | |
171 | rm -f wxAll-${WXVER}.tar | |
172 | $TAR cf $2/wxAll-${WXVER}.tar wxWindows-${WXVER}/* | |
173 | rm -f -r wxWindows-${WXVER} | |
174 | gzip $2/wxAll-${WXVER}.tar | |
175 | ||
176 | ||
33b64e6f | 177 | ### Doc sources |
94d86127 JS |
178 | #cd $1 |
179 | #cat $1/distrib/msw/docsrc.rsp > /tmp/docsrc_in.txt | |
180 | #expandlines /tmp/docsrc_in.txt /tmp/docsrc.txt | |
181 | #$TAR cf $2/wxWindows-${WXVER}-doc.tar -T /tmp/docsrc.txt | |
182 | # | |
183 | #echo Re-tarring docs in a subdirectory... | |
184 | #cd $2 | |
185 | #mkdir wxWindows-${WXVER} | |
186 | #cd wxWindows-${WXVER} | |
187 | #$TAR xf ../wxWindows-${WXVER}-doc.tar | |
188 | #cd .. | |
189 | #rm -f wxWindows-${WXVER}-doc.tar | |
190 | #$TAR cf $2/wxWindows-${WXVER}-doc.tar wxWindows-${WXVER}/* | |
191 | #rm -f -r wxWindows-${WXVER} | |
192 | #gzip $2/wxWindows-${WXVER}-doc.tar | |
33b64e6f JS |
193 | |
194 | ### HTML docs | |
d7ada452 | 195 | cd $1 |
8f8edad8 JS |
196 | cat $1/distrib/msw/wx_html.rsp > /tmp/html_in.txt |
197 | expandlines /tmp/html_in.txt /tmp/html.txt | |
e492150d | 198 | $TAR cf $2/wxWindows-${WXVER}-HTML.tar -T /tmp/html.txt |
332b8edb JS |
199 | |
200 | echo Re-tarring HTML in a subdirectory... | |
201 | cd $2 | |
202 | mkdir wxWindows-${WXVER} | |
203 | cd wxWindows-${WXVER} | |
e492150d | 204 | $TAR xf ../wxWindows-${WXVER}-HTML.tar |
332b8edb | 205 | cd .. |
e492150d JS |
206 | rm -f wxWindows-${WXVER}-HTML.tar |
207 | $TAR cf $2/wxWindows-${WXVER}-HTML.tar wxWindows-${WXVER}/* | |
332b8edb | 208 | rm -f -r wxWindows-${WXVER} |
e492150d | 209 | gzip $2/wxWindows-${WXVER}-HTML.tar |
33b64e6f | 210 | |
94d86127 JS |
211 | ### HTB docs |
212 | cd $1 | |
213 | cat $1/distrib/msw/wx_htb.rsp > /tmp/htb_in.txt | |
214 | expandlines /tmp/htb_in.txt /tmp/htb.txt | |
e492150d | 215 | $TAR cf $2/wxWindows-${WXVER}-HTB.tar -T /tmp/htb.txt |
94d86127 JS |
216 | |
217 | echo Re-tarring HTB in a subdirectory... | |
218 | cd $2 | |
219 | mkdir wxWindows-${WXVER} | |
220 | cd wxWindows-${WXVER} | |
e492150d | 221 | $TAR xf ../wxWindows-${WXVER}-HTB.tar |
94d86127 | 222 | cd .. |
e492150d JS |
223 | rm -f wxWindows-${WXVER}-HTB.tar |
224 | $TAR cf $2/wxWindows-${WXVER}-HTB.tar wxWindows-${WXVER}/* | |
94d86127 | 225 | rm -f -r wxWindows-${WXVER} |
e492150d | 226 | gzip $2/wxWindows-${WXVER}-HTB.tar |
94d86127 | 227 | |
33b64e6f | 228 | ### PDF docs |
d7ada452 | 229 | cd $1 |
8f8edad8 JS |
230 | cat $1/distrib/msw/wx_pdf.rsp > /tmp/pdf_in.txt |
231 | expandlines /tmp/pdf_in.txt /tmp/pdf.txt | |
e492150d | 232 | $TAR cf $2/wxWindows-${WXVER}-PDF.tar -T /tmp/pdf.txt |
332b8edb JS |
233 | |
234 | echo Re-tarring PDF in a subdirectory... | |
235 | cd $2 | |
236 | mkdir wxWindows-${WXVER} | |
237 | cd wxWindows-${WXVER} | |
e492150d | 238 | $TAR xf ../wxWindows-${WXVER}-PDF.tar |
332b8edb | 239 | cd .. |
e492150d JS |
240 | rm -f wxWindows-${WXVER}-PDF.tar |
241 | $TAR cf $2/wxWindows-${WXVER}-PDF.tar wxWindows-${WXVER}/* | |
332b8edb | 242 | rm -f -r wxWindows-${WXVER} |
e492150d | 243 | gzip $2/wxWindows-${WXVER}-PDF.tar |
33b64e6f | 244 | |
33b64e6f | 245 | ### Tex2RTF |
94d86127 JS |
246 | #cd $1 |
247 | #cat $1/distrib/msw/tex2rtf.rsp > /tmp/tex2rtf_in.txt | |
248 | #expandlines /tmp/tex2rtf_in.txt /tmp/tex2rtf.txt | |
249 | #$TAR cf $2/wxWindows-${WXVER}-tex2rtf.tar -T /tmp/tex2rtf.txt | |
250 | # | |
251 | #echo Re-tarring Tex2RTF in a subdirectory... | |
252 | #cd $2 | |
253 | #mkdir wxWindows-${WXVER} | |
254 | #cd wxWindows-${WXVER} | |
255 | #$TAR xf ../wxWindows-${WXVER}-tex2rtf.tar | |
256 | #cd .. | |
257 | #rm -f wxWindows-${WXVER}-tex2rtf.tar | |
258 | #$TAR cf $2/wxWindows-${WXVER}-tex2rtf.tar wxWindows-${WXVER}/* | |
259 | #rm -f -r wxWindows-${WXVER} | |
260 | #gzip $2/wxWindows-${WXVER}-tex2rtf.tar | |
33b64e6f JS |
261 | |
262 | ### OGL | |
94d86127 JS |
263 | #cd $1 |
264 | #cat $1/distrib/msw/ogl.rsp > /tmp/ogl_in.txt | |
265 | #expandlines /tmp/ogl_in.txt /tmp/ogl.txt | |
266 | #$TAR cf $2/wxWindows-${WXVER}-ogl.tar -T /tmp/ogl.txt | |
267 | # | |
268 | #echo Re-tarring OGL in a subdirectory... | |
269 | #cd $2 | |
270 | #mkdir wxWindows-${WXVER} | |
271 | #cd wxWindows-${WXVER} | |
272 | #$TAR xf ../wxWindows-${WXVER}-ogl.tar | |
273 | #cd .. | |
274 | #rm -f wxWindows-${WXVER}-ogl.tar | |
275 | #$TAR cf $2/wxWindows-${WXVER}-ogl.tar wxWindows-${WXVER}/* | |
276 | #rm -f -r wxWindows-${WXVER} | |
277 | #gzip $2/wxWindows-${WXVER}-ogl.tar | |
33b64e6f | 278 | |
75737d05 | 279 | ### JPEG |
94d86127 JS |
280 | #cd $1 |
281 | #cat $1/distrib/msw/jpeg.rsp > /tmp/jpeg_in.txt | |
282 | #expandlines /tmp/jpeg_in.txt /tmp/jpeg.txt | |
283 | #$TAR cf $2/wxWindows-${WXVER}-jpeg.tar -T /tmp/jpeg.txt | |
284 | # | |
285 | #echo Re-tarring jpeg in a subdirectory... | |
286 | #cd $2 | |
287 | #mkdir wxWindows-${WXVER} | |
288 | #cd wxWindows-${WXVER} | |
289 | #$TAR xf ../wxWindows-${WXVER}-jpeg.tar | |
290 | #cd .. | |
291 | #rm -f wxWindows-${WXVER}-jpeg.tar | |
292 | #$TAR cf $2/wxWindows-${WXVER}-jpeg.tar wxWindows-${WXVER}/* | |
293 | #rm -f -r wxWindows-${WXVER} | |
294 | #gzip $2/wxWindows-${WXVER}-jpeg.tar | |
75737d05 | 295 | |
f6bcfd97 | 296 | ### TIFF |
94d86127 JS |
297 | #cd $1 |
298 | #cat $1/distrib/msw/tiff.rsp > /tmp/tiff_in.txt | |
299 | #expandlines /tmp/tiff_in.txt /tmp/tiff.txt | |
300 | #$TAR cf $2/wxWindows-${WXVER}-tiff.tar -T /tmp/tiff.txt | |
301 | # | |
302 | #echo Re-tarring docs in a subdirectory... | |
303 | #cd $2 | |
304 | #mkdir wxWindows-${WXVER} | |
305 | #cd wxWindows-${WXVER} | |
306 | #$TAR xf ../wxWindows-${WXVER}-tiff.tar | |
307 | #cd .. | |
308 | #rm -f wxWindows-${WXVER}-tiff.tar | |
309 | #$TAR cf $2/wxWindows-${WXVER}-tiff.tar wxWindows-${WXVER}/* | |
310 | #rm -f -r wxWindows-${WXVER} | |
311 | #gzip $2/wxWindows-${WXVER}-tiff.tar | |
2c7b88e6 JS |
312 | |
313 | # Copy readme and other files | |
d7ada452 | 314 | cd $1 |
4869c7db JS |
315 | cp $1/docs/readme.txt $2/readme-${WXVER}.txt |
316 | cp $1/docs/changes.txt $2/changes-${WXVER}.txt | |
332b8edb JS |
317 | cp $1/docs/mgl/readme.txt $2/readme-mgl-${WXVER}.txt |
318 | cp $1/docs/mgl/install.txt $2/install-mgl-${WXVER}.txt | |
319 | cp $1/docs/x11/readme.txt $2/readme-x11-${WXVER}.txt | |
320 | cp $1/docs/x11/readme-nanox.txt $2/readme-nanox-${WXVER}.txt | |
321 | cp $1/docs/x11/install.txt $2/install-x11-${WXVER}.txt | |
322 | cp $1/docs/motif/readme.txt $2/readme-motif-${WXVER}.txt | |
323 | cp $1/docs/motif/install.txt $2/install-motif-${WXVER}.txt | |
324 | cp $1/docs/msw/readme.txt $2/readme-msw-${WXVER}.txt | |
325 | cp $1/docs/msw/install.txt $2/install-msw-${WXVER}.txt | |
326 | cp $1/docs/gtk/readme.txt $2/readme-gtk-${WXVER}.txt | |
327 | cp $1/docs/gtk/install.txt $2/install-gtk-${WXVER}.txt | |
328 | cp $1/docs/mac/readme.txt $2/readme-mac-${WXVER}.txt | |
329 | cp $1/docs/mac/install.txt $2/install-mac-${WXVER}.txt | |
330 | cp $1/docs/os2/install.txt $2/install-os2-${WXVER}.txt | |
f6bcfd97 | 331 | |
33b64e6f | 332 | echo Done! |