mumble-voip / mumble-releng

Mumble Release Engineering
Other
17 stars 21 forks source link

Add MSVC version check to Windows buildenv #53

Open mkrautz opened 7 years ago

mkrautz commented 7 years ago

Something like this, maybe:

diff --git a/buildenv/1.3.x/win32-static/setup/prep.cmd b/buildenv/1.3.x/win32-static/setup/prep.cmd
index 7d5f6ed..6def575 100644
--- a/buildenv/1.3.x/win32-static/setup/prep.cmd
+++ b/buildenv/1.3.x/win32-static/setup/prep.cmd
@@ -227,3 +227,15 @@ SET PATH=%MUMBLE_JOM_PREFIX%\bin;%PATH%
 SET PATH=%MUMBLE_PROTOBUF_PREFIX%\bin;%PATH%
 if "%ARCH%" == "x86" SET PATH=%MUMBLE_ICE_PREFIX%\bin;%PATH%
 if "%ARCH%" == "amd64" SET PATH=%MUMBLE_ICE_PREFIX%\bin\x64;%PATH%
+
+:: Finally, check the compiler version
+echo "#if _MSC_FULL_VER < 190024216" > %TEMP%\mumble_buildenv_cl_check.c
+echo " #error" >> %TEMP%\mumble_buildenv_cl_check.c
+echo "#endif" >> %TEMP%\mumble_buildenv_cl_check.c
+if errorlevel 1 (
+       echo.
+       echo Mumble requires MSVC 2015 Update 3 or newer...
+       echo Unable to initialize build environment. Aborting...
+       echo.
+       exit /b 1
+)
\ No newline at end of file
mkrautz commented 7 years ago

@Kissaki had problems with this... It would be nice if we could check it at prep time.

mkrautz commented 7 years ago

Patch is incomplete, it doesn't invoke cl.exe...