Compare commits
3 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
a652d20228 | 4 months ago |
|
|
abcf922039 | 4 months ago |
|
|
0bbfa05659 | 4 months ago |
@ -0,0 +1,18 @@
|
||||
import PyInstaller.__main__
|
||||
import os
|
||||
|
||||
# 打包配置
|
||||
files = ['user.py', 'paper_manager.py', 'question_generator.py']
|
||||
add_data_args = [f'--add-data=src/{f};.' for f in files]
|
||||
|
||||
PyInstaller.__main__.run([
|
||||
'src/MainSystem.py',
|
||||
'--onefile',
|
||||
'--console',
|
||||
'--name=数学试卷生成系统',
|
||||
'--clean',
|
||||
'--noconfirm',
|
||||
*add_data_args # 包含所有源文件
|
||||
])
|
||||
|
||||
print("打包完成!可执行文件在 dist/ 目录")
|
||||
Loading…
Reference in new issue