+# PyAlaMode An extension of PyCrust that includes source
+# file editing capabilities.
+
+
+ # wxDocs
+ if [ ! -e $TARBALLDIR/wxPython-docs-$VERSION.tar.gz ]; then
+ cat > "$DMGDIR/root/Docs/Build ERROR.txt" <<EOF
+
+The wxPython-docs tarball was not found when building this disk image!
+
+EOF
+
+ else
+ pushd $BUILDROOT
+ tar xzvf $TARBALLDIR/wxPython-docs-$VERSION.tar.gz
+ popd
+
+ # Make an app to launch viewdocs.py
+ $PYTHONW $PROGDIR/../buildapp.py \
+ --builddir=$DMGDIR/root/Docs \
+ --name=wxDocsViewer \
+ --mainprogram=$BUILDROOT/wxPython-$VERSION/docs/viewdocs.py \
+ --iconfile=$PROGDIR/Info.icns \
+ build
+
+ cp $BUILDROOT/wxPython-$VERSION/docs/*.zip $DMGDIR/root/Docs/wxDocsViewer.app/Contents/Resources
+
+ cat > "$DMGDIR/root/Docs/README 1st.txt" <<EOF
+
+The wxDocsViewer application needs to be copied to your Desktop (or
+someplace else you have write access to) before you can run it, so it
+can cache some indexes within its bundle.
+
+EOF
+
+ fi
+
+ # license files, docs, etc.
+ pushd $DMGDIR/root/Docs
+ cp -pR $SRCROOT/wxPython/licence .
+ cp -pR $SRCROOT/wxPython/docs .
+ rm -rf docs/bin
+ rm -rf docs/xml-raw
+ mv docs other
+ popd
+
+
+ if [ ! -e $TARBALLDIR/wxPython-demo-$VERSION.tar.gz ]; then
+ cat > "$DMGDIR/root/Samples/Build ERROR.txt" <<EOF
+
+The wxPython-demo tarball was not found when building this disk image!
+
+EOF
+ cp "$DMGDIR/root/Samples/Build ERROR.txt" $DMGDIR/root/Apps
+
+ else
+
+ # Copy the demo and samples to the disk image from the tarball
+ pushd $DMGDIR/root/Samples
+ tar xzvf $TARBALLDIR/wxPython-demo-$VERSION.tar.gz
+ mv wxPython-$VERSION/* .
+ rm -rf wxPython-$VERSION
+ rm demo/b demo/.setup.sh
+ mv demo/demo.py demo/demo.pyw
+ popd
+
+ # Make an app bundle to run the demo
+ $PYTHONW $PROGDIR/../buildapp.py \
+ --builddir=$DMGDIR/root/Apps \
+ --name="wxPython Demo" \
+ --mainprogram=$DMGDIR/root/Samples/demo/demo.pyw \
+ --iconfile=$PROGDIR/RunDemo.icns \
+ build
+ cp -pR $DMGDIR/root/Samples/demo/* "$DMGDIR/root/Apps/wxPython Demo.app/Contents/Resources"
+ fi
+
+
+ # Make an app bundle to launch PyCrust
+ $PYTHONW $PROGDIR/../buildapp.py \
+ --builddir=$DMGDIR/root/Apps \
+ --name=PyCrust \
+ --mainprogram=$INSTALLROOT$BINPREFIX/pycrust.py \
+ --iconfile=$PROGDIR/PieShell.icns \
+ build
+
+# # and PyAlaMode
+# $PYTHONW $PROGDIR/../buildapp.py \
+# --builddir=$DMGDIR/root \
+# --name=PyAlaMode \
+# --mainprogram=$INSTALLROOT$BINPREFIX/pyalamode.py \
+# --iconfile=$PROGDIR/PieShell.icns \
+# build
+
+ # Make an app to launch XRCed
+ $PYTHONW $PROGDIR/../buildapp.py \
+ --builddir=$DMGDIR/root/Apps \
+ --name=XRCed \
+ --mainprogram=$INSTALLROOT$BINPREFIX/xrced.py \
+ --iconfile=$PROGDIR/XRCed.icns \
+ build
+