Mercurial > mamba
annotate scripts/darwin-py2app.sh @ 556:30a5ded79313
Add replay note to README
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Thu, 22 Sep 2011 17:37:16 +0200 |
parents | 5da148acb36a |
children |
rev | line source |
---|---|
433 | 1 #!/bin/sh |
2 # Copyright 2009 Jeremy Thurgood <firxen+rinkhals@gmail.com> | |
3 # GPL - see COPYING for details | |
4 # | |
5 # Usage: darwin-py2app | |
6 | |
7 GAME_NAME="mutable-mamba" | |
8 | |
453
4f3c55b09fda
Fix version variable names.
Simon Cross <hodgestar@gmail.com>
parents:
433
diff
changeset
|
9 MM_VERSION=`sed -ne 's/VERSION_STR = "\(.*\)"/\1/p' setup.py` |
4f3c55b09fda
Fix version variable names.
Simon Cross <hodgestar@gmail.com>
parents:
433
diff
changeset
|
10 BUILD_NAME="${GAME_NAME}-${MM_VERSION}" |
433 | 11 BUILD_FOLDER="build/${GAME_NAME}" |
12 DMG_NAME="${BUILD_NAME}.dmg" | |
13 PY2APP_LOG="py2app.log" | |
14 | |
15 BASEDIR=`pwd` | |
16 | |
17 echo "=== Setting up build environment ===" | |
18 | |
19 ./scripts/build_unix.sh | |
20 | |
21 cd ${BUILD_FOLDER} | |
22 | |
23 # find data -name '*.svg' -delete | |
24 | |
25 echo "" | |
26 echo "=== Running python setup.py ===" | |
453
4f3c55b09fda
Fix version variable names.
Simon Cross <hodgestar@gmail.com>
parents:
433
diff
changeset
|
27 echo " Mutable Mamba version: ${MM_VERSION}" |
433 | 28 echo " Writing log to ${PY2APP_LOG}" |
29 | |
30 python setup.py py2app >${PY2APP_LOG} 2>&1 | |
31 | |
32 echo "" | |
33 echo "=== Removing useless cruft that just takes up space ===" | |
34 echo "" | |
35 | |
36 for dir in docs examples tests; do | |
37 find "dist/" -path "*/Resources/lib/*/pygame/${dir}/*" -delete | |
38 done | |
39 | |
466
5da148acb36a
Fixed icon in .app file. \o/ (Why does py2app not just do this for us?)
Jeremy Thurgood <firxen@gmail.com>
parents:
453
diff
changeset
|
40 echo "=== Adding magic icon ===" |
5da148acb36a
Fixed icon in .app file. \o/ (Why does py2app not just do this for us?)
Jeremy Thurgood <firxen@gmail.com>
parents:
453
diff
changeset
|
41 echo "" |
5da148acb36a
Fixed icon in .app file. \o/ (Why does py2app not just do this for us?)
Jeremy Thurgood <firxen@gmail.com>
parents:
453
diff
changeset
|
42 |
5da148acb36a
Fixed icon in .app file. \o/ (Why does py2app not just do this for us?)
Jeremy Thurgood <firxen@gmail.com>
parents:
453
diff
changeset
|
43 cp data/icons/program/icon.icns dist/${GAME_NAME}.app/Contents/Resources/ |
5da148acb36a
Fixed icon in .app file. \o/ (Why does py2app not just do this for us?)
Jeremy Thurgood <firxen@gmail.com>
parents:
453
diff
changeset
|
44 |
433 | 45 echo "=== Building DMG ===" |
46 echo "" | |
47 | |
48 cd ${BASEDIR} | |
49 | |
50 pwd | |
51 rm dist/${DMG_NAME} > /dev/null | |
52 hdiutil create -srcfolder ${BUILD_FOLDER}/dist/*.app/ dist/${DMG_NAME} | |
53 | |
54 echo "" | |
55 echo "=== Done ===" | |
56 echo "" | |
57 du -sh dist/* | sed 's/^/ /' | |
58 echo "" | |
59 |