]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/zipdist.sh
a temporary hack to make testing wxTLW/Univ easier
[wxWidgets.git] / distrib / msw / zipdist.sh
CommitLineData
5e0e6ceb 1#!/bin/sh
83b968da
JS
2
3# Zip up an external, generic + Windows distribution of wxWindows 2
5e0e6ceb
JS
4SRC=`cygpath -u $WXWIN`
5DEST=$SRC/deliver
6WISE=0
7WISEONLY=0
8# If your zip accepts Cygwin-style paths, then
9# use cygpath, else substitute echo
10CYGPATHPROG=cygpath
11#CYGPATHPROG=echo
83b968da
JS
12
13# Set this to the required version
5e0e6ceb 14VERSION=2.3.0
83b968da
JS
15
16dowise()
17{
5e0e6ceb 18 cd $DEST
83b968da
JS
19
20 # Unzip the Windows files into 'wx'
5e0e6ceb 21 mkdir $DEST/wx
83b968da
JS
22
23 # After this change of directory, we're in the
24 # temporary 'wx' directory and not acting on
25 # the source wxWindows directory.
5e0e6ceb
JS
26 cd $DEST/wx
27 unzip -o `$CYGPATHPROG -w ../wxWindows-$VERSION-msw.zip`
28 unzip -o `$CYGPATHPROG -w ../wxWindows-$VERSION-gen.zip`
29 unzip -o `$CYGPATHPROG -w ../wxWindows-$VERSION-vc.zip`
30 unzip -o `$CYGPATHPROG -w ../wxWindows-$VERSION-bc.zip`
31 unzip -o `$CYGPATHPROG -w ../wxWindows-$VERSION-HTMLHelp.zip`
32 unzip -o `$CYGPATHPROG -w ../extradoc.zip`
83b968da 33 # Need Word file, for Remstar DB classes
5e0e6ceb
JS
34 unzip -o `$CYGPATHPROG -w ../wxWindows-$VERSION-Word.zip`
35 unzip -o `$CYGPATHPROG -w ../ogl3.zip`
36 unzip -o `$CYGPATHPROG -w ../jpeg.zip`
37 unzip -o `$CYGPATHPROG -w ../tiff.zip`
38 unzip -o `$CYGPATHPROG -w ../tex2rtf2.zip`
83b968da
JS
39
40 # Now delete a few files that are unnecessary
41 # attrib -R *
42 rm -f BuildCVS.txt *.in *.spec *.guess *.sub mkinstalldirs modules install-sh *.sh descrip.mms
43 rm -f configure samples/configure samples/*.in demos/configure demos/*.in contrib/configure contrib/*.in
44 rm -f setup.h.in setup.h_vms
45 rm -f -r Makefile.in
46 rm -f docs/html/wxbook.htm docs/html/roadmap.htm
47 rm -f contrib/docs/winhelp/mmedia.*
48 rm -f contrib/docs/winhelp/stc.*
49 rm -f contrib/docs/htmlhelp/mmedia.*
50 rm -f contrib/docs/htmlhelp/stc.*
51 rm -f contrib/docs/pdf/*.*
1620f478 52 rm -f -r contrib/docs/latex/ogl
5e0e6ceb 53 rm -f SRC/mingegcs.bat
83b968da
JS
54 rm -f distrib
55
56 # Now copy some binary files to 'bin'
57 mkdir bin
5e0e6ceb
JS
58 cp $SRC/bin/dialoged.exe bin
59 cp $SRC/bin/tex2rtf.exe bin
60 cp $SRC/bin/dbgview.* bin
61 cp $SRC/bin/life.exe bin
62 cp $SRC/docs/winhelp/dialoged.hlp $SRC/docs/winhelp/dialoged.cnt bin
63 cp $SRC/docs/winhelp/tex2rtf.hlp $SRC/docs/winhelp/tex2rtf.cnt bin
83b968da
JS
64
65 # Make wxMSW-xxx.zip
5e0e6ceb 66 zip -r `$CYGPATHPROG -w ../wxMSW-$VERSION.zip` *
83b968da
JS
67
68 # Time to regenerate the WISE install script, wxwin2.wse.
69 # NB: if you've changed wxwin2.wse using WISE, call splitwise.exe
70 # from within distrib/msw, to split off wisetop.txt and wisebott.txt.
71 echo Calling 'makewise' to generate wxwin2.wse...
72
73a2995f 73 sh $WXWIN/distrib/msw/makewise.sh
83b968da 74
5e0e6ceb 75 rm -f $DEST/setup.*
83b968da
JS
76
77 # Now invoke WISE install on the new wxwin2.wse
78 echo Invoking WISE...
1620f478 79 /c/progra~1/wise/wise32.exe /C $WXWIN\\distrib\\msw\\wxwin2.wse
83b968da
JS
80 echo Press return to continue with the wxWindows distribution...
81 read dummy
82
5e0e6ceb 83 cd $DEST
83b968da
JS
84
85 # tidy up capitalisation of filenames
86 mv setup.EXE s
87 mv s setup.exe
88
89 mv setup.w02 s
90 mv s setup.w02
91
92 mv setup.w03 s
93 mv s setup.w03
94
95 mv setup.w04 s
96 mv s setup.w04
97
98 mv setup.w05 s
99 mv s setup.w05
100
101 mv setup.w06 s
102 mv s setup.w06
103
104 mv setup.w07 s
105 mv s setup.w07
106
107 mv setup.w08 s
108 mv s setup.w08
109
1620f478
JS
110 mv setup.w09 s
111 mv s setup.w09
112
83b968da 113 # Put all the setup files into a single zip archive.
5e0e6ceb 114 zip wxMSW-$VERSION-setup.zip readme.txt setup.*
83b968da
JS
115}
116
73a2995f
JS
117expandlines()
118{
119 toexpand=$1
120 outputfile=$2
121
122 rm -f $outputfile
123 touch $outputfile
124 for line in `cat $toexpand` ; do
125 if [ $line != "" ]; then
126 ls $line >> $outputfile
127 fi
128 done
129}
83b968da
JS
130
131# Process command line options.
132for i in "$@"; do
133 case "$i" in
5e0e6ceb
JS
134 --wise) WISE=1 ;;
135 --wiseonly) WISEONLY=1 ;;
83b968da
JS
136 *)
137 echo Usage: $0 "[ options ]" 1>&2
138 echo Options:
139 echo " --help Display this help message"
9bb0d1b5
JS
140 echo " --wise Also build setup.exe and wxMSW-version.zip"
141 echo " --wiseonly Build setup.exe and wxMSW-version.zip only"
83b968da
JS
142 exit 1
143 ;;
144 esac
145done
146
5e0e6ceb
JS
147if [ ! -d "$SRC" ]; then
148 echo $SRC not found.
83b968da
JS
149 exit 1
150fi
151
5e0e6ceb
JS
152if [ ! -d "$DEST" ]; then
153 echo $DEST not found.
83b968da
JS
154 exit 1
155fi
156
5e0e6ceb 157echo Creating distribution in $DEST. Press return to continue.
83b968da
JS
158read dummy
159
5e0e6ceb 160if [ "$WISEONLY" != "0" ]; then
83b968da
JS
161 dowise
162 exit 0
163fi
164
165# Remove all existing files
5e0e6ceb
JS
166rm -f $DEST/wx*.zip
167rm -f $DEST/*.htb
168rm -f $DEST/ogl3.zip
169rm -f $DEST/tex2rtf2.zip
170rm -f $DEST/jpeg.zip
171rm -f $DEST/tiff.zip
172rm -f $DEST/dialoged.zip
173rm -f $DEST/utils.zip
174rm -f $DEST/extradoc.zip
175rm -f $DEST/*-win32.zip
176
177if [ ! -d "$DEST/wx" ]; then
178 rm -f -r $DEST/wx
83b968da
JS
179fi
180
181
5e0e6ceb 182cd $SRC
83b968da
JS
183echo Zipping...
184
185# Below is the old-style separated-out format. This is retained only
186# for local use, and for creating wxMSW-xxx.zip.
73a2995f
JS
187
188# We can't use e.g. this:
5e0e6ceb 189# ls `cat $SRC/distrib/msw/makefile.rsp` zip -@ -u $DEST/wxWindows-$VERSION-gen.zip
73a2995f
JS
190# because there's not enough space on the command line, plus we need to ignore the
191# blank lines.
192
5e0e6ceb
JS
193expandlines $SRC/distrib/msw/generic.rsp temp.txt
194zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-gen.zip` < temp.txt
73a2995f 195
5e0e6ceb
JS
196expandlines $SRC/distrib/msw/makefile.rsp temp.txt
197zip -@ -u `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-gen.zip` < temp.txt
73a2995f 198
5e0e6ceb
JS
199expandlines $SRC/distrib/msw/msw.rsp temp.txt
200zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-msw.zip` < temp.txt
73a2995f 201
5e0e6ceb
JS
202expandlines $SRC/distrib/msw/makefile.rsp temp.txt
203zip -@ -u `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-msw.zip` < temp.txt
73a2995f 204
5e0e6ceb
JS
205expandlines $SRC/distrib/msw/gtk.rsp temp.txt
206zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-gtk.zip` < temp.txt
73a2995f 207
5e0e6ceb
JS
208expandlines $SRC/distrib/msw/makefile.rsp temp.txt
209zip -@ -u `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-gtk.zip` < temp.txt
73a2995f 210
5e0e6ceb
JS
211expandlines $SRC/distrib/msw/stubs.rsp temp.txt
212zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-stubs.zip` < temp.txt
73a2995f 213
5e0e6ceb
JS
214expandlines $SRC/distrib/msw/motif.rsp temp.txt
215zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-mot.zip` < temp.txt
73a2995f 216
5e0e6ceb
JS
217expandlines $SRC/distrib/msw/makefile.rsp temp.txt
218zip -@ -u `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-mot.zip` < temp.txt
73a2995f
JS
219
220
5e0e6ceb
JS
221expandlines $SRC/distrib/msw/docsrc.rsp temp.txt
222zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-DocSource.zip` < temp.txt
73a2995f 223
5e0e6ceb
JS
224expandlines $SRC/distrib/msw/wx_hlp.rsp temp.txt
225zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-WinHelp.zip` < temp.txt
73a2995f 226
5e0e6ceb
JS
227expandlines $SRC/distrib/msw/wx_html.rsp temp.txt
228zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-HTML.zip` < temp.txt
73a2995f 229
5e0e6ceb
JS
230expandlines $SRC/distrib/msw/wx_pdf.rsp temp.txt
231zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-PDF.zip` < temp.txt
73a2995f 232
5e0e6ceb
JS
233expandlines $SRC/distrib/msw/wx_word.rsp temp.txt
234zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-Word.zip` < temp.txt
73a2995f 235
5e0e6ceb
JS
236expandlines $SRC/distrib/msw/wx_htb.rsp temp.txt
237zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-HTB.zip` < temp.txt
73a2995f 238
5e0e6ceb
JS
239expandlines $SRC/distrib/msw/wx_chm.rsp temp.txt
240zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-HTMLHelp.zip` < temp.txt
83b968da
JS
241
242# PDF/HTML docs that should go into the Windows setup because
243# there are no WinHelp equivalents
5e0e6ceb
JS
244expandlines $SRC/distrib/msw/extradoc.rsp temp.txt
245zip -@ `$CYGPATHPROG -w $DEST/extradoc.zip` < temp.txt
83b968da
JS
246
247# VC++ project files
5e0e6ceb
JS
248expandlines $SRC/distrib/msw/vc.rsp temp.txt
249zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-vc.zip` < temp.txt
83b968da
JS
250
251# BC++ project files
5e0e6ceb
JS
252expandlines $SRC/distrib/msw/bc.rsp temp.txt
253zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-bc.zip` < temp.txt
83b968da
JS
254
255# CodeWarrior project files
5e0e6ceb
JS
256expandlines $SRC/distrib/msw/cw.rsp temp.txt
257zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-cw.zip` < temp.txt
83b968da
JS
258
259# OGL 3
5e0e6ceb
JS
260expandlines $SRC/distrib/msw/ogl.rsp temp.txt
261zip -@ `$CYGPATHPROG -w $DEST/ogl3.zip` < temp.txt
83b968da
JS
262
263# MMedia
5e0e6ceb
JS
264expandlines $SRC/distrib/msw/mmedia.rsp temp.txt
265zip -@ `$CYGPATHPROG -w $DEST/mmedia.zip` < temp.txt
83b968da
JS
266
267# STC (Scintilla widget)
5e0e6ceb
JS
268expandlines $SRC/distrib/msw/stc.rsp temp.txt
269zip -@ `$CYGPATHPROG -w $DEST/stc.zip` < temp.txt
83b968da
JS
270
271# Tex2RTF
5e0e6ceb
JS
272expandlines $SRC/distrib/msw/tex2rtf.rsp temp.txt
273zip -@ `$CYGPATHPROG -w $DEST/tex2rtf2.zip` < temp.txt
83b968da
JS
274
275# JPEG source
5e0e6ceb
JS
276expandlines $SRC/distrib/msw/jpeg.rsp temp.txt
277zip -@ `$CYGPATHPROG -w $DEST/jpeg.zip` < temp.txt
83b968da
JS
278
279# TIFF source
5e0e6ceb
JS
280expandlines $SRC/distrib/msw/tiff.rsp temp.txt
281zip -@ `$CYGPATHPROG -w $DEST/tiff.zip` < temp.txt
83b968da
JS
282
283# Dialog Editor source and binary
5e0e6ceb
JS
284rm -f $DEST/dialoged_source.zip
285expandlines $SRC/distrib/msw/dialoged.rsp temp.txt
286zip -@ `$CYGPATHPROG -w $DEST/dialoged_source.zip` < temp.txt
287zip -j `$CYGPATHPROG -w $DEST/dialoged.zip` $DEST/dialoged_source.zip $SRC/bin/dialoged.exe $SRC/docs/winhelp/dialoged.hlp $SRC/docs/winhelp/dialoged.cnt
288rm -f $DEST/dialoged_source.zip
83b968da
JS
289
290# Misc. utils not in the main distribution
5e0e6ceb
JS
291expandlines $SRC/distrib/msw/utils.rsp temp.txt
292zip -@ `$CYGPATHPROG -w $DEST/utils.zip` < temp.txt
293expandlines $SRC/distrib/msw/utilmake.rsp temp.txt
294zip -@ -u `$CYGPATHPROG -w $DEST/utilmake.zip` < temp.txt
73a2995f
JS
295
296rm -f temp.txt
83b968da 297
1620f478
JS
298# Make dialoged-win32.zip and tex2rtf-win32.zip
299
5e0e6ceb
JS
300cd $SRC/bin
301
302zip `$CYGPATHPROG -w $DEST/dialoged-win32.zip` dialoged.*
303zip `$CYGPATHPROG -w $DEST/tex2rtf-win32.zip` tex2rtf.*
304
305cp $SRC/docs/changes.txt $DEST
306cp $SRC/docs/msw/install.txt $DEST/install_msw.txt
307cp $SRC/docs/motif/install.txt $DEST/install_motif.txt
308cp $SRC/docs/gtk/install.txt $DEST/install_gtk.txt
309cp $SRC/docs/readme.txt $DEST
310cp $SRC/docs/motif/readme.txt $DEST/readme_motif.txt
311cp $SRC/docs/gtk/readme.txt $DEST/readme_gtk.txt
312cp $SRC/docs/msw/readme.txt $DEST/readme_msw.txt
313cp $SRC/docs/readme_vms.txt $DEST
314cp $SRC/docs/motif/makewxmotif $DEST
315cp $SRC/docs/gtk/makewxgtk $DEST
316
317# Skip WISE setup if WISE is 0.
318if [ "$WISE" = "1" ]; then
83b968da
JS
319 dowise
320fi
321
322echo wxWindows archived.
323