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