Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MSVC version check to Windows buildenv #53

Open
mkrautz opened this issue Apr 13, 2017 · 2 comments
Open

Add MSVC version check to Windows buildenv #53

mkrautz opened this issue Apr 13, 2017 · 2 comments

Comments

@mkrautz
Copy link
Contributor

mkrautz commented Apr 13, 2017

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
Copy link
Contributor Author

mkrautz commented Apr 13, 2017

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

@mkrautz
Copy link
Contributor Author

mkrautz commented Apr 13, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant