From 663d4ee7de9741e4e55255908fbecd8582097ae3 Mon Sep 17 00:00:00 2001 From: yg2f Date: Thu, 15 Sep 2016 18:04:26 +0200 Subject: 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()`` --- methods.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'methods.py') diff --git a/methods.py b/methods.py index c28ed55dda..c4951c69bd 100755 --- a/methods.py +++ b/methods.py @@ -1516,6 +1516,12 @@ def detect_visual_c_compiler_version(tools_env): return vc_chosen_compiler_str +def msvc_is_detected() : + # looks for VisualStudio env variable + # or for Visual C++ Build Tools (which is a standalone MSVC) + return os.getenv("VSINSTALLDIR") or os.getenv("VS100COMNTOOLS") or os.getenv("VS110COMNTOOLS") or os.getenv("VS120COMNTOOLS") or os.getenv("VS140COMNTOOLS"); + + def precious_program(env, program, sources, **args): program = env.ProgramOriginal(program, sources, **args) env.Precious(program) -- cgit v1.2.3 From 2bf4553fe056c1fab5367dfae62426d3c7cf8168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= Date: Mon, 17 Oct 2016 21:04:13 +0200 Subject: SCons: Use colored output if available, change "colored"->"verbose" --- methods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'methods.py') diff --git a/methods.py b/methods.py index c4951c69bd..477fe4f12f 100755 --- a/methods.py +++ b/methods.py @@ -1416,7 +1416,7 @@ def save_active_platforms(apnames,ap): logow.write(str) -def colored(sys,env): +def no_verbose(sys,env): #If the output is not a terminal, do nothing if not sys.stdout.isatty(): -- cgit v1.2.3 From f7773d499dcd1d9580616dd1ba03f7382ac44cae Mon Sep 17 00:00:00 2001 From: yg2f Date: Wed, 26 Oct 2016 19:07:58 +0200 Subject: fix bug introduced by #6501 ( @Akien : this PR is for current HEAD only, not to be cherry-picked for 2.1.1 ) this is manual revertion of #6501 which introduced a bug that prevented scons from detecting Mingw under Windows when MSVC was installed. (thanks to @vnen for finding this) AND it fixes the actual bug that prevented scons from detecting MSVC standalone compiler ( a confusions between ``VSINSTALLDIR`` and ``VCINSTALLDIR`` ) The freeware Standalone MSVC C++ Build Tools are available here : http://landinghub.visualstudio.com/visual-cpp-build-tools --- methods.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'methods.py') diff --git a/methods.py b/methods.py index 477fe4f12f..bd5409e3d4 100755 --- a/methods.py +++ b/methods.py @@ -1516,11 +1516,6 @@ def detect_visual_c_compiler_version(tools_env): return vc_chosen_compiler_str -def msvc_is_detected() : - # looks for VisualStudio env variable - # or for Visual C++ Build Tools (which is a standalone MSVC) - return os.getenv("VSINSTALLDIR") or os.getenv("VS100COMNTOOLS") or os.getenv("VS110COMNTOOLS") or os.getenv("VS120COMNTOOLS") or os.getenv("VS140COMNTOOLS"); - def precious_program(env, program, sources, **args): program = env.ProgramOriginal(program, sources, **args) -- cgit v1.2.3