build(packaging): add PyInstaller packaging

This commit is contained in:
jack
2026-07-13 13:40:19 -07:00
parent 87cfbabb4a
commit 5060df1527
4 changed files with 157 additions and 1 deletions
+62
View File
@@ -0,0 +1,62 @@
# -*- mode: python ; coding: utf-8 -*-
# Run from the project root: pyinstaller packaging/isc.spec
import sys
if sys.platform == "win32":
app_icon = "isc.ico"
elif sys.platform == "darwin":
app_icon = "isc.icns"
else:
app_icon = None
a = Analysis(
['../src/pygui/__main__.py'],
pathex=['src'],
binaries=[],
# Bundle the QML module so loadFromModule("ISC", "Main") resolves at runtime.
datas=[('../src/pygui/ISC', 'ISC')],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='ISC',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=app_icon,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='ISC',
)
if sys.platform == "darwin":
app = BUNDLE(
coll,
name='ISC.app',
icon=app_icon,
bundle_identifier=None,
)