From 654d22ccf40ab3b803baa7c43dafa46875c20812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Wed, 11 Dec 2019 05:51:23 +0000 Subject: build,win: support building MSI with VS2019 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explicitly pass the WiX SDK directory when building the MSI. WiX doesn't (yet?) have a directory for VS2019, so use the one for VS2017 which should be compatible. PR-URL: https://github.com/nodejs/node/pull/30895 Reviewed-By: Richard Lau Reviewed-By: Michaƫl Zasso Reviewed-By: Rich Trott --- vcbuild.bat | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'vcbuild.bat') diff --git a/vcbuild.bat b/vcbuild.bat index 1e142a658b..3754d5f1b5 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -252,9 +252,10 @@ echo Looking for Visual Studio 2019 set "VCINSTALLDIR=" call tools\msvs\vswhere_usability_wrapper.cmd "[16.0,17.0)" if "_%VCINSTALLDIR%_" == "__" goto vs-set-2017 +set "WIXSDKDIR=%WIX%\SDK\VS2017" if defined msi ( echo Looking for WiX installation for Visual Studio 2019... - if not exist "%WIX%\SDK\VS2017" ( + if not exist "%WIXSDKDIR%" ( echo Failed to find WiX install for Visual Studio 2019 echo VS2019 support for WiX is only present starting at version 3.11 goto vs-set-2017 @@ -287,9 +288,10 @@ if defined target_env if "%target_env%" NEQ "vs2017" goto msbuild-not-found echo Looking for Visual Studio 2017 call tools\msvs\vswhere_usability_wrapper.cmd "[15.0,16.0)" if "_%VCINSTALLDIR%_" == "__" goto msbuild-not-found +set "WIXSDKDIR=%WIX%\SDK\VS2017" if defined msi ( echo Looking for WiX installation for Visual Studio 2017... - if not exist "%WIX%\SDK\VS2017" ( + if not exist "%WIXSDKDIR%" ( echo Failed to find WiX install for Visual Studio 2017 echo VS2017 support for WiX is only present starting at version 3.11 goto msbuild-not-found @@ -474,7 +476,7 @@ if not defined msi goto install-doctools echo Building node-v%FULLVERSION%-%target_arch%.msi set "msbsdk=" if defined WindowsSDKVersion set "msbsdk=/p:WindowsTargetPlatformVersion=%WindowsSDKVersion:~0,-1%" -msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build %msbsdk% /p:PlatformToolset=%PLATFORM_TOOLSET% /p:GypMsvsVersion=%GYP_MSVS_VERSION% /p:Configuration=%config% /p:Platform=%target_arch% /p:NodeVersion=%NODE_VERSION% /p:FullVersion=%FULLVERSION% /p:DistTypeDir=%DISTTYPEDIR% %noetw_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo +msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build %msbsdk% /p:PlatformToolset=%PLATFORM_TOOLSET% /p:WixSdkDir="%WIXSDKDIR%" /p:Configuration=%config% /p:Platform=%target_arch% /p:NodeVersion=%NODE_VERSION% /p:FullVersion=%FULLVERSION% /p:DistTypeDir=%DISTTYPEDIR% %noetw_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo if errorlevel 1 goto exit if not defined sign goto upload -- cgit v1.2.1