diff --git a/packaging.bat b/packaging.bat index c3f0007..93033af 100644 --- a/packaging.bat +++ b/packaging.bat @@ -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