godot/platform
Gary Oberbrunner d1318ee12c Enable SCons to autodetect Windows MSVC compiler
SCons has good compiler detection logic for MSVC compilers. Up to now,
Godot hasn't used it; it depends on passed-in OS environment vars from
a specific Visual Studio cmd.exe windows. This makes it harder to
build from a msys or cygwin shell.

This change allows SCons to autodetect Visual Studio unless it sees
VCINSTALLDIR in the os.environ. It also adds a 'msvc_version' arg for
manual specification of compiler version, and uses the existing 'bits'
arg to specify the target architecture. More detail could be added as
desired. It also adds 'use_mingw' to always use mingw, even if Visual
Studio is installed. That uses the existing mingw setup logic.

If people are used to building Godot in a Visual Studio cmd window,
this should not change the behavior in that case, since VCINSTALLDIR
will be set in those windows. (However, note that you could now unset
that var and build with any other MSVC version or target arch, even in
that window.)

I refactored much of platform/windows/detect.py during this, to
simplify and clarify the logic. I also cleaned up a bunch of env var
settings in windows/detect.py and SConstruct to use modern SCons
idioms and simplify things.

I suspect this will also enable using the Intel compiler on Windows,
though that hasn't been tested.
2018-03-13 09:51:05 -04:00
..
android Properly closing all files in Python code 2018-03-11 14:55:50 +01:00
haiku Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
iphone fix iOS build - error due to GLES2 missing include (with the advice from bruvzg[m] on irc) 2018-03-13 10:42:23 +01:00
javascript Reinstate WebGL 1.0 driver in HTML5 platform 2018-03-07 20:38:14 +01:00
osx Improved error checking at EditorExportPlatformPC::export_project 2018-03-06 14:23:17 -03:00
server SCons: Fix linking system pcre2 on server platform 2018-03-04 13:46:54 +01:00
uwp Enable SCons to autodetect Windows MSVC compiler 2018-03-13 09:51:05 -04:00
windows Enable SCons to autodetect Windows MSVC compiler 2018-03-13 09:51:05 -04:00
x11 Explicitly set OpenGL profile to core (X11, Windows). 2018-03-06 15:53:30 +02:00
register_platform_apis.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
SCsub Properly closing all files in Python code 2018-03-11 14:55:50 +01:00