build: PyInstaller打包配置+启动器

This commit is contained in:
2026-05-08 16:15:45 +08:00
parent c7ba14a81a
commit a5f4275e19
4 changed files with 104 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
"""
PyInstaller打包脚本
运行: python build_exe.py
输出: dist/cDNA_Analyzer.exe
"""
import PyInstaller.__main__
import os
BASE = os.path.dirname(os.path.abspath(__file__))
PyInstaller.__main__.run([
'web/launcher.py',
'--name=cDNA_Analyzer',
'--onefile',
'--windowed',
'--add-data', f'web/templates;templates',
'--add-data', f'web/static;static',
'--hidden-import', 'skimage',
'--hidden-import', 'scipy.ndimage',
'--hidden-import', 'matplotlib.backends.backend_agg',
'--collect-all', 'skimage',
'--noconfirm',
'--clean',
])
print('\n完成!exe 在 dist/ 目录')