GrabBag/GrabBagPrj/pkg_belttearingtcpprotocoltest.bat

39 lines
908 B
Batchfile

@echo off
setlocal
REM Windows packaging tool directories (system environment variables):
REM QT_PATH=D:\Qt\5.15.2
set PRJ_PATH=%~dp0
set PRJ_PATH=%PRJ_PATH:~0,-1%
set APP_NAME=BeltTearingTcpProtocolTest
set OUT_DIR=%PRJ_PATH%\buildwin\%APP_NAME%
set BUILD_DIR=%PRJ_PATH%\build\Test\BeltTearingTcpProtocolTest\release
if not exist "%OUT_DIR%" mkdir "%OUT_DIR%"
cd /d "%OUT_DIR%"
powershell -Command "Remove-Item * -Recurse -Force"
copy "%BUILD_DIR%\%APP_NAME%.exe" .\
if errorlevel 1 (
echo ERROR: executable not found: "%BUILD_DIR%\%APP_NAME%.exe"
exit /b 1
)
"%QT_PATH%\msvc2019_64\bin\windeployqt.exe" "%APP_NAME%.exe"
if errorlevel 1 (
echo [ERROR] windeployqt failed.
exit /b 2
)
copy "%PRJ_PATH%\..\Test\BeltTearingTcpProtocolTest\README.md" .\ >nul
echo.
echo === %APP_NAME% Windows packaging completed ===
echo Output directory: %OUT_DIR%
echo.
cd /d "%PRJ_PATH%"
endlocal