Ultimaker-Cura.spec.jinja 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # -*- mode: python ; coding: utf-8 -*-
  2. from PyInstaller.utils.hooks import collect_all
  3. import os
  4. datas = {{ datas }}
  5. binaries = {{ binaries }}
  6. hiddenimports = {{ hiddenimports }}
  7. {% for value in collect_all %}tmp_ret = collect_all('{{ value }}')
  8. datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
  9. {% endfor %}
  10. block_cipher = None
  11. a = Analysis(
  12. [{{ entrypoint }}],
  13. pathex=[],
  14. binaries=binaries,
  15. datas=datas,
  16. hiddenimports=hiddenimports,
  17. hookspath=[],
  18. hooksconfig={},
  19. runtime_hooks=[],
  20. excludes=[],
  21. win_no_prefer_redirects=False,
  22. win_private_assemblies=False,
  23. cipher=block_cipher,
  24. noarchive=False
  25. )
  26. pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
  27. exe = EXE(
  28. pyz,
  29. a.scripts,
  30. [],
  31. exclude_binaries=True,
  32. name=r'{{ name }}',
  33. debug=False,
  34. bootloader_ignore_signals=False,
  35. strip={{ strip }},
  36. upx={{ upx }},
  37. console=False,
  38. disable_windowed_traceback=False,
  39. argv_emulation=False,
  40. target_arch={{ target_arch }},
  41. codesign_identity=os.getenv('CODESIGN_IDENTITY', None),
  42. entitlements_file={{ entitlements_file }},
  43. icon={{ icon }}
  44. )
  45. coll = COLLECT(
  46. exe,
  47. a.binaries,
  48. a.zipfiles,
  49. a.datas,
  50. strip=False,
  51. upx=True,
  52. upx_exclude=[],
  53. name=r'{{ name }}'
  54. )
  55. {% if macos == true %}app = BUNDLE(
  56. coll,
  57. name='{{ name }}.app',
  58. icon={{ icon }},
  59. bundle_identifier={{ osx_bundle_identifier }}
  60. ){% endif %}