优化更新: 1. 隐藏命令行窗口弹出 2. 优化打包目录结构按版本号分类 3. 使用subprocess替代os.system

This commit is contained in:
huangzhenpc
2025-02-13 18:19:06 +08:00
parent b5cbf0779b
commit dd0a307ff4
6 changed files with 110 additions and 26 deletions

View File

@@ -5,8 +5,19 @@ echo 开始打包流程...
:: 更新版本号
python update_version.py
:: 读取版本号
set /p VERSION=<version.txt
echo 当前版本: %VERSION%
:: 创建版本目录
set VERSION_DIR=dist\%VERSION%
if not exist "%VERSION_DIR%" mkdir "%VERSION_DIR%"
:: 使用新的spec文件进行打包
pyinstaller --noconfirm build_nezha.spec
echo 打包完成!
:: 移动文件到版本目录
move "dist\听泉cursor助手%VERSION%.exe" "%VERSION_DIR%\听泉cursor助手v%VERSION%.exe"
echo 打包完成!文件保存在: %VERSION_DIR%
pause