]> git.saurik.com Git - wxWidgets.git/blame - wxPython/distrib/mac/wxPythonOSX/build
Combine the common installer package into the main package
[wxWidgets.git] / wxPython / distrib / mac / wxPythonOSX / build
CommitLineData
1e4a197e
RD
1#!/bin/sh -e
2#----------------------------------------------------------------------
3# Build wxMac and wxPythonOSX from the tarball and then make an
4# Installer package out of it.
5
6spectemplate=distrib/wxPythonFull.spec.in
7
8if [ ! -d wxPython -o ! -e ${spectemplate} ]; then
9 echo "Please run this script from the root wxPython directory."
10 exit 1
11fi
12
81de4ba3 13if [ "$UID" != "0" ]; then
132ae51e
RD
14 echo "-------------------------------------------------------"
15 echo " WARNING: will be unable to change ownership of files"
16 echo " unless this script is run as root or via sudo"
17 echo "-------------------------------------------------------"
18fi
19
1e4a197e
RD
20#----------------------------------------------------------------------
21# Check Parameters
22
23function usage {
24 echo ""
dd35b09a 25 echo "Usage: $0 [panther|jaguar] [command flags...]"
1e4a197e 26 echo ""
c6387bc1
RD
27 echo " panther Build for Apple's python in /usr/bin, such as on Panther"
28 echo " jaguar Build for a python in /usr/local/bin, such as on Jaguar"
46456f61
RD
29 echo ""
30 echo "optional command flags:"
1e4a197e 31 echo " skiptar Don't unpack the tarball"
81de4ba3
RD
32 echo " inplace Don't use the tarball, build from the CVS tree instead"
33 echo " (The Docs and Demo tarballs are still required for a full build.)"
85245f48 34 echo " unicode Make a unicode build"
1e4a197e 35 echo " skipconfig Don't run configure"
b42b447c 36 echo " skipbuild Don't build wxWidgets or wxPython"
1e4a197e
RD
37 echo " skipinstall Don't do the installation step"
38 echo " skipdmg Don't make the package or diskimage"
39 echo " skipclean Don't do the cleanup at the end"
46456f61 40 echo ""
1e4a197e
RD
41}
42
43
46456f61 44if [ $# -lt 1 ]; then
1e4a197e
RD
45 usage
46 exit 1
47fi
48
46456f61
RD
49KIND=$1
50case $KIND in
c6387bc1
RD
51 panther) PYTHON=/usr/bin/python ;;
52 jaguar) PYTHON=/usr/local/bin/python ;;
53 *) usage; exit 1 ;;
46456f61
RD
54esac
55PYTHONW=${PYTHON}w
56shift
1e4a197e 57
81de4ba3
RD
58skiptar=no
59skipconfig=no
60skipbuild=no
61skipinstall=no
62skipdmg=no
63skipclean=no
64inplace=no
85245f48 65unicode=no
1e4a197e
RD
66
67for flag in $*; do
68 case ${flag} in
81de4ba3
RD
69 skiptar) skiptar=yes ;;
70 skipconfig) skipconfig=yes; skiptar=yes ;;
71 skipbuild) skipbuild=yes; skipconfig=yes; skiptar=yes ;;
72 skipinstall) skipinstall=yes ;;
73 skipdmg) skipdmg=yes ;;
74 skipclean) skipclean=yes ;;
75 inplace) inplace=yes; skiptar=yes ;;
85245f48 76 unicode) unicode=yes ;;
1e4a197e
RD
77
78 *) echo "Unknown flag \"${flag}\""
79 usage
80 exit 1
81 esac
82done
83
84
46456f61
RD
85VERSION=`$PYTHON -c "import setup;print setup.VERSION"`
86PYVER=`$PYTHON -c "import sys; print sys.version[:3]"`
87PYPREFIX=`$PYTHON -c "import sys; print sys.exec_prefix"`
c6387bc1
RD
88PYLIB=$PYPREFIX/lib/python$PYVER
89SITEPACKAGES=$PYLIB/site-packages
28d1454a 90SHORTVER=`echo $VERSION | cut -c 1,2,3`
81de4ba3 91
85245f48
RD
92if [ $unicode == yes ]; then
93 CHARTYPE=unicode
94 UNICODEOPT=--enable-unicode
95 PYUNICODEOPT=1
96else
97 CHARTYPE=ansi
98 UNICODEOPT=--disable-unicode
99 PYUNICODEOPT=0
100fi
bceb17b2 101
81de4ba3 102
132ae51e 103if [ -z "$TARBALLDIR" ]; then
81de4ba3
RD
104 # this is a spot on my fileserver where the tarballs go, adjust
105 # as needed for where you put the wxPython tarball, or set
106 # TARBALLDIR before invoking this script...
132ae51e
RD
107 TARBALLDIR=/stuff/Development/wxPython/dist/$VERSION
108fi
28d1454a 109TARBALL=$TARBALLDIR/wxPython-src-$VERSION.tar.gz
1e4a197e 110
28d1454a 111if [ ! -e $TARBALLDIR/wxPython-demo-$VERSION.tar.gz ]; then
81de4ba3
RD
112 echo "-------------------------------------------------------"
113 echo " WARNING: Demo tarball not found, will skip building "
114 echo " the Demo app bundle and etc."
28d1454a 115 echo " $TARBALLDIR/wxPython-demo-$VERSION.tar.gz"
81de4ba3
RD
116 echo "-------------------------------------------------------"
117fi
118
28d1454a 119if [ ! -e $TARBALLDIR/wxPython-docs-$VERSION.tar.gz ]; then
81de4ba3
RD
120 echo "-------------------------------------------------------"
121 echo " WARNING: Docs tarball not found, will skip building "
122 echo " the the wxDocsViewer app bundle and etc."
28d1454a 123 echo " $TARBALLDIR/wxPython-docs-$VERSION.tar.gz"
81de4ba3
RD
124 echo "-------------------------------------------------------"
125fi
126
127
128
129
85245f48 130PREFIX=/usr/local/lib/wxPython-$CHARTYPE-$VERSION
132ae51e 131BINPREFIX=/usr/local/bin
1e4a197e 132
46456f61 133WXROOT=`dirname $PWD`
1e4a197e
RD
134PROGDIR="`dirname \"$0\"`"
135TMPDIR=$PWD/_build_dmg
136
137BUILDROOT=$TMPDIR/build
85245f48
RD
138
139INSTALLROOT=$TMPDIR/install-root
85245f48
RD
140INSTALLAPPS=$TMPDIR/install-apps
141
1e4a197e 142DMGDIR=$TMPDIR/dmg
85245f48
RD
143DMGROOT=$DMGDIR/root
144DMGAPPS=$DMGDIR/apps
145
1e4a197e
RD
146RESOURCEDIR=$PROGDIR/resources
147DESTDIR=$PWD/dist
28d1454a 148SRCROOT=$BUILDROOT/wxPython-src-$VERSION
1e4a197e
RD
149
150
151#----------------------------------------------------------------------
152# Setup builddirs
153
154mkdir -p $BUILDROOT
155mkdir -p $INSTALLROOT
85245f48
RD
156mkdir -p $INSTALLAPPS
157
1e4a197e 158rm -rf $DMGDIR
85245f48
RD
159mkdir -p $DMGROOT
160mkdir -p $DMGAPPS/Docs
161mkdir -p $DMGAPPS/Samples
b42b447c 162
1e4a197e
RD
163
164pushd $BUILDROOT
165
166
167#----------------------------------------------------------------------
168# Unpack the tarball
169
81de4ba3 170if [ $skiptar != yes ]; then
46456f61
RD
171 echo Unarchiving tarball...
172 tar xzf $TARBALL
1e4a197e
RD
173fi
174
81de4ba3
RD
175if [ $inplace = no ]; then
176 # make a build dir and cd to it.
28d1454a 177 cd wxPython-src-$VERSION
81de4ba3
RD
178 WXDIR=`pwd`
179 mkdir -p $WXDIR/bld
180 cd $WXDIR/bld
181 WXBLD=$WXDIR/bld
182else
183 # If building "inplace" then our build dir will be BUILDROOT,
184 # adjust the variables to find things that way.
185 WXDIR=$WXROOT
186 SRCROOT=$WXROOT
187 WXBLD=$BUILDROOT
188fi
189
190echo "Using source tree: $WXDIR"
191echo "Using build dir: $WXBLD"
1e4a197e
RD
192
193#----------------------------------------------------------------------
194
195
b42b447c 196# Configure wxWidgets
81de4ba3
RD
197if [ $skipconfig != yes ]; then
198 $WXDIR/configure \
46456f61
RD
199 --prefix=$PREFIX \
200 --with-mac \
eac928f0 201 --enable-monolithic \
1e4a197e 202 --with-opengl \
ec656cfe
RD
203 --enable-sound \
204 --enable-display \
e2f7f062 205 --enable-geometry \
28d1454a 206 --enable-debug_flag \
46456f61 207 --enable-precomp=no \
28d1454a 208 --enable-optimise \
85245f48 209 $UNICODEOPT
1e4a197e 210
e2f7f062 211
1e4a197e
RD
212fi
213
b42b447c 214# Build wxWidgets and wxPython
81de4ba3 215if [ $skipbuild != yes ]; then
1e4a197e 216
b42b447c 217 # Make wxWidgets and some contribs
28d1454a 218
851067d0
RD
219 # For some reason Rez and DeRez have started locking up if run as
220 # root, figure out why, but in the meantime...
85245f48
RD
221 if [ "$UID" = "0" ]; then
222 chmod a+w lib
851067d0
RD
223 if [ "$CHARTYPE" = "ansi" ]; then
224 su robind -c "make lib/libwx_macd-2.5.3.r"
225 else
226 su robind -c "make lib/libwx_macud-2.5.3.r"
227 fi
85245f48 228 fi
28d1454a 229
81de4ba3
RD
230 make
231 make -C contrib/src/gizmos
46456f61
RD
232 make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0"
233 make -C contrib/src/stc
46456f61 234
46456f61 235 # Build wxPython
1e4a197e 236 cd $WXDIR/wxPython
46456f61 237 $PYTHON setup.py \
85245f48 238 UNICODE=$PYUNICODEOPT \
46456f61 239 NO_SCRIPTS=1 \
28d1454a 240 EP_ADD_OPTS=1 \
81de4ba3
RD
241 WX_CONFIG="$WXBLD/wx-config --inplace" \
242 BUILD_BASE=$WXBLD/wxPython \
1e4a197e 243 build
1e4a197e
RD
244fi
245
246#----------------------------------------------------------------------
1e4a197e 247
81de4ba3 248if [ $skipinstall != yes ]; then
b42b447c 249 # Install wxWidgets
81de4ba3 250 cd $WXBLD
46456f61
RD
251 make prefix=$INSTALLROOT$PREFIX install
252 make -C contrib/src/gizmos prefix=$INSTALLROOT$PREFIX install
253 make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0" prefix=$INSTALLROOT/$PREFIX install
254 make -C contrib/src/stc prefix=$INSTALLROOT$PREFIX install
1e4a197e
RD
255
256
28d1454a
RD
257 # relink wx-config with a relative link
258 cd $INSTALLROOT$PREFIX/bin
259 rm wx-config
260 ln -s ../lib/wx/config/* wx-config
261
1e4a197e
RD
262 # and wxPython
263 cd $WXDIR/wxPython
46456f61 264 $PYTHON setup.py \
85245f48 265 UNICODE=$PYUNICODEOPT \
46456f61 266 NO_SCRIPTS=1 \
28d1454a 267 EP_ADD_OPTS=1 \
46456f61 268 WX_CONFIG="$INSTALLROOT/$PREFIX/bin/wx-config --prefix=$INSTALLROOT/$PREFIX" \
81de4ba3 269 BUILD_BASE=$WXBLD/wxPython \
1e4a197e
RD
270 install \
271 --root=$INSTALLROOT
272
46456f61 273
c6387bc1
RD
274 # Apple's Python (on Panther) sym-links the site-packages dir to
275 # /Library/Python/$PYVER so we need to move the files so they are
276 # installed in the physical location, not the virtual one.
277 if [ "$KIND" = "panther" ]; then
81de4ba3
RD
278 if [ -e $INSTALLROOT/Library/Python/$PYVER ]; then
279 rm -r $INSTALLROOT/Library/Python/$PYVER
280 fi
c6387bc1
RD
281 mkdir -p $INSTALLROOT/Library/Python/$PYVER
282 mv $INSTALLROOT/$SITEPACKAGES/* $INSTALLROOT/Library/Python/$PYVER
283 rm -r $INSTALLROOT/System
284 SITEPACKAGES=/Library/Python/$PYVER
285 fi
286
79db03c9
RD
287 # install wxPython's tool scripts
288 mkdir -p $INSTALLROOT$BINPREFIX
1e4a197e 289 cd $WXDIR/wxPython/scripts
79db03c9 290 python$PYVER CreateMacScripts.py $INSTALLROOT $BINPREFIX
85245f48 291
1e4a197e 292
85245f48
RD
293 # Remove the .pyc/.pyo files they just take up space and can be recreated
294 # during the install.
295 pushd $WXDIR/wxPython
296 $PYTHON $PROGDIR/../zappycfiles.py $INSTALLROOT > /dev/null
297 popd
c6387bc1 298
79db03c9 299 # Set premissions for files in $INSTALLROOT
132ae51e 300 if [ "$UID" = "0" ]; then
79db03c9
RD
301 chown -R root:admin $INSTALLROOT
302 chmod -R g+w $INSTALLROOT
132ae51e 303 fi
1e4a197e
RD
304fi
305
85245f48
RD
306if [ "$KIND" = "panther" ]; then
307 SITEPACKAGES=/Library/Python/$PYVER
308fi
79db03c9 309PKGDIR=`cat $INSTALLROOT$SITEPACKAGES/wx.pth`
28d1454a 310
1e4a197e
RD
311popd
312
313#----------------------------------------------------------------------
314
315# Make the Installer packages and disk image
81de4ba3 316if [ $skipdmg != yes ]; then
1e4a197e 317
85245f48
RD
318 #-----------------------------------------------
319 # The main runtime installer package
1e4a197e
RD
320
321 # Make the welcome message
46456f61 322 case $KIND in
c6387bc1
RD
323 panther) W_MSG="the Panther (OS X 10.3.x) version of" ;;
324 jaguar) W_MSG="the Jaguar (OS X 10.2.x) version of" ;;
46456f61 325 esac
85245f48
RD
326
327
1e4a197e
RD
328 cat > $RESOURCEDIR/Welcome.txt <<EOF
329Welcome!
330
85245f48 331This Installer package will install the wxPython $CHARTYPE runtime $VERSION for $W_MSG MacPython-OSX $PYVER. This includes:
1e4a197e 332
85245f48
RD
333 * The wxPython packages and modules
334 * The wxWidgets shared libraries and headers
79db03c9 335 * Some command line tool scripts, installed to /usr/local/bin.
85245f48
RD
336
337You must install onto your current boot disk, eventhough the installer does not enforce this, otherwise things will not work.
338
79db03c9 339You can install more than one version of the wxPython runtime if you desire. The most recently installed version will be the default wxPython, but you can choose another by setting the PYTHONPATH or by using the wxversion module. See http://wiki.wxpython.org/index.cgi/MultiVersionInstalls for more details.
c6387bc1 340
1e4a197e
RD
341Build date: `date`
342EOF
343
344 # make the preflight script
345 cat > $RESOURCEDIR/preflight <<EOF
346#!/bin/sh
347# Cleanup any old install of the wxPython package
348rm -rf \$2$SITEPACKAGES/wxPython
46456f61 349rm -rf \$2$SITEPACKAGES/wx
28d1454a 350rm -rf \$2$SITEPACKAGES/$PKGDIR
1e4a197e
RD
351exit 0
352EOF
353 chmod +x $RESOURCEDIR/preflight
354
355 # make the postflight script
356 cat > $RESOURCEDIR/postflight <<EOF
357#!/bin/sh -e
358# Compile the .py files in the wxPython pacakge
28d1454a
RD
359$PYTHON \$2$PYLIB/compileall.py \$2$SITEPACKAGES/$PKGDIR
360$PYTHON -O \$2$PYLIB/compileall.py \$2$SITEPACKAGES/$PKGDIR
1e4a197e 361
c6387bc1 362# and all of the wxPython pacakge should be group writable
28d1454a
RD
363chgrp -R admin \$2$SITEPACKAGES/$PKGDIR
364chmod -R g+w \$2$SITEPACKAGES/$PKGDIR
1e4a197e
RD
365
366exit 0
367EOF
368 chmod +x $RESOURCEDIR/postflight
369
85245f48 370
1e4a197e 371
c6387bc1 372 # Build the main Installer Package...
bceb17b2 373 rm -rf wxPython${SHORTVER}-osx-$CHARTYPE-$KIND.pkg
1e4a197e 374 python $PROGDIR/../buildpkg.py \
bceb17b2 375 --Title=wxPython${SHORTVER}-osx-$CHARTYPE-$KIND \
1e4a197e 376 --Version=$VERSION \
85245f48 377 --Description="wxPython $CHARTYPE runtime $VERSION for $W_MSG MacPython-OSX $PYVER" \
1e4a197e
RD
378 --NeedsAuthorization="YES" \
379 --Relocatable="NO" \
380 --InstallOnly="YES" \
381 $INSTALLROOT \
382 $RESOURCEDIR
383
85245f48 384 mv wxPython${SHORTVER}-osx-$CHARTYPE-$KIND.pkg $DMGROOT
1e4a197e 385
85245f48
RD
386 rm $RESOURCEDIR/postflight
387 rm $RESOURCEDIR/preflight
388 rm $RESOURCEDIR/Welcome.txt
1e4a197e 389
1e4a197e 390
85245f48
RD
391 #-----------------------------------------------
392 # Make a README to go on the disk image
393 cat > "$DMGROOT/README 1st.txt" <<EOF
46456f61
RD
394Welcome to wxPython!
395
85245f48
RD
396This disk image contains the following items:
397
398 wxPython${SHORTVER}-osx-$CHARTYPE-$VERSION-$KIND
399
79db03c9
RD
400 This Installer contains the wxPython runtime, compiled on a
401 $KIND OS X system, using the $CHARTYPE build of the wxWidgets
402 library. It includes the Python modules and extension
403 modules, as well as the wxWidgets libraries.
46456f61 404
79db03c9
RD
405 It is possible to have more than one version of the runtime
406 installed at once if you wish. The most recently installed
407 version will be the default wxPython, but you can choose
408 another by setting the PYTHONPATH or by using the wxversion
409 module. For more details see:
410 http://wiki.wxpython.org/index.cgi/MultiVersionInstalls
85245f48 411
85245f48
RD
412
413 uninstall_wxPython.py
414
415 A simple tool to help you manage your installed versions of
416 wxPython. It will allow you to choose from the currently
417 installed wxPython packages and to select one for
418 uninstallation. It is a text-mode tool so you can either run
419 it from a Terminal command line, or you can open it with
420 PythonLauncher and let it create a Terminal to run it in.
421
422EOF
423
424
425
426 cp $PROGDIR/../uninstall_wxPython.py $DMGROOT
427
428
429 #-----------------------------------------------
430 # Make a disk image to hold these files
431 dmgname=wxPython${SHORTVER}-osx-$CHARTYPE-$VERSION-$KIND-py$PYVER
432 $PROGDIR/../makedmg $DMGROOT $DMGDIR $dmgname
433
434 echo Moving $DMGDIR/$dmgname.dmg to $DESTDIR
435 mv $DMGDIR/$dmgname.dmg $DESTDIR
436
437
438#---------------------------------------------------------------------------
439# Now create app bundles for the demo, docs, and tools and make another
440# disk image to hold it all.
441#---------------------------------------------------------------------------
442
443 cat > "$DMGAPPS/README 1st.txt" <<EOF
444Welcome to wxPython!
1e4a197e 445
85245f48
RD
446On this disk image you will find Demo, Tools, Docs, and etc. for
447wxPython $VERSION. Everything here is optional and you can drag them
448out of the disk image and drop them wherever you want. You will need
449to have an installed wxPython runtime to be able to use any of them.
1e4a197e 450
46456f61 451
85245f48
RD
452 wxPython Demo An application bundle version of the demo.
453 (This has it's own copy of the demo sources
454 within the bundle.)
c6387bc1 455
85245f48 456 XRCed An application for editing wxPython resource
c6387bc1
RD
457 files (XRC files.)
458
85245f48 459 PyCrust An application that provides an interactive
c6387bc1
RD
460 Python shell and also namespace inspectors.
461
b42b447c
RD
462
463
81de4ba3 464 Docs/wxDocsViewer An application that allows you to view the
dcb1fb69 465 wxWidgets documentation.
b42b447c
RD
466
467 Docs/licence License files.
468
81de4ba3 469 Docs/other A few readmes, change log, etc.
b42b447c
RD
470
471
81de4ba3 472 Samples/samples Several small sample applications that
b42b447c
RD
473 demonstrate how to use wxPython.
474
81de4ba3 475 Samples/demo A copy of the wxPython demo source code,
b42b447c
RD
476 just open the folder and run demo.pyw.
477
1e4a197e
RD
478Happy Hacking!
479EOF
480
81de4ba3 481# PyAlaMode An extension of PyCrust that includes source
c6387bc1
RD
482# file editing capabilities.
483
1e4a197e 484
b42b447c 485 # wxDocs
28d1454a 486 if [ ! -e $TARBALLDIR/wxPython-docs-$VERSION.tar.gz ]; then
85245f48 487 cat > "$DMGAPPS/Docs/Build ERROR.txt" <<EOF
dcb1fb69 488
28d1454a 489The wxPython-docs tarball was not found when building this disk image!
81de4ba3
RD
490
491EOF
492
493 else
494 pushd $BUILDROOT
28d1454a 495 tar xzvf $TARBALLDIR/wxPython-docs-$VERSION.tar.gz
81de4ba3 496 popd
dcb1fb69 497
81de4ba3
RD
498 # Make an app to launch viewdocs.py
499 $PYTHONW $PROGDIR/../buildapp.py \
85245f48 500 --builddir=$DMGAPPS/Docs \
81de4ba3
RD
501 --name=wxDocsViewer \
502 --mainprogram=$BUILDROOT/wxPython-$VERSION/docs/viewdocs.py \
503 --iconfile=$PROGDIR/Info.icns \
504 build
dcb1fb69 505
85245f48 506 cp $BUILDROOT/wxPython-$VERSION/docs/*.zip $DMGAPPS/Docs/wxDocsViewer.app/Contents/Resources
81de4ba3 507
85245f48 508 cat > "$DMGAPPS/Docs/README 1st.txt" <<EOF
dcb1fb69
RD
509
510The wxDocsViewer application needs to be copied to your Desktop (or
511someplace else you have write access to) before you can run it, so it
512can cache some indexes within its bundle.
513
514EOF
46456f61 515
81de4ba3
RD
516 fi
517
b42b447c 518 # license files, docs, etc.
85245f48 519 pushd $DMGAPPS/Docs
b42b447c
RD
520 cp -pR $SRCROOT/wxPython/licence .
521 cp -pR $SRCROOT/wxPython/docs .
522 rm -rf docs/bin
523 rm -rf docs/xml-raw
524 mv docs other
525 popd
81de4ba3
RD
526
527
28d1454a 528 if [ ! -e $TARBALLDIR/wxPython-demo-$VERSION.tar.gz ]; then
85245f48 529 cat > "$DMGAPPS/Samples/Build ERROR.txt" <<EOF
81de4ba3 530
28d1454a 531The wxPython-demo tarball was not found when building this disk image!
81de4ba3
RD
532
533EOF
85245f48 534 cp "$DMGAPPS/Samples/Build ERROR.txt" $DMGAPPS
81de4ba3
RD
535
536 else
537
538 # Copy the demo and samples to the disk image from the tarball
85245f48 539 pushd $DMGAPPS/Samples
28d1454a 540 tar xzvf $TARBALLDIR/wxPython-demo-$VERSION.tar.gz
81de4ba3
RD
541 mv wxPython-$VERSION/* .
542 rm -rf wxPython-$VERSION
543 rm demo/b demo/.setup.sh
544 mv demo/demo.py demo/demo.pyw
545 popd
546
547 # Make an app bundle to run the demo
548 $PYTHONW $PROGDIR/../buildapp.py \
85245f48 549 --builddir=$DMGAPPS \
81de4ba3 550 --name="wxPython Demo" \
85245f48 551 --mainprogram=$DMGAPPS/Samples/demo/demo.pyw \
81de4ba3
RD
552 --iconfile=$PROGDIR/RunDemo.icns \
553 build
85245f48 554 cp -pR $DMGAPPS/Samples/demo/* "$DMGAPPS/wxPython Demo.app/Contents/Resources"
81de4ba3
RD
555 fi
556
b42b447c 557
46456f61
RD
558 # Make an app bundle to launch PyCrust
559 $PYTHONW $PROGDIR/../buildapp.py \
85245f48 560 --builddir=$DMGAPPS \
46456f61 561 --name=PyCrust \
79db03c9 562 --mainprogram=$INSTALLROOT$BINPREFIX/pycrust.py \
46456f61
RD
563 --iconfile=$PROGDIR/PieShell.icns \
564 build
565
79db03c9
RD
566## TODO: PyAlaMode needs tweaked to be able to run from a bundle. It
567## needs to know to ignore command line parameters and etc...
85245f48
RD
568# # and PyAlaMode
569# $PYTHONW $PROGDIR/../buildapp.py \
570# --builddir=$DMGAPPS \
571# --name=PyAlaMode \
79db03c9 572# --mainprogram=$INSTALLROOT$BINPREFIX/pyalamode.py \
85245f48
RD
573# --iconfile=$PROGDIR/PieShell.icns \
574# build
c6387bc1 575
46456f61
RD
576 # Make an app to launch XRCed
577 $PYTHONW $PROGDIR/../buildapp.py \
85245f48 578 --builddir=$DMGAPPS \
46456f61 579 --name=XRCed \
79db03c9 580 --mainprogram=$INSTALLROOT$BINPREFIX/xrced.py \
46456f61
RD
581 --iconfile=$PROGDIR/XRCed.icns \
582 build
583
81de4ba3 584
1e4a197e 585
85245f48
RD
586 # and then finally make a disk image containing everything
587 dmgname=wxPython${SHORTVER}-osx-docs-demos-$VERSION
588 $PROGDIR/../makedmg $DMGAPPS $DMGDIR $dmgname
1e4a197e 589
85245f48
RD
590 echo Moving $DMGDIR/$dmgname.dmg to $DESTDIR
591 mv $DMGDIR/$dmgname.dmg $DESTDIR
1e4a197e
RD
592fi
593
594
595# Cleanup build/install dirs
81de4ba3 596if [ $skipclean != yes ]; then
1e4a197e
RD
597 echo "Cleaning up..."
598 rm -rf $TMPDIR
599else
600 echo "Cleanup is disabled. You should remove $TMPDIR when finished"
601fi
602