-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathrelease.bat
More file actions
25 lines (21 loc) · 839 Bytes
/
Copy pathrelease.bat
File metadata and controls
25 lines (21 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@echo off
@REM Builds and packages a Windows release into .\release\ using the same CMake rules as the GitHub Actions workflow.
@REM Run from "Developer command prompt for VS 2022".
@REM Usage: release.bat <Qt-path>
@REM Example: release.bat C:\Qt\6.10.3\msvc2022_64
if "%~1"=="" (
echo Usage: release.bat ^<Qt-path^>
echo Example: release.bat C:\Qt\6.10.3\msvc2022_64
exit /b 1
)
if not exist "%~1\bin\windeployqt.exe" (
echo ERROR: windeployqt.exe not found in %~1\bin
exit /b 1
)
set "PATH=%~1\bin;%PATH%"
set "CMAKE_PREFIX_PATH=%~1"
cmake -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release || exit /b 1
cmake --build build --config Release --parallel || exit /b 1
cmake --install build --config Release --prefix "%CD%\release" || exit /b 1
echo.
echo DONE - packaged build is in .\release\