[shpy-commit] r2838 - shpy/trunk/dist/shpy
mwh@codespeak.net
mwh@codespeak.net
Mon, 19 Jan 2004 17:02:20 +0100 (MET)
Author: mwh
Date: Mon Jan 19 17:02:19 2004
New Revision: 2838
Added:
shpy/trunk/dist/shpy/buildapp.py
shpy/trunk/dist/shpy/osx_main.py
Log:
Simple and rather hackish OS X bundle support.
Don't worry about keeping this in order, I'll look after that for now.
Added: shpy/trunk/dist/shpy/buildapp.py
==============================================================================
--- (empty file)
+++ shpy/trunk/dist/shpy/buildapp.py Mon Jan 19 17:02:19 2004
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+import os
+from bundlebuilder import buildapp
+from plistlib import Plist
+
+src = [fn for fn in os.listdir('.')
+ if fn.endswith('.py') and fn not in ('osx_main.py',)]
+nibs = [fn for fn in os.listdir('.')
+ if fn.endswith('.nib')]
+
+ostypes = [u'év®π']
+
+infoPlist = Plist(
+ NSHelpFile='',
+ CFBundleShortVersionString='SHPY v0.1',
+ CFBundleSignature='????',
+ CFBundleInfoDictionaryVersion='6.0',
+# CFBundleIconFile='ToDoApp.icns',
+ CFBundleGetInfoString='EVR v0.1',
+ CFBundleIdentifier='net.codespeak.shpy',
+ CFBundleDevelopmentRegion='English',
+ CFBundleExecutable='Python',
+ CFBundleName='EVR',
+ CFBundlePackageType='APPL',
+ NSPrincipalClass='NSApplication',
+ CFBundleVersion='0.1')
+
+buildapp(
+ name = "SHPY",
+ mainprogram = "osx_main.py",
+ resources = nibs + src + ['net'],
+ nibname = "MainMenu",
+ plist = infoPlist)
Added: shpy/trunk/dist/shpy/osx_main.py
==============================================================================
--- (empty file)
+++ shpy/trunk/dist/shpy/osx_main.py Mon Jan 19 17:02:19 2004
@@ -0,0 +1,9 @@
+from ui_pygame import Terminal
+
+import sys, os
+
+print sys.executable, os.getcwd()
+
+os.chdir(os.path.join(os.path.dirname(sys.executable), '../Resources'))
+
+Terminal('codespeak.net:8888').run()