添加编译文件、打包瘦身、UI逻辑调整

This commit is contained in:
2025-11-05 18:04:52 +08:00
parent c77ff1c0ae
commit df0e9ecb22
9 changed files with 434 additions and 199 deletions
+37
View File
@@ -0,0 +1,37 @@
# -*- mode: python ; coding: utf-8 -*-
a = Analysis(
['starter.py'],
pathex=[],
binaries=[],
datas=[('config.ini', '.')], # 明确包含配置文件
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=['PyQt5', 'PyQt6', 'PySide2', 'PySide6', 'matplotlib', 'numpy', 'pandas', 'jupyter', 'notebook', 'ipython'], # 排除不必要的包
noarchive=False,
optimize=2, # 启用最高级别优化
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='starter',
debug=False,
bootloader_ignore_signals=False,
strip=True, # 去除调试符号
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,
)