# -*- mode: python ; coding: utf-8 -*- """PyInstaller one-file: AzA Startpanel / Control Panel (WebView + Matterhorn-Video).""" from pathlib import Path from PyInstaller.utils.hooks import collect_submodules project_root = Path(SPECPATH) datas = [] for rel in ( "assets/matternhorn-aza-2.mp4", "assets/matternhorn.png", "logo.png", "logo.ico", "version.json", ): src = project_root / rel if src.is_file(): datas.append((str(src), str(Path(rel).parent) if Path(rel).parent != Path(".") else ".")) hiddenimports = list(collect_submodules("webview")) + [ "aza_updater", "aza_update_core", "aza_version", "aza_client_watermark", "_build_info", "PIL", "PIL.Image", "PIL.ImageTk", "PIL.ImageEnhance", "PIL.ImageFilter", "requests", ] a = Analysis( [str(project_root / "aza_start_panel.py")], pathex=[str(project_root)], binaries=[], datas=datas, hiddenimports=hiddenimports, hookspath=[], hooksconfig={}, runtime_hooks=[], excludes=[], noarchive=False, optimize=0, ) pyz = PYZ(a.pure) _icon = project_root / "logo.ico" _icon_arg = {"icon": str(_icon)} if _icon.is_file() else {} exe = EXE( pyz, a.scripts, a.binaries, a.datas, [], name="aza_start_panel", debug=False, bootloader_ignore_signals=False, strip=False, upx=True, upx_exclude=[], runtime_tmpdir=None, console=False, disable_windowed_traceback=False, argv_emulation=False, target_arch=None, codesign_identity=None, entitlements_file=None, **_icon_arg, )