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.bat

33 lines
688 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.

@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 清理完成,开始打包...
echo.
REM 执行打包命令
pyinstaller --clean MathStudySystem.spec
if errorlevel 1 (
echo 打包失败!请检查错误信息。
pause
exit /b 1
)
echo.
echo 打包完成!可执行文件位于 dist 目录中。
echo.
pause