Skip to content

Commit a018085

Browse files
update build bat
1 parent 349d457 commit a018085

File tree

4 files changed

+49
-22
lines changed

4 files changed

+49
-22
lines changed

appveyor.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,27 @@ skip_commits:
1919
#---------------------------------#
2020
environment:
2121
matrix:
22-
# Qt6.7 / VisualStudio 2019 64bit
23-
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
24-
INIT_BAT: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat
25-
QT_PATH: C:\Qt\6.7\msvc2019_64
26-
2722
# Qt6.7 / VisualStudio 2022 64bit
2823
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
2924
INIT_BAT: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat
3025
QT_PATH: C:\Qt\6.7\msvc2019_64
3126

32-
# Qt6.5 / VisualStudio 2022 64bit
33-
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
34-
INIT_BAT: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat
27+
# Qt6.7 / VisualStudio 2019 64bit
28+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
29+
INIT_BAT: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat
30+
QT_PATH: C:\Qt\6.7\msvc2019_64
31+
32+
# Qt6.5 / VisualStudio 2019 64bit
33+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
34+
INIT_BAT: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat
3535
QT_PATH: C:\Qt\6.5\msvc2019_64
3636

37+
# Qt6.2 / VisualStudio 2019 64bit
38+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
39+
INIT_BAT: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat
40+
QT_PATH: C:\Qt\6.2\msvc2019_64
41+
42+
3743
# scripts that are called at very beginning, before repo cloning
3844
init:
3945
- git config --global core.autocrlf false

build.bat

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ rem
77

88
set BASEDIR=%~dp0
99

10-
call "C:\Qt\6.6.3\msvc2019_64\bin\qtenv2.bat"
10+
call "C:\Qt\6.8.0\msvc2022_64\bin\qtenv2.bat"
11+
rem call "C:\Qt\6.5.3\msvc2019_64\bin\qtenv2.bat"
1112
rem call "C:\Qt\5.13.0\msvc2017\bin\qtenv2.bat"
1213

1314
set ARCH=amd64
1415
set VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
1516
set VCVARSBAT=""
1617
set VSVER=2022 2019 2017
18+
set PATH=C:\Qt\Tools\CMake_64\bin;%PATH%
1719

1820
if exist %VSWHERE% (
1921
for %%v in (%VSVER%) do (
@@ -34,7 +36,7 @@ if exist %VCVARSBAT% (
3436
) else (
3537
echo Error! Compiler not found.
3638
pause
37-
exit /b
39+
exit
3840
)
3941

4042
cd /D %BASEDIR%

compile_install.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ exit /b
4747
:error
4848
echo.
4949
echo Compilation Error!!!
50-
echo.
51-
exit /b
50+
pause
51+
exit

configure.bat

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,31 +66,46 @@ for %%I in (devenv.com) do if exist %%~$path:I set DEVENV=%%~$path:I
6666

6767
if "%QMAKE%" == "" (
6868
echo Qt environment not found
69-
exit /b
69+
pause
70+
exit
7071
)
7172
qmake --version
7273

7374
if "%CMAKE%" == "" (
7475
echo CMake not found
75-
exit /b
76+
pause
77+
exit
7678
)
7779
cmake --version
7880

7981
if "%MAKE%" == "" (
8082
echo Make not found
81-
exit /b
83+
pause
84+
exit
8285
)
8386

8487
if "%MSCOMPILER%" == "" if "%DEVENV%" == "" (
8588
echo Visual Studio compiler not found
86-
exit /b
89+
pause
90+
exit
8791
)
8892

8993
:: vcvarsall.bat setup
9094
if /i "%Platform%" == "x64" (
91-
set VCVARSOPT=amd64
92-
set CMAKEOPT=-A x64
9395
set ENVSTR=Environment to build for 64-bit executable MSVC / Qt
96+
if "%VisualStudioVersion%" == "15.0" (
97+
:: Visual Studio 2017
98+
set VCVARSOPT=amd64
99+
set CMAKEOPT=-A x64 -T v141
100+
) else if "%VisualStudioVersion%" == "16.0" (
101+
:: Visual Studio 2019
102+
set VCVARSOPT=amd64
103+
set CMAKEOPT=-A x64 -T v142
104+
) else (
105+
:: Visual Studio 2022
106+
set VCVARSOPT=amd64
107+
set CMAKEOPT=-A x64
108+
)
94109
) else (
95110
set VCVARSOPT=x86
96111
set CMAKEOPT=-A Win32
@@ -152,7 +167,8 @@ del /f /q mongo-driver >nul 2>&1
152167
mklink /j mongo-driver mongo-c-driver-%MONBOC_VERSION% >nul 2>&1
153168

154169
cd %BASEDIR%3rdparty\mongo-driver
155-
del /f /q CMakeCache.txt cmake_install.cmake CMakeFiles Makefile >nul 2>&1
170+
rd /s /q CMakeFiles >nul 2>&1
171+
del /f /q CMakeCache.txt Makefile >nul 2>&1
156172
set CMAKECMD=cmake %CMAKEOPT% -S . -DCMAKE_BUILD_TYPE=Release -DENABLE_STATIC=ON -DENABLE_SSL=OFF -DENABLE_SNAPPY=OFF -DENABLE_ZLIB=OFF -DENABLE_ZSTD=OFF -DENABLE_SRV=OFF -DENABLE_SASL=OFF -DENABLE_ZLIB=OFF -DENABLE_SHM_COUNTERS=OFF -DENABLE_TESTS=OFF
157173
echo %CMAKECMD%
158174
%CMAKECMD% >nul 2>&1
@@ -166,7 +182,8 @@ if ERRORLEVEL 1 (
166182
echo;
167183
echo Build failed.
168184
echo MongoDB driver not available.
169-
exit /b
185+
pause
186+
exit
170187
)
171188

172189
:: Builds LZ4
@@ -186,7 +203,8 @@ if ERRORLEVEL 1 (
186203
echo;
187204
echo Build failed.
188205
echo LZ4 not available.
189-
exit /b
206+
pause
207+
exit
190208
)
191209

192210
:: Builds glog
@@ -209,7 +227,8 @@ if ERRORLEVEL 1 (
209227
echo;
210228
echo Build failed.
211229
echo glog not available.
212-
exit /b
230+
pause
231+
exit
213232
)
214233

215234
:: Builds TreeFrog

0 commit comments

Comments
 (0)