-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWeChatDataExport.spec
More file actions
50 lines (46 loc) · 1.41 KB
/
Copy pathWeChatDataExport.spec
File metadata and controls
50 lines (46 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# -*- mode: python ; coding: utf-8 -*-
# PyInstaller 打包配置:单目录模式(不用单文件,见目标 6 风险预案)
# 构建:.venv\Scripts\pyinstaller.exe WeChatDataExport.spec --noconfirm
# 便携布局:exe 所在目录需有 local_config.json 与 dev_data/(源码运行时等价于仓库根)
a = Analysis(
["server\\__main__.py"],
pathex=["."],
binaries=[],
datas=[("frontend\\dist", "frontend\\dist")],
hiddenimports=[
# uvicorn 按需导入的模块
"uvicorn.logging",
"uvicorn.loops.auto",
"uvicorn.protocols.http.auto",
"uvicorn.protocols.websockets.auto",
"uvicorn.lifespan.on",
# pywebview Windows 后端
"webview.platforms.winforms",
"clr_loader",
# 项目内由字符串/延迟导入的模块
"server.main",
],
hookspath=[],
runtime_hooks=["rthooks\\windowed_stdout.py"],
excludes=[],
noarchive=False,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name="WeChatDataExport",
debug=False,
console=False, # console 构建 + 运行时隐藏控制台(windowed 冻结会原生层静默崩溃,见 server/window.py)
disable_windowed_traceback=False,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=False, # 风险预案:不开 UPX(杀软误报)
name="WeChatDataExport",
)