-
Notifications
You must be signed in to change notification settings - Fork 373
Expand file tree
/
Copy pathbuild_msvc_win64.bat
More file actions
65 lines (54 loc) · 1.59 KB
/
build_msvc_win64.bat
File metadata and controls
65 lines (54 loc) · 1.59 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@echo off
setlocal enabledelayedexpansion
set FLAG=%~1
set DEFINE=
if /I "%FLAG%"=="native" (
set DEFINE=X_BUILD_INSTALL
) else if /I "%FLAG%"=="pdb" (
set DEFINE=CREATE_PDB
)
set VS_VERSIONS=18 2022 2019 2017
set VS_EDITIONS=Community Professional Enterprise
set QT_BASE_PATH="C:\Qt"
set VSVARS_PATH=
for /f "tokens=*" %%a in (
'reg query "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" /s /f "Visual Studio" ^| findstr "HKEY"'
) do (
for /f "tokens=2*" %%b in (
'reg query "%%a" /v InstallLocation 2^>nul ^| findstr /i "InstallLocation"'
) do (
if not "%%c"=="" (
if exist "%%c\VC\Auxiliary\Build\vcvars64.bat" (
set VSVARS_PATH="%%c\VC\Auxiliary\Build\vcvars64.bat"
goto :found_vs
)
)
)
)
:found_vs
if not defined VSVARS_PATH (
echo Visual Studio not found in registry or known paths.
goto :exit
)
call %VSVARS_PATH%
set QMAKE_PATH=
for /D %%Q in (%QT_BASE_PATH%\5.*) do (
for /D %%K in (%%Q\msvc*_64 %%Q\msvc*_arm64) do (
if exist "%%K\bin\qmake.exe" (
set QMAKE_PATH="%%K\bin\qmake.exe"
goto :found_qt
)
)
)
:found_qt
IF NOT DEFINED QMAKE_PATH (
echo "Qt 5.x version not found. Please ensure it is installed."
goto exit
)
set SEVENZIP_PATH="C:\Program Files\7-Zip\7z.exe"
set INNOSETUP_PATH="C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
set X_SOURCE_PATH=%~dp0
set X_BUILD_NAME=die
set X_BUILD_PREFIX=win64
set /p X_RELEASE_VERSION=<%X_SOURCE_PATH%\release_version.txt
call %X_SOURCE_PATH%\build_win_generic_check.cmd