优化更新: 1. 隐藏命令行窗口弹出 2. 优化打包目录结构按版本号分类 3. 使用subprocess替代os.system
This commit is contained in:
13
build.bat
13
build.bat
@@ -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
|
||||
Reference in New Issue
Block a user