From 5ab53e2d53e20636ff24a7f5ebaf44c50da2ccba Mon Sep 17 00:00:00 2001 From: Stephen Dranger Date: Tue, 1 Mar 2011 21:03:51 -0600 Subject: [PATCH] mac --- .gitignore | 1 + MACBUILD | 5 +++++ py2app.sh | 9 +++++++++ setup-py2app.py | 21 +++++++++++++++++++++ 4 files changed, 36 insertions(+) create mode 100644 MACBUILD create mode 100755 py2app.sh create mode 100644 setup-py2app.py diff --git a/.gitignore b/.gitignore index 41f9f9d..ce37f30 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ logs/* build/* profiles/* +tmp/* irctest.log *.pyc \ No newline at end of file diff --git a/MACBUILD b/MACBUILD new file mode 100644 index 0000000..3d3c255 --- /dev/null +++ b/MACBUILD @@ -0,0 +1,5 @@ + setup-py2app.py, which will create the app + py2app.sh, which runs setup-py2app.py and does cleanup + when it says that it can't find py2app/apptemplate/prebuilt/main-i386 + you have to cd into prebuilt and ln -s main-fat3 main-i386 + although I suspect that ln -s main-fat main-i386 works better in this case diff --git a/py2app.sh b/py2app.sh new file mode 100755 index 0000000..2428661 --- /dev/null +++ b/py2app.sh @@ -0,0 +1,9 @@ +#!/bin/sh +rm -rf build/ dist/ +python setup-py2app.py py2app +touch dist/pesterchum.app/Contents/Resources/qt.conf +find dist/pesterchum.app -iname "*_debug" -exec rm -f '{}' \; +rm -rf Pesterchum +mv dist Pesterchum +rm -f pesterchum.dmg +hdiutil create pesterchum.dmg -srcdir Pesterchum -format UDZO diff --git a/setup-py2app.py b/setup-py2app.py new file mode 100644 index 0000000..8e6e09f --- /dev/null +++ b/setup-py2app.py @@ -0,0 +1,21 @@ +""" +This is a setup.py script generated by py2applet + +Usage: + python setup.py py2app +""" + +from setuptools import setup + +APP = ['pesterchum.py'] +DATA_FILES = ['pesterchum.js', 'profiles', 'themes', 'smilies', 'logs'] +OPTIONS = {'argv_emulation': False, 'includes': ['sip', 'PyQt4', 'PyQt4.QtCore', 'PyQt4.QtGui'], + 'excludes': ['PyQt4.QtDesigner', 'PyQt4.QtNetwork', 'PyQt4.QtOpenGL', 'PyQt4.QtScript', 'PyQt4.QtSql', 'PyQt4.QtTest', 'PyQt4.QtWebKit', 'PyQt4.QtXml', 'PyQt4.phonon'], + 'iconfile': 'trayicon32.icns'} + +setup( + app=APP, + data_files=DATA_FILES, + options={'py2app': OPTIONS}, + setup_requires=['py2app'], +)