更新打包脚本(自动寻找用户选择目录下的exe程序进行打包)

This commit is contained in:
阿甘 2023-06-28 22:33:16 +08:00
parent ea89b96b8e
commit 852ac6d58d

View File

@ -55,6 +55,14 @@ if "%BUILD_TYPE%"=="1" (
exit /b 1
)
REM 寻找当前要编译的exe程序
set "EXECUTABLE=%BUILD_DIR%\TabEditor.exe"
if not exist "%EXECUTABLE%" (
echo Error: Executable not found in the selected build directory.
pause
exit /b 1
)
REM 切换到Qt环境变量脚本所在目录
cd /d "C:\Qt\Qt5.14.2\5.14.2\mingw73_64\bin"
@ -65,11 +73,13 @@ REM 切换到构建目录
cd /d "%BUILD_DIR%"
REM 运行windeployqt命令来打包依赖项
windeployqt TabEditor.exe
echo Running windeployqt to package dependencies...
windeployqt "%EXECUTABLE%"
REM 切换回脚本所在目录
cd /d "%SCRIPT_DIR%"
REM 完成打包
echo.
echo Packaging completed successfully.
pause