buildapp.py 1.5 KB

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env python2
  2. #
  3. # This builds an .app out of Twine for use with OS X.
  4. # Call this with this command line: buildapp.py py2app
  5. from distutils.core import setup
  6. from version import versionString
  7. import py2app # pylint: disable=unused-import,import-error
  8. setup(app = ['app.py'], options = dict(py2app = dict( argv_emulation = True,
  9. iconfile = 'appicons/app.icns', \
  10. resources = ['icons', 'targets', 'appicons/doc.icns'], \
  11. plist = dict( \
  12. CFBundleShortVersionString = versionString, \
  13. CFBundleName = 'Twine', \
  14. CFBundleSignature = 'twee', \
  15. CFBundleIconFile = 'app.icns',\
  16. CFBundleGetInfoString = 'An open-source tool for telling interactive stories',\
  17. CFBundleDocumentTypes = [dict( \
  18. CFBundleTypeIconFile = 'doc.icns',\
  19. CFBundleTypeName = 'Twine story',\
  20. CFBundleTypeRole = 'Editor',\
  21. CFBundleTypeExtensions=["tws"]\
  22. )],\
  23. NSHumanReadableCopyright = 'GNU General Public License v3'))))