summaryrefslogtreecommitdiff
path: root/vcbuild.bat
diff options
context:
space:
mode:
authorJoão Reis <reis@janeasystems.com>2019-12-11 05:51:23 +0000
committerRich Trott <rtrott@gmail.com>2019-12-13 12:29:56 -0500
commit654d22ccf40ab3b803baa7c43dafa46875c20812 (patch)
tree6ef45bb5e017d9ef77c3f40e7dce3b45d6d898e5 /vcbuild.bat
parent6143e0079a9df0bd646ef0b67e445d9aa700bb19 (diff)
downloadnode-new-654d22ccf40ab3b803baa7c43dafa46875c20812.tar.gz
build,win: support building MSI with VS2019
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 <riclau@uk.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'vcbuild.bat')
-rw-r--r--vcbuild.bat8
1 files changed, 5 insertions, 3 deletions
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