diff --git a/MANIFEST.in b/MANIFEST.in index e4e31a9c21..96450d1d20 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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 diff --git a/setup-bundle.sh b/setup-bundle.sh new file mode 100755 index 0000000000..c32231e3ad --- /dev/null +++ b/setup-bundle.sh @@ -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 diff --git a/setup.py b/setup.py index 3e5dd03fd0..a57dc2dc4b 100644 --- a/setup.py +++ b/setup.py @@ -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')) diff --git a/share/pixmaps/tryton/tryton.icns b/share/pixmaps/tryton/tryton.icns new file mode 100644 index 0000000000..c959528126 Binary files /dev/null and b/share/pixmaps/tryton/tryton.icns differ