d1318ee12c
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. |
||
---|---|---|
.. | ||
export | ||
context_gl_win.cpp | ||
context_gl_win.h | ||
crash_handler_win.cpp | ||
crash_handler_win.h | ||
ctxgl_procaddr.cpp | ||
ctxgl_procaddr.h | ||
detect.py | ||
godot_res.rc | ||
godot_win.cpp | ||
godot.ico | ||
joypad.cpp | ||
joypad.h | ||
key_mapping_win.cpp | ||
key_mapping_win.h | ||
lang_table.h | ||
logo.png | ||
os_windows.cpp | ||
os_windows.h | ||
platform_config.h | ||
power_windows.cpp | ||
power_windows.h | ||
SCsub | ||
windows_terminal_logger.cpp | ||
windows_terminal_logger.h |