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.
@echo off
echo 开始打包数学学习系统...
echo.
REM 检查是否安装了PyInstaller
python -c "import PyInstaller" 2>nul
if errorlevel 1 (
echo 错误:未找到PyInstaller,请先安装:pip install pyinstaller
pause
exit /b 1
)
REM 清理之前的构建文件
if exist "build" rmdir /s /q "build"
if exist "dist" rmdir /s /q "dist"
if exist "__pycache__" rmdir /s /q "__pycache__"
echo 清理完成,开始打包...
REM 执行打包命令
pyinstaller --clean MathStudySystem.spec
echo 打包失败!请检查错误信息。
echo 打包完成!可执行文件位于 dist 目录中。