-
-
Notifications
You must be signed in to change notification settings - Fork 223
/
Copy pathbuild.bat
45 lines (37 loc) · 889 Bytes
/
build.bat
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
@echo off
@setlocal
rem
rem Edit this line to run the batch file for Qt environment.
rem
set BASEDIR=%~dp0
call "C:\Qt\6.7.3\msvc2022_64\bin\qtenv2.bat"
rem call "C:\Qt\6.5.3\msvc2019_64\bin\qtenv2.bat"
set ARCH=amd64
set VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
set VCVARSBAT=""
set VSVER=2022 2019
set PATH=C:\Qt\Tools\CMake_64\bin;%PATH%
if exist %VSWHERE% (
for %%v in (%VSVER%) do (
for /f "usebackq tokens=*" %%i in (`%VSWHERE% -find **\vcvarsall.bat`) do (
echo %%i | find "%%v" >NUL
if not ERRORLEVEL 1 (
set VCVARSBAT="%%i"
goto :break
)
)
)
)
:break
if exist %VCVARSBAT% (
echo %VCVARSBAT% %ARCH%
call %VCVARSBAT% %ARCH%
) else (
echo Error! Visual Studio not found.
pause
exit
)
cd /D %BASEDIR%
call compile_install.bat
pause
exit /b