diff options
author | Refael Ackermann <refack@gmail.com> | 2017-04-07 08:53:45 -0400 |
---|---|---|
committer | Gibson Fahnestock <gibfahn@gmail.com> | 2017-05-05 10:36:05 +0200 |
commit | 1c93e8c94b5d0c304e20b2af3050db0bdc8864d0 (patch) | |
tree | d1991e49a9be5f151fa3c4ecbc84120806dfe13f /tools/msvs | |
parent | bc05436a891da91211c9bbcff08d43133558a1d6 (diff) | |
download | node-new-1c93e8c94b5d0c304e20b2af3050db0bdc8864d0.tar.gz |
win: make buildable on VS2017
* Set default to `vs2015` since `vs2017` is not CI-green yet
* changes vcbuild.bat arg from `vc2015` to `vs2015`/`vs2017`
`vc` as in Visual C++ is actually versions 14.0 or 14.10
`vs` as in Visual Studio is 2015 or 2017
Ref: http://lists.boost.org/Archives/boost/2017/03/233597.php 🤦
* keep `vc2015` for backward compatibility but "undocumented"
* tools: transplant vswhere wrapper from `msvs-com-helper`
Ref: https://github.com/node4good/msvs-com-helper
PR-URL: https://github.com/nodejs/node/pull/11852
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'tools/msvs')
-rw-r--r-- | tools/msvs/vswhere_usability_wrapper.cmd | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/msvs/vswhere_usability_wrapper.cmd b/tools/msvs/vswhere_usability_wrapper.cmd new file mode 100644 index 0000000000..b5e5653ad6 --- /dev/null +++ b/tools/msvs/vswhere_usability_wrapper.cmd @@ -0,0 +1,20 @@ +:: Copyright 2017 - Refael Ackermann +:: Distributed under MIT style license +:: See accompanying file LICENSE at https://github.com/node4good/windows-autoconf +:: version: 1.14.0 + +@if not defined DEBUG_HELPER @ECHO OFF +setlocal +set VSWHERE_REQ=-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 +set VSWHERE_PRP=-property installationPath +set VSWHERE_LMT=-version "[15.0,16.0)" +SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT% +set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer" +if not exist "%VSWHERE%" set "VSWHERE=%ProgramFiles%\Microsoft Visual Studio\Installer" +if not exist "%VSWHERE%" exit /B 1 +set Path=%Path%;%VSWHERE% +for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do ( + endlocal + set "VCINSTALLDIR=%%i\VC\" + set "VS150COMNTOOLS=%%i\Common7\Tools\" + exit /B 0) |