standalone.spec 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # -*- mode: python -*-
  2. block_cipher = None
  3. import sys
  4. sys.modules['FixTk'] = None
  5. import xml.etree.ElementTree as ET
  6. version = ET.parse('cdn/gameassets/Zwift_Updates_Root/Zwift_ver_cur.xml').getroot().get('version')
  7. a = Analysis(['standalone.py'],
  8. pathex=['protobuf'],
  9. binaries=[],
  10. datas=[('ssl/*', 'ssl'), ('data/*', 'data')],
  11. hiddenimports=[],
  12. hookspath=[],
  13. runtime_hooks=[],
  14. excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'],
  15. win_no_prefer_redirects=False,
  16. win_private_assemblies=False,
  17. cipher=block_cipher,
  18. noarchive=False)
  19. a.datas += Tree('cdn', prefix='cdn')
  20. pyz = PYZ(a.pure, a.zipped_data,
  21. cipher=block_cipher)
  22. exe = EXE(pyz,
  23. a.scripts,
  24. a.binaries,
  25. a.zipfiles,
  26. a.datas,
  27. [],
  28. name='zoffline_' + version,
  29. debug=False,
  30. bootloader_ignore_signals=False,
  31. strip=False,
  32. upx=True,
  33. upx_exclude=['greenlet\\*.pyd', '_uuid.pyd', 'python3.dll', 'api-ms-win-*.dll'],
  34. runtime_tmpdir=None,
  35. console=True )
  36. import subprocess
  37. subprocess.call(['C:\\Program Files (x86)\\Windows Kits\\10\\App Certification Kit\\signtool.exe', 'sign',
  38. '/f', 'ssl\\cert-zwift-com.p12', '/fd', 'sha1',
  39. '/t', 'http://timestamp.digicert.com',
  40. 'dist\\zoffline_%s.exe' % version])