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.
MathStudySystem/build.sh

28 lines
573 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#!/bin/bash
echo "开始打包数学学习系统..."
echo
# 检查是否安装了PyInstaller
if ! python -c "import PyInstaller" 2>/dev/null; then
echo "错误未找到PyInstaller请先安装pip install pyinstaller"
exit 1
fi
# 清理之前的构建文件
rm -rf build dist __pycache__
echo "清理完成,开始打包..."
echo
# 执行打包命令
pyinstaller --clean MathStudySystem.spec
if [ $? -ne 0 ]; then
echo "打包失败!请检查错误信息。"
exit 1
fi
echo
echo "打包完成!可执行文件位于 dist 目录中。"
echo