Add py2app to setup.py

Add tryton.icns for bundle icon
This commit is contained in:
Cédric Krier committed 2009-04-10 01:00:45 +02:00
1 parent edb9c28024
commit d026c6513e
4 files changed
+29

No files matched your search

+2
View File
@@ -6,6 +6,7 @@ include TODO
include CHANGELOG
include setup.nsi
include setup-single.nsi
include setup-bundle.sh
include tryton.desktop
include *.nsh
include doc/*
@@ -13,4 +14,5 @@ include share/pixmaps/tryton-icon.png
include share/pixmaps/tryton/*.png
include share/pixmaps/tryton/*.svg
include share/pixmaps/tryton/*.ico
include share/pixmaps/tryton/*.icns
recursive-include share/locale *.mo
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
VERSION=`python -c "import os; execfile(os.path.join('tryton', 'version.py')); print VERSION"`
for i in dist/tryton.app/Contents/Resources/share/pixmaps/tryton/*.svg; do
rsvg-convert $i -o ${i/svg/png};
done
rm -f dist/tryton.app/Contents/Resources/share/pixmaps/tryton/*.svg
cp CHANGELOG COPYRIGHT LICENSE README TODO dist/
hdiutil create tryton-${VERSION}.dmg -volname "Tryton Client ${VERSION}" -fs HFS+ -srcfolder dist
+16
View File
@@ -78,6 +78,22 @@ if os.name == 'nt':
}
}
args['zipfile'] = None
elif os.name == 'mac' \
or (hasattr(os, 'uname') and os.uname()[0] == 'Darwin'):
import py2app
args['app'] = [os.path.join('tryton', 'client.py')]
args['options'] = {
'py2app': {
'argv_emulation': True,
'includes': 'pygtk, gtk, glib, cairo, pango, pangocairo, atk, ' \
'gobject, gio, gtk.keysyms',
'plist': {
'CFBundleIdentifier': 'org.tryton',
},
'iconfile': os.path.join('share', 'pixmaps', 'tryton',
'tryton.icns'),
},
}
execfile(os.path.join('tryton', 'version.py'))
Binary file not shown.