source: darwin-py2app

Last change on this file was 598:029e60f37743, checked in by Jeremy Thurgood <firxen@…>, 11 years ago

Fix minor dmg build issue.

  • Property exe set to *
File size: 1.1 KB
Line 
1#!/bin/sh
2# Copyright 2009 Jeremy Thurgood <firxen+rinkhals@gmail.com>
3# GPL - see COPYING for details
4#
5# Usage: darwin-py2app
6
7OFA_VERSION=`PYTHONPATH=. python -c "from gamelib import version; print version.VERSION_STR"`
8BUILD_NAME="foxassault-${OFA_VERSION}"
9BUILD_FOLDER="build/${BUILD_NAME}"
10DMG_NAME="${BUILD_NAME}.dmg"
11PY2APP_LOG="py2app.log"
12
13BASEDIR=`pwd`
14
15echo "=== Setting up build environment ==="
16
17./unix-tarball
18
19for f in scripts setup.py; do
20    svn export $f ${BUILD_FOLDER}/$f
21done
22
23cd ${BUILD_FOLDER}
24
25# find data -name '*.svg' -delete
26
27echo ""
28echo "=== Running python setup.py ==="
29echo "  Fox Assault version: ${OFA_VERSION}"
30echo "  Writing log to ${PY2APP_LOG}"
31
32python setup.py py2app >${PY2APP_LOG} 2>&1
33
34echo ""
35echo "=== Removing useless cruft that just takes up space ==="
36echo ""
37
38for dir in docs examples tests; do
39    find "dist/" -path "*/Resources/lib/*/pygame/${dir}/*" -delete
40done
41
42echo "=== Building DMG ==="
43echo ""
44
45cd ${BASEDIR}
46
47pwd
48rm dist/${DMG_NAME} > /dev/null
49hdiutil create -srcfolder ${BUILD_FOLDER}/dist/*.app/ dist/${DMG_NAME}
50
51echo ""
52echo "=== Done ==="
53echo ""
54du -sh dist/* | sed 's/^/   /'
55echo ""
56
Note: See TracBrowser for help on using the repository browser.