新增
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from PyInstaller.utils.hooks import collect_submodules
|
||||
|
||||
|
||||
project_root = Path(SPECPATH)
|
||||
app_version = os.environ.get("WECOM_BUILD_VERSION", "1.0.0").strip() or "1.0.0"
|
||||
app_name = f"ZhenAI-WeCom-Assistant-v{app_version}"
|
||||
|
||||
hidden_imports = [
|
||||
"app_version",
|
||||
"backend_client",
|
||||
"conversation_store",
|
||||
"mcp_bridge",
|
||||
"registration_store",
|
||||
"runtime_paths",
|
||||
"wechat_gui_qt",
|
||||
"PySide6.QtWebEngineCore",
|
||||
"PySide6.QtWebEngineWidgets",
|
||||
]
|
||||
hidden_imports += collect_submodules("mcp")
|
||||
|
||||
a = Analysis(
|
||||
[str(project_root / "wechat_gui.py")],
|
||||
pathex=[str(project_root)],
|
||||
binaries=[],
|
||||
datas=[
|
||||
(str(project_root / "edge_light_theme"), "edge_light_theme"),
|
||||
(str(project_root / "assets" / "brand"), "assets/brand"),
|
||||
],
|
||||
hiddenimports=hidden_imports,
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=["PyQt5", "PyQt6", "PySide2"],
|
||||
noarchive=False,
|
||||
optimize=0,
|
||||
)
|
||||
pyz = PYZ(a.pure)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
[],
|
||||
name=app_name,
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=False,
|
||||
console=False,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
icon=str(project_root / "assets" / "brand" / "zhenyangtang-icon.ico"),
|
||||
)
|
||||
Reference in New Issue
Block a user