3 # Make a distribution of an application on MSW.
5 # ../distrib/msw/makesetup.sh --wxmsw --verbose &> log
7 # If your zip accepts Cygwin-style paths, then
8 # use cygpath, else substitute echo
23 ##SCRIPTDIR=$WXWIN/distrib/scripts
24 .
$SCRIPTDIR/utils.inc
26 MANIFESTDIR
=$WXWIN/distrib
/scripts
/manifests
27 WEBFILES
=$WXWIN/..
/wxWebSite
28 if [ ! "$CYGPATH" = "" ]; then
29 WEBFILES
=`$CYGPATH "$WEBFILES"`
32 # Set this to the required version
33 if [ "$VERSION" = "" ]; then
42 contribfiles
="stc.rsp contrib.rsp ogl.rsp"
43 utilsfiles
="tex2rtf.rsp utils.rsp utilmake.rsp"
44 commonfiles
="generic.rsp jpeg.rsp tiff.rsp xml.rsp deprecated.rsp makefile.rsp $utilsfiles $contribfiles"
46 if [ ! $port = "base" ]; then
47 filelist
="$filelist $commonfiles"
50 if [ $port = "msw" ] || [ $port = "all" ]; then
51 filelist
="$filelist msw.rsp univ.rsp vc.rsp mmedia.rsp wince.rsp dmc.rsp"
54 if [ $port = "os2" ] || [ $port = "all" ]; then
55 filelist
="$filelist os2.rsp"
58 if [ $port = "x11" ] || [ $port = "all" ]; then
59 filelist
="$filelist x11.rsp"
62 if [ $port = "mgl" ] || [ $port = "all" ]; then
63 filelist
="$filelist mgl.rsp"
66 if [ $port = "gtk" ] || [ $port = "all" ]; then
67 filelist
="$filelist gtk.rsp"
70 if [ $port = "motif" ] || [ $port = "all" ]; then
71 filelist
="$filelist motif.rsp"
74 if [ $port = "mac" ] || [ $port = "all" ]; then
75 filelist
="$filelist mac.rsp cocoa.rsp"
78 if [ $port = "all" ]; then
79 filelist
="$filelist gtk1.rsp palmos.rsp docsrc.rsp"
82 tempfile
="/tmp/wx$port.files.in"
88 cat $filelist > $outfile
98 for line
in `cat $FILELIST` ; do
99 if [ "$line" != "" ]; then
100 subdir
=`dirname $line`
101 mkdir -p $DESTDIR/$subdir
102 cp -rf $APPDIR/$line $DESTDIR/$subdir
109 if [ "$VERBOSE" != "1" ]; then
127 # for all the others (DFB, GTK, MGL, MSW, X11) just use the
128 # upper-case version as they are abbreviations
129 portname
=`echo $port | tr '[a-z]' '[A-Z]'`;;
132 echo "Creating wx$portname distribution..."
135 portfiles
="/tmp/wx$port.files"
136 getfilelist
"$port" "$portfiles"
138 TMPFILESDIR
=/tmp
/wx
$port/wx
$portname-$VERSION
140 mkdir -p $TMPFILESDIR
142 copyfilelist
$portfiles $APPDIR $TMPFILESDIR
144 if [ $port = "msw" ]; then
145 FILES
=`find . -type f \( -path '*/CVS/*' -prune -o -exec ${SCRIPTDIR}/is_text.sh {} \; -print \)`
146 echo "$FILES" > /tmp
/textfiles
150 # use DOS line endings for text files for MSW archives.
151 if [ $port = "msw" ]; then
152 pushd /tmp
/wx
$port/wx
$portname-$VERSION
153 for file in `cat /tmp/textfiles`; do
158 echo "Creating wx$portname-$VERSION.zip..."
159 zip $ZIPFLAGS -r -9 $APPDIR/deliver
/wx
$portname-$VERSION.
zip .
160 echo "Creating wx$portname-$VERSION.tar.gz..."
161 tar czf
$APPDIR/deliver
/wx
$portname-$VERSION.
tar.gz wx
$portname-$VERSION
162 echo "Creating wx$portname-$VERSION.tar.bz2..."
163 tar ch wx
$portname-$VERSION | bzip2 -f9 > $APPDIR/deliver
/wx
$portname-$VERSION.
tar.bz2
173 echo Copying FAQ and other files from
$WEBFILES
174 cp $WEBFILES/site
/faq
*.htm
$APPDIR/docs
/html
175 cp $WEBFILES/site
/platform.htm
$APPDIR/docs
/html
176 cp $WEBFILES/site
/i18n.htm
$APPDIR/docs
/html
178 echo Copying readme files...
179 cp $APPDIR/docs
/msw
/readme.txt README
-MSW.txt
180 cp $APPDIR/docs
/msw
/install.txt INSTALL
-MSW.txt
181 cp $APPDIR/docs
/os
2/install.txt INSTALL
-OS2.txt
182 cp $APPDIR/docs
/licence.txt LICENCE.txt
183 cp $APPDIR/docs
/lgpl.txt COPYING.LIB
184 cp $APPDIR/docs
/changes.txt CHANGES.txt
185 cp $APPDIR/docs
/readme.txt README.txt
187 cp $APPDIR/docs
/mgl
/readme.txt
$APPDIR/readme
-mgl.txt
188 cp $APPDIR/docs
/mgl
/install.txt
$APPDIR/install-mgl.txt
190 cp $APPDIR/docs
/x
11/readme.txt
$APPDIR/readme
-x11.txt
191 cp $APPDIR/docs
/x
11/install.txt
$APPDIR/install-x11.txt
193 cp $APPDIR/docs
/motif
/readme.txt
$APPDIR/readme
-motif.txt
194 cp $APPDIR/docs
/motif
/install.txt
$APPDIR/install-motif.txt
196 cp $APPDIR/docs
/gtk
/readme.txt
$APPDIR/readme
-gtk.txt
197 cp $APPDIR/docs
/gtk
/install.txt
$APPDIR/install-gtk.txt
199 cp $APPDIR/docs
/mac
/readme.txt
$APPDIR/readme
-mac.txt
200 cp $APPDIR/docs
/mac
/install.txt
$APPDIR/install-mac.txt
202 cp $APPDIR/docs
/cocoa
/readme.txt
$APPDIR/readme
-cocoa.txt
203 cp $APPDIR/docs
/cocoa
/install.txt
$APPDIR/install-cocoa.txt
205 # Now delete a few files that are unnecessary
206 rm -f BuildCVS.txt descrip.mms
208 rm -f docs
/html
/wxbook.htm docs
/html
/roadmap.htm
209 rm -f -r contrib
/docs
/latex
/ogl
210 rm -f src
/mingegcs.bat
212 rm -f src
/gtk
/descrip.mms src
/motif
/descrip.mms
214 # Copy setup0.h files to setup.h
215 # OS/2 always built with configure now
216 # cp $APPDIR/include/wx/os2/setup0.h $APPDIR/include/wx/os2/setup.h
217 cp $APPDIR/include
/wx
/msw
/setup0.h
$APPDIR/include
/wx
/msw
/setup.h
218 cp $APPDIR/include
/wx
/univ
/setup0.h
$APPDIR/include
/wx
/univ
/setup.h
220 # Make MSW project files always have DOS line endings.
221 unix2dos
`cat $MANIFESTDIR/vc.rsp`
228 echo "Usage: $PROGNAME [ options ]" 1>&2
230 echo " --help Display this help message"
231 echo " --wxmac Build wxMac distribution"
232 echo " --wxmsw Build wxMSW distribution"
233 echo " --wxos2 Build wxOS2 distribution"
234 echo " --wxall Build wxAll zip distribution"
235 echo " --wxbase Build wxBase zip distribution"
236 echo " --all Build all distributions (the default)"
237 echo " --verbose Verbose zip operation"
241 # Process command line options.
246 --wxmac) SPINMAC
=1; SPINALL
=0 ;;
247 --wxmsw) SPINMSW
=1; SPINALL
=0 ;;
248 --wxos2) SPINOS2
=1; SPINALL
=0 ;;
249 --wxall) SPINWXALL
=1; SPINALL
=0 ;;
250 --wxbase) SPINBASE
=1; SPINALL
=0 ;;
251 --getmakefiles) GETMAKEFILES
=1; SPINALL
=0 ;;
252 --docs) SPINDOCS
=1; SPINALL
=0 ;;
254 --verbose) VERBOSE
=1 ;;
267 if [ "$SPINOS2" = "1" ] || [ "$SPINALL" = "1" ]; then
272 if [ "$SPINMSW" = "1" ] || [ "$SPINALL" = "1" ]; then
277 if [ "$SPINBASE" = "1" ] || [ "$SPINALL" = "1" ]; then
282 if [ "$SPINWXALL" = "1" ] || [ "$SPINALL" = "1" ]; then
286 if [ "$SPINALL" = "1" ]; then