From 852ac6d58d0b3de55bfd9ab000859357b68b5d5a Mon Sep 17 00:00:00 2001 From: Crimson Date: Wed, 28 Jun 2023 22:33:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=89=93=E5=8C=85=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=EF=BC=88=E8=87=AA=E5=8A=A8=E5=AF=BB=E6=89=BE=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=80=89=E6=8B=A9=E7=9B=AE=E5=BD=95=E4=B8=8B=E7=9A=84?= =?UTF-8?q?exe=E7=A8=8B=E5=BA=8F=E8=BF=9B=E8=A1=8C=E6=89=93=E5=8C=85?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packaging.bat | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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