You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.5 KiB

  1. # -*- mode: python ; coding: utf-8 -*-
  2. """
  3. Example build.spec file
  4. This hits most of the major notes required for
  5. building a stand alone version of your Gooey application.
  6. """
  7. import os
  8. import platform
  9. import gooey
  10. gooey_root = os.path.dirname(gooey.__file__)
  11. gooey_languages = Tree(os.path.join(gooey_root, 'languages'), prefix = 'gooey/languages')
  12. gooey_images = Tree(os.path.join(gooey_root, 'images'), prefix = 'gooey/images')
  13. from PyInstaller.building.api import EXE, PYZ, COLLECT
  14. from PyInstaller.building.build_main import Analysis
  15. from PyInstaller.building.datastruct import Tree
  16. from PyInstaller.building.osx import BUNDLE
  17. block_cipher = None
  18. a = Analysis(['APPNAME.py'], # replace me with your path
  19. pathex=['/path/to/APP.py'],
  20. hiddenimports=[],
  21. hookspath=None,
  22. runtime_hooks=None,
  23. )
  24. pyz = PYZ(a.pure)
  25. options = [('u', None, 'OPTION'), ('v', None, 'OPTION'), ('w', None, 'OPTION')]
  26. exe = EXE(pyz,
  27. a.scripts,
  28. a.binaries,
  29. a.zipfiles,
  30. a.datas,
  31. options,
  32. gooey_languages,
  33. gooey_images,
  34. name='APPNAME',
  35. debug=False,
  36. strip=None,
  37. upx=True,
  38. console=False,
  39. icon=os.path.join(gooey_root, 'images', 'program_icon.ico'))
  40. info_plist = {'addition_prop': 'additional_value'}
  41. app = BUNDLE(exe,
  42. name='APPNAME.app',
  43. bundle_identifier=None,
  44. info_plist=info_plist
  45. )