diff options
author | yg2f <yoann@terminajones.com> | 2016-09-15 18:04:26 +0200 |
---|---|---|
committer | yg2f <yoann@terminajones.com> | 2016-09-16 11:17:57 +0200 |
commit | 663d4ee7de9741e4e55255908fbecd8582097ae3 (patch) | |
tree | 06aade4fc11cb51c4ff7bfc55c7d7849d920f9d7 /platform/windows | |
parent | 4613cb7874a7a6beb3195bebf06d7ecfbd2454c3 (diff) |
scons detects standalone MSVC on Windows
Under Windows, Scons is now capable of detecting and compiling with
standalone MSVC compilers (aka "Visual C++ Build Tools").
http://landinghub.visualstudio.com/visual-cpp-build-tools
Tried with version 2015, and native x86 and x64 compilers under
Windows 10 pro 64 and Windows 8.1 64, with the default Win8 SDK
provided by the "Visual C++ Build Tools" web-installer.
Follow the same compiling instructions than for compiling with Visual
Studio, except that Visual Studio is no more required.
KNOWN ISSUES :
- ``methods.detect_visual_c_compiler_version()`` will emit a warning message
on computers where the ``VSINSTALLDIR`` environement variable is not present.
But it should compile just fine and still automatically detects the 32 or
64 bits according to the compiler you picked.
TODO :
- eventually, update ``platform/winrt/dectet.py`` with function
``methods.msvc_is_detected()`` and try to compile winrt/UWP with
these standalone compilers (if you did not select Win10 SDK when
installing the standalone tools, you can run it again).
- update doc to make users aware of "Visual C++ Build Tools" aka
"stadalone MSVC".
- eventually, update ``methods.detect_visual_c_compiler_version()``
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/detect.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 0548b84cfa..12ea5a93ee 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -1,10 +1,11 @@ # -# tested on | Windows native | Linux cross-compilation -# ------------------------+-------------------+--------------------------- -# MSVS C++ 2010 Express | WORKS | n/a -# Mingw-w64 | WORKS | WORKS -# Mingw-w32 | WORKS | WORKS -# MinGW | WORKS | untested +# tested on | Windows native | Linux cross-compilation +# ----------------------------+-------------------+--------------------------- +# MSVS C++ 2010 Express | WORKS | n/a +# Visual C++ Build Tools 2015 | WORKS | n/a +# Mingw-w64 | WORKS | WORKS +# Mingw-w32 | WORKS | WORKS +# MinGW | WORKS | untested # ##### # Notes about MSVS C++ : @@ -12,6 +13,12 @@ # - MSVC2010-Express compiles to 32bits only. # ##### +# Note about Visual C++ Build Tools : +# +# - Visual C++ Build Tools is the standalone MSVC compiler : +# http://landinghub.visualstudio.com/visual-cpp-build-tools +# +##### # Notes about Mingw-w64 and Mingw-w32 under Windows : # # - both can be installed using the official installer : @@ -78,7 +85,7 @@ ##### # TODO : -# +# # - finish to cleanup this script to remove all the remains of previous hacks and workarounds # - make it work with the Windows7 SDK that is supposed to enable 64bits compilation for MSVC2010-Express # - confirm it works well with other Visual Studio versions. @@ -102,7 +109,7 @@ def can_build(): if (os.name=="nt"): #building natively on windows! - if (os.getenv("VSINSTALLDIR")): + if ( methods.msvc_is_detected() ): return True else: print("\nMSVC not detected, attempting Mingw.") @@ -197,7 +204,7 @@ def configure(env): env.Append(CPPPATH=['#platform/windows']) env['is_mingw']=False - if (os.name=="nt" and os.getenv("VSINSTALLDIR")!=None): + if (os.name=="nt" and methods.msvc_is_detected() ): #build using visual studio env['ENV']['TMP'] = os.environ['TMP'] env.Append(CPPPATH=['#platform/windows/include']) |