Make chess puzzle level (Kasparov to F3) winnable.
[naja.git] / packaging / darwin-py2app.sh
index 8af88291989ee2216a757281456ee9daa07b2b32..7dd61eb77477853f0ca1176ae7c9525a9b5b18a1 100755 (executable)
@@ -1,9 +1,20 @@
 #!/bin/sh
-# Copyright 2009 Jeremy Thurgood <firxen@gmail.com>
+# Copyright 2009-2014 Jeremy Thurgood <firxen@gmail.com>
 # GPL - see COPYING for details
 #
 # Usage: darwin-py2app
 
+# NOTE:
+#
+# This requires a 32-bit Python build from python.org and a binary pygame
+# distribution.
+# I used these:
+#   https://www.python.org/ftp/python/2.7.6/python-2.7.6-macosx10.3.dmg
+#   http://pygame.org/ftp/pygame-1.9.1release-python.org-32bit-py2.7-macosx10.3.dmg
+#
+# Install these in /Library/Frameworks and build the virtualenv with
+# --system-site-packages to make the pygame installation available.
+
 GAME_NAME=`sed -ne 's/NAME_STR = "\(.*\)"/\1/p' setup.py`
 GAME_VERSION=`sed -ne 's/VERSION_STR = "\(.*\)"/\1/p' setup.py`
 BUILD_NAME="${GAME_NAME}-${GAME_VERSION}"
@@ -19,9 +30,7 @@ python setup.py sdist > /dev/null
 mkdir build
 (cd build; tar xzf ../dist/${BUILD_NAME}.tar.gz)
 
-echo "[${BUILD_FOLDER}]"
 cd ${BUILD_FOLDER}
-echo "$PWD"
 
 echo ""
 echo "=== Running python setup.py ==="
@@ -48,10 +57,17 @@ echo ""
 
 cd ${BASEDIR}
 
-pwd
 rm dist/${DMG_NAME} > /dev/null
 
-echo -e "For some reason the game starts without a foreground window. Click on the icon in the dock (or minimize and restore from the menu) to get it back.\n\nIf this doesn't work, please let me (<firxen@gmail.com>) know, especially if you have any ideas about how to fix it.\n\nYou should also be able to use the unix tarball available at the same place you got this dmg.\n\nThanks." > ${BUILD_FOLDER}/dist/IMPORTANT\ NOTE.txt
+cat > ${BUILD_FOLDER}/dist/IMPORTANT\ NOTE.txt <<EOF
+For some reason the game starts without a foreground window. Click on the icon in the dock (or minimize and restore from the menu) to get it back.
+
+If this doesn't work, please let me (<firxen@gmail.com>) know, especially if you have any ideas about how to fix it.
+
+You should also be able to use the unix tarball available at the same place you got this dmg.
+
+Thanks.
+EOF
 
 hdiutil create -volname ${GAME_NAME} -srcfolder ${BUILD_FOLDER}/dist/*.app/ -srcfolder ${BUILD_FOLDER}/dist/IMPORTANT\ NOTE.txt dist/${DMG_NAME}