You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
440 B

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/ 目录")