[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Pygame to Mac App Store (in progress)
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Pygame to Mac App Store (in progress)
- From: Keith Nemitz <musenik@xxxxxxxxx>
- Date: Fri, 7 Oct 2011 02:04:16 -0700 (PDT)
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Fri, 07 Oct 2011 05:04:22 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1317978256; bh=JNV2qI4S35jdbKByFDKhAmpAbTTDO/f9E1hrCz7wCBQ=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=xj7k2OyCiLo3yWk/wsc2zChwk8XFThOCseLUEtdqOHLTvlEhdK/cYbLPs2DkPoQhk1A3CvUEFgUKrA/S3qAHzsQVVYOWOkH/MxInGmzsyfvZd5g/CkUgjSnMYnj7FRjXCbA605NFIqaQ/r5ThdmvMyIyk11C2OIdN+yJ7xp1yu0=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=IL9+JGRuOJwN/CnTis0dqI3urELwtvKmnQjYhhgjc/HfCwnkCprrOZLxp3XFMHM6JC3z/l7mrtaqvix0epGZL1bzq+abbMx20BtaiBnz/qLzXm2QFfdyfMSssoKq9IN5XrENtm6GjcZRqnR70L9PX8bVLm1HpBVqj8mwCuaSYY8=;
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Been meaning to post this for a while, but kept getting distracted. Here is the script we use to create a build of The Witch's Yarn for the Mac App Store. Note: I have yet to successfully post the game to the story, because I screwed up the original certs. Then the whole Lion disappointment popped up, and now I'm just waiting for the SDL fix. Then I try another crack at it. Until then here's what been working for us to make the bundle:
# Python script for building AppStore-friendly app bundle
import sys
import os
import subprocess
# build parameters
python = '/Library/Frameworks/Python.framework/Versions/2.5/bin/python'
codesign_cmd = '/usr/bin/codesign'
productbuild_cmd = '/usr/bin/productbuild'
projectname = "The Witch's Yarn"
appname = projectname+".app"
pkgname = projectname+".pkg"
app_signing_identity = "3rd Party Mac Developer Application: Mousechief"
pkg_signing_identity = "3rd Party Mac Developer Installer: Mousechief"
def bundlebuild(project_path):
print "Building "+projectname+" application bundle..."
args = [python,'Setup.py','py2app']
os.chdir(project_path)
p = subprocess.call(args)
return p
def codesign(bundle_path):
print "Codesigning "+projectname+" application bundle..."
args = [codesign_cmd, '-s', app_signing_identity, bundle_path]
p = subprocess.call(args)
return p
def productbuild(bundle_path):
print "Building "+projectname+" installer package..."
installdir = '/Applications'
args = [productbuild_cmd, '--component', bundle_path, installdir, '--sign', pkg_signing_identity, pkgname]
p = subprocess.call(args)
return p
def main():
root_path = os.path.split(os.path.abspath(sys.argv[0]))[0]
project_path = os.path.join(root_path,"project")
bundlebuild(project_path)
bundle_path = os.path.join(project_path,"dist/"+projectname+".app")
codesign(bundle_path)
#productbuild(bundle_path)
main()