Skip to content

Commit def5dc7

Browse files
fix compilarion error
1 parent 5cea401 commit def5dc7

File tree

4 files changed

+31
-33
lines changed

4 files changed

+31
-33
lines changed

build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ rem call "C:\Qt\6.5.3\msvc2019_64\bin\qtenv2.bat"
1313
set ARCH=amd64
1414
set VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
1515
set VCVARSBAT=""
16-
set VSVER=2019
16+
set VSVER=2022 2019
1717
set PATH=C:\Qt\Tools\CMake_64\bin;%PATH%
1818

1919
if exist %VSWHERE% (

compile_install.bat

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

configure.bat

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -70,52 +70,51 @@ for %%I in (devenv.com) do if exist %%~$path:I set DEVENV=%%~$path:I
7070
if "%QMAKE%" == "" (
7171
echo Qt environment not found
7272
pause
73-
exit
73+
exit /b 1
7474
)
7575
qmake --version
7676

7777
if "%CMAKE%" == "" (
7878
echo CMake not found
7979
pause
80-
exit
80+
exit /b 1
8181
)
8282
cmake --version
8383

8484
if "%NMAKE%" == "" (
8585
echo Make not found
8686
pause
87-
exit
87+
exit /b 1
8888
)
8989

9090
if "%MSCOMPILER%" == "" if "%DEVENV%" == "" (
9191
echo Visual Studio compiler not found
9292
pause
93-
exit
93+
exit /b 1
94+
)
95+
96+
if /i not "%Platform%" == "x64" (
97+
echo Use 64-bit architecture
98+
pause
99+
exit /b 1
94100
)
95101

96102
:: vcvarsall.bat setup
97-
if /i "%Platform%" == "x64" (
98-
set ENVSTR=Environment to build for 64-bit executable MSVC / Qt
99-
if "%VisualStudioVersion%" == "15.0" (
100-
:: Visual Studio 2017
101-
set VCVARSOPT=amd64
102-
set CMAKEOPT=-A x64 -T v141
103-
set MSVSVER=2017
104-
) else if "%VisualStudioVersion%" == "16.0" (
105-
:: Visual Studio 2019
106-
set VCVARSOPT=amd64
107-
set CMAKEOPT=-A x64 -T v142
108-
set MSVSVER=2019
109-
) else (
110-
:: Visual Studio 2022
111-
set VCVARSOPT=amd64
112-
set CMAKEOPT=-A x64
113-
set MSVSVER=2022
114-
)
103+
set ENVSTR=Environment to build for 64-bit executable MSVC / Qt
104+
if "%VisualStudioVersion%" == "17.0" (
105+
:: Visual Studio 2022
106+
set VCVARSOPT=amd64
107+
set CMAKEOPT=-A x64 -T v143
108+
set MSVSVER=2022
109+
) else if "%VisualStudioVersion%" == "16.0" (
110+
:: Visual Studio 2019
111+
set VCVARSOPT=amd64
112+
set CMAKEOPT=-A x64 -T v142
113+
set MSVSVER=2019
115114
) else (
116-
set VCVARSOPT=x86
117-
set CMAKEOPT=-A Win32
118-
set ENVSTR=Environment to build for 32-bit executable MSVC / Qt
115+
echo Use Visual Studio 2022 or 2019
116+
pause
117+
exit /b 1
119118
)
120119

121120
SET /P X="%ENVSTR%"<NUL
@@ -188,7 +187,7 @@ if ERRORLEVEL 1 (
188187
echo Build failed.
189188
echo MongoDB driver not available.
190189
pause
191-
exit
190+
exit /b 1
192191
)
193192

194193
:: Builds LZ4
@@ -209,7 +208,7 @@ if ERRORLEVEL 1 (
209208
echo Build failed.
210209
echo LZ4 not available.
211210
pause
212-
exit
211+
exit /b 1
213212
)
214213

215214
:: Builds glog
@@ -233,7 +232,7 @@ if ERRORLEVEL 1 (
233232
echo Build failed.
234233
echo glog not available.
235234
pause
236-
exit
235+
exit /b 1
237236
)
238237

239238
:: Builds TreeFrog

src/tsystemglobal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ template<typename... Args>
108108
void tSystemDebug(const std::format_string<Args...> &fmt, Args&&... args)
109109
{
110110
auto msg = std::format(fmt, std::forward<Args>(args)...);
111-
Tf::tSystemMessage((int)Tf::DebugLevel, msg);
111+
Tf::tSystemMessage((int)Tf::DebugLevel, QByteArray::fromStdString(msg));
112112
}
113113

114114
template<typename... Args>
115115
void tSystemTrace(const std::format_string<Args...> &fmt, Args&&... args)
116116
{
117117
auto msg = std::format(fmt, std::forward<Args>(args)...);
118-
Tf::tSystemMessage((int)Tf::TraceLevel, msg);
118+
Tf::tSystemMessage((int)Tf::TraceLevel, QByteArray::fromStdString(msg));
119119
}
120120

121121
#else

0 commit comments

Comments
 (0)