From 08afe4ec8e8e5ce4c34ed961c35a26629f8bd87b Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 16 Apr 2015 22:49:49 +1000 Subject: [PATCH] build: add MSVS 2015 support This is a port of 4208dc4fef9608acac609d5b4c89abb9e9cb9b11 . Original commit message: PR-URL: https://github.com/nodejs/node/pull/2036 Reviewed-By: Alexis Campailla This was ported to v0.10 in https://github.com/nodejs/node-v0.x-archive/pull/25857 PR-URL: https://github.com/nodejs/node/pull/2843 Reviewed-By: rvagg - Rod Vagg Reviewed-By: orangemocha - Alexis Campailla Reviewed-By: bnoordhuis - Ben Noordhuis --- vcbuild.bat | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/vcbuild.bat b/vcbuild.bat index 2cf791cdd0438a..ba08bf14d9ca5f 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -108,6 +108,29 @@ if defined NIGHTLY set TAG=nightly-%NIGHTLY% @rem Set environment for msbuild +@rem Look for Visual Studio 2015 +echo Looking for Visual Studio 2015 +if not defined VS140COMNTOOLS goto vc-set-2013 +if not exist "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2013 +echo Found Visual Studio 2015 +if defined msi ( + echo Looking for WiX installation for Visual Studio 2015... + if not exist "%WIX%\SDK\VS2015" ( + echo Failed to find WiX install for Visual Studio 2015 + echo VS2015 support for WiX is only present starting at version 3.10 + goto vc-set-2013 + ) +) +if "%VCVARS_VER%" NEQ "140" ( + call "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" + SET VCVARS_VER=140 +) +if not defined VCINSTALLDIR goto msbuild-not-found +set GYP_MSVS_VERSION=2015 +set PLATFORM_TOOLSET=v140 +goto msbuild-found + +:vc-set-2013 @rem Look for Visual Studio 2013 echo Looking for Visual Studio 2013 if not defined VS120COMNTOOLS goto vc-set-2012 @@ -117,6 +140,7 @@ if defined msi ( echo Looking for WiX installation for Visual Studio 2013... if not exist "%WIX%\SDK\VS2013" ( echo Failed to find WiX install for Visual Studio 2013 + echo VS2013 support for WiX is only present starting at version 3.8 goto vc-set-2012 ) )