diff --git a/.gitignore b/.gitignore index 9881176886826b..b3399fa0df2655 100644 --- a/.gitignore +++ b/.gitignore @@ -65,12 +65,12 @@ _UpgradeReport_Files/ /tools/msvs/genfiles/ /npm.wxs /corepack.wxs -/tools/msvs/msi/Release/ -/tools/msvs/msi/obj/ -/tools/msvs/msi/x64/ +/tools/msvs/msi/**/Release/ +/tools/msvs/msi/**/obj/ +/tools/msvs/msi/**/x64/ # Exclude MSVS files used for .msi file generation -!tools/msvs/msi/custom_actions.vcxproj -!tools/msvs/msi/nodemsi.sln +!tools/msvs/msi/**/custom_actions.vcxproj +!tools/msvs/msi/**/nodemsi.sln # === Rules for GYP artifacts === *-nodegyp* diff --git a/BUILDING.md b/BUILDING.md index a3ddd42fd91149..7b11bbce1885eb 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -586,10 +586,7 @@ to run it again before invoking `make -j4`. Optional requirements to build the MSI installer package: -* The [WiX Toolset v3.11](https://wixtoolset.org/releases/) and the - [Wix Toolset Visual Studio 2019 Extension](https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2019Extension) -* The [WiX Toolset v3.14](https://wixtoolset.org/releases/) if - building for Windows 10 on ARM (ARM64) +* The .NET SDK component from [Visual Studio 2019](https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2019-and-other-products) Optional requirements for compiling for Windows 10 on ARM (ARM64): diff --git a/tools/msvs/msi/NuGet.Config b/tools/msvs/msi/NuGet.Config new file mode 100644 index 00000000000000..19d85b78fdf998 --- /dev/null +++ b/tools/msvs/msi/NuGet.Config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tools/msvs/msi/custom_actions.cc b/tools/msvs/msi/custom_actions/custom_actions.cc similarity index 87% rename from tools/msvs/msi/custom_actions.cc rename to tools/msvs/msi/custom_actions/custom_actions.cc index 32811dcb19469d..d747823423eeb5 100644 --- a/tools/msvs/msi/custom_actions.cc +++ b/tools/msvs/msi/custom_actions/custom_actions.cc @@ -77,27 +77,6 @@ extern "C" UINT WINAPI SetInstallScope(MSIHANDLE hInstall) { return WcaFinalize(ERROR_SUCCESS); } - -extern "C" UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) { - HRESULT hr = S_OK; - UINT er = ERROR_SUCCESS; - - hr = WcaInitialize(hInstall, "BroadcastEnvironmentUpdate"); - ExitOnFailure(hr, "Failed to initialize"); - - SendMessageTimeoutW(HWND_BROADCAST, - WM_SETTINGCHANGE, - 0, - (LPARAM) L"Environment", - SMTO_ABORTIFHUNG, - 5000, - NULL); - -LExit: - er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; - return WcaFinalize(er); -} - #define AUTHENTICATED_USERS_SID L"S-1-5-11" extern "C" UINT WINAPI GetLocalizedUserNames(MSIHANDLE hInstall) { diff --git a/tools/msvs/msi/custom_actions.def b/tools/msvs/msi/custom_actions/custom_actions.def similarity index 72% rename from tools/msvs/msi/custom_actions.def rename to tools/msvs/msi/custom_actions/custom_actions.def index 93f2a28f45e45e..5561777ae77539 100644 --- a/tools/msvs/msi/custom_actions.def +++ b/tools/msvs/msi/custom_actions/custom_actions.def @@ -2,5 +2,4 @@ LIBRARY "custom_actions" EXPORTS SetInstallScope -BroadcastEnvironmentUpdate GetLocalizedUserNames diff --git a/tools/msvs/msi/custom_actions.vcxproj b/tools/msvs/msi/custom_actions/custom_actions.vcxproj similarity index 82% rename from tools/msvs/msi/custom_actions.vcxproj rename to tools/msvs/msi/custom_actions/custom_actions.vcxproj index 2fed47b6e4a781..6de11e1eae3474 100644 --- a/tools/msvs/msi/custom_actions.vcxproj +++ b/tools/msvs/msi/custom_actions/custom_actions.vcxproj @@ -112,7 +112,7 @@ Disabled - $(WixSdkDir)\inc;%(AdditionalIncludeDirectories) + $(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -122,7 +122,7 @@ msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies) - $(WixSdkDir)\lib\x86;%(AdditionalLibraryDirectories) + $(PkgWixToolset_WcaUtil)\build\native\v14\x86;$(PkgWixToolset_DUtil)\build\native\v14\x86;%(AdditionalLibraryDirectories) custom_actions.def true Windows @@ -131,7 +131,7 @@ Disabled - $(WixSdkDir)\inc;%(AdditionalIncludeDirectories) + $(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -141,7 +141,7 @@ msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies) - $(WixSdkDir)\lib\ARM64;%(AdditionalLibraryDirectories) + $(PkgWixToolset_WcaUtil)\build\native\v14\ARM64;$(PkgWixToolset_DUtil)\build\native\v14\ARM64;%(AdditionalLibraryDirectories) custom_actions.def true Windows @@ -150,7 +150,7 @@ Disabled - $(WixSdkDir)\inc;%(AdditionalIncludeDirectories) + $(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -160,7 +160,7 @@ msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies) - $(WixSdkDir)\lib\x64;%(AdditionalLibraryDirectories) + $(PkgWixToolset_WcaUtil)\build\native\v14\x64;$(PkgWixToolset_DUtil)\build\native\v14\x64;%(AdditionalLibraryDirectories) custom_actions.def true Windows @@ -170,7 +170,7 @@ MaxSpeed true - $(WixSdkDir)\inc;%(AdditionalIncludeDirectories) + $(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreaded true @@ -184,7 +184,7 @@ msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies) - $(WixSdkDir)\lib\x86;%(AdditionalLibraryDirectories) + $(PkgWixToolset_WcaUtil)\build\native\v14\x86;$(PkgWixToolset_DUtil)\build\native\v14\x86;%(AdditionalLibraryDirectories) custom_actions.def true Windows @@ -196,7 +196,7 @@ MaxSpeed true - $(WixSdkDir)\inc;%(AdditionalIncludeDirectories) + $(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreaded true @@ -210,7 +210,7 @@ msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies) - $(WixSdkDir)\lib\ARM64;%(AdditionalLibraryDirectories) + $(PkgWixToolset_WcaUtil)\build\native\v14\ARM64;$(PkgWixToolset_DUtil)\build\native\v14\ARM64;%(AdditionalLibraryDirectories) custom_actions.def true Windows @@ -222,7 +222,7 @@ MaxSpeed true - $(WixSdkDir)\inc;%(AdditionalIncludeDirectories) + $(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreaded true @@ -236,7 +236,7 @@ msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies) - $(WixSdkDir)\lib\x64;%(AdditionalLibraryDirectories) + $(PkgWixToolset_WcaUtil)\build\native\v14\x64;$(PkgWixToolset_DUtil)\build\native\v14\x64;%(AdditionalLibraryDirectories) custom_actions.def true Windows @@ -254,4 +254,12 @@ + + + + + + <_NuGetTargetFallbackMoniker>$(_NuGetTargetFallbackMoniker);native,Version=v0.0 + $(RuntimeIdentifiers);win-arm64 + diff --git a/tools/msvs/msi/i18n/en-us.wxl b/tools/msvs/msi/i18n/en-us.wxl deleted file mode 100644 index dc69f218240149..00000000000000 --- a/tools/msvs/msi/i18n/en-us.wxl +++ /dev/null @@ -1,43 +0,0 @@ - - - - 1033 - - The Setup Wizard will install [ProductName] on your computer. - Choose a custom location or click Next to install. - - A later version of [ProductName] is already installed. Setup will now exit. - - [ProductName] Setup - {\WixUI_Font_Title}Tools for Native Modules - Optionally install the tools necessary to compile native modules. - WixUI_Bmp_Banner - Some npm modules need to be compiled from C/C++ when installing. If you want to be able to install such modules, some tools (Python and Visual Studio Build Tools) need to be installed. - Automatically install the necessary tools. Note that this will also install Chocolatey. The script will pop-up in a new window after the installation completes. - Alternatively, follow the instructions at https://github.com/nodejs/node-gyp#on-windows]]> to install the dependencies yourself. - - - Node.js runtime - Install the core [ProductName] runtime (node.exe). - - npm package manager - Install npm, the recommended package manager for [ProductName]. - - corepack manager - Install corepack, the universal package manager for [ProductName]. - - Online documentation shortcuts - Add start menu entries that link the online documentation for [ProductName] [FullVersion] and the [ProductName] website. - - Add to PATH - Add [ProductName], npm, and modules that were globally installed by npm to the PATH environment variable. - - Node.js and npm - Add [ProductName] and npm (if installed) to the PATH environment variable. - - npm modules - Add modules that are installed globally by npm to the PATH environment variable. This option works for the current user only; other users need to update their PATH manually. - - - Node.js has been successfully installed. - diff --git a/tools/msvs/msi/nodemsi.sln b/tools/msvs/msi/nodemsi.sln index 86b4b10dcb043f..e06530f5e24abd 100644 --- a/tools/msvs/msi/nodemsi.sln +++ b/tools/msvs/msi/nodemsi.sln @@ -1,9 +1,13 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "nodemsi", "nodemsi.wixproj", "{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}" +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33027.164 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "nodemsi", "nodemsi\nodemsi.wixproj", "{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}" + ProjectSection(ProjectDependencies) = postProject + {B70585F8-DAB7-40FA-9904-13CF53A73A06} = {B70585F8-DAB7-40FA-9904-13CF53A73A06} + EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "custom_actions", "custom_actions.vcxproj", "{B70585F8-DAB7-40FA-9904-13CF53A73A06}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "custom_actions", "custom_actions\custom_actions.vcxproj", "{B70585F8-DAB7-40FA-9904-13CF53A73A06}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -43,4 +47,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FB650322-7A09-471D-A635-F2DBDCEECDB8} + EndGlobalSection EndGlobal diff --git a/tools/msvs/msi/nodemsi.wixproj b/tools/msvs/msi/nodemsi.wixproj deleted file mode 100644 index 0cf215daca5978..00000000000000 --- a/tools/msvs/msi/nodemsi.wixproj +++ /dev/null @@ -1,93 +0,0 @@ - - - - Debug - x86 - 3.5 - {1d808ff0-b5a9-4be9-859d-b334b6f48be2} - 2.0 - node-v$(FullVersion)-$(Platform) - Package - True - $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets - $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets - 0.0.0.0 - - - ..\..\..\ - obj\$(Configuration)\ - Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFilesFolder - - - ..\..\..\ - obj\$(Configuration)\ - Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFilesFolder - - - ..\..\..\ - obj\$(Configuration)\ - Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFiles64Folder - en-US - - - ..\..\..\ - obj\$(Configuration)\ - Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFiles64Folder - - - ..\..\..\ - obj\$(Configuration)\ - Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFiles64Folder - - - ..\..\..\ - obj\$(Configuration)\ - Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFiles64Folder - - - True - - - - - npm.wxs - - - corepack.wxs - - - - - $(WixExtDir)\WixUIExtension.dll - WixUIExtension - - - $(WixExtDir)\WiXUtilExtension.dll - WiXUtilExtension - - - - - - - - custom_actions - {b70585f8-dab7-40fa-9904-13cf53a73a06} - True - True - Binaries;Content;Satellites - INSTALLFOLDER - - - - - - - - - - - move "!(TargetPath)" "$(TargetDir)\$(TargetFileName)" - move "!(TargetPdbPath)" "$(TargetDir)\$(TargetPdbName)" - - diff --git a/tools/msvs/msi/nodemsi/i18n/en-us.wxl b/tools/msvs/msi/nodemsi/i18n/en-us.wxl new file mode 100644 index 00000000000000..5074d5a43125f7 --- /dev/null +++ b/tools/msvs/msi/nodemsi/i18n/en-us.wxl @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/msvs/msi/nodemsi/nodemsi.wixproj b/tools/msvs/msi/nodemsi/nodemsi.wixproj new file mode 100644 index 00000000000000..b1463cf65696b9 --- /dev/null +++ b/tools/msvs/msi/nodemsi/nodemsi.wixproj @@ -0,0 +1,70 @@ + + + + Debug + x86 + 3.5 + {1d808ff0-b5a9-4be9-859d-b334b6f48be2} + node-v$(FullVersion)-$(Platform) + Package + 0.0.0.0 + + + ..\..\..\..\ + obj\$(Configuration)\ + Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFilesFolder + + + ..\..\..\..\ + obj\$(Configuration)\ + Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFilesFolder + + + ..\..\..\..\ + obj\$(Configuration)\ + Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFiles64Folder + en-US + + + ..\..\..\..\ + obj\$(Configuration)\ + Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFiles64Folder + + + ..\..\..\..\ + obj\$(Configuration)\ + Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFiles64Folder + + + ..\..\..\..\ + obj\$(Configuration)\ + Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFiles64Folder + + + + npm.wxs + + + corepack.wxs + + + + + + + + + + + + + + + + + + + move "$(TargetDir)en-us\$(TargetFileName)" "$(TargetPath)" + move "$(TargetDir)en-us\$(TargetPdbFileName)" "$(TargetPdbPath)" + + diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/nodemsi/product.wxs old mode 100755 new mode 100644 similarity index 79% rename from tools/msvs/msi/product.wxs rename to tools/msvs/msi/nodemsi/product.wxs index c6984777fac3fa..de4a6a34cee118 --- a/tools/msvs/msi/product.wxs +++ b/tools/msvs/msi/nodemsi/product.wxs @@ -1,6 +1,6 @@ - - + @@ -8,24 +8,18 @@ - + - + UpgradeCode="47c07a3a-42ef-4213-a85d-8f5a59077c28" + InstallerVersion="200" + Compressed="yes"> - - - - = 603) OR (VersionNT >= 602 AND MsiNTProductType <> 1)]]> - + @@ -46,10 +40,9 @@ - - - - + + + + AllowAbsent="no"> @@ -79,7 +72,6 @@ - - - - - + + + - - - + + - + @@ -197,13 +187,13 @@ + - - - - - - - - + + + + + + + - + @@ -314,38 +304,39 @@ - + - - + + - + - - - + + + @@ -383,34 +374,35 @@ - 1 + - NOT Installed - Installed AND PATCH - 1 - LicenseAccepted = "1" - 1 - 1 - 1 - 1 - 1 - NOT Installed OR WixUI_InstallMode = "Change" - Installed AND NOT PATCH - Installed AND PATCH - 1 - 1 - 1 - 1 - 1 - Installed - NOT Installed - 1 - 1 - 1 - NATIVETOOLSCHECKBOX = 1 - 1 + + + + + + + + + + + + + + + + + + + + + + + + + @@ -420,6 +412,6 @@ - + diff --git a/vcbuild.bat b/vcbuild.bat index 858b54cc23c57c..a4dd3a28d5c98b 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -259,19 +259,6 @@ echo Looking for Visual Studio 2022 if not defined target_env set "VCINSTALLDIR=" call tools\msvs\vswhere_usability_wrapper.cmd "[17.0,18.0)" %target_arch% "prerelease" if "_%VCINSTALLDIR%_" == "__" goto vs-set-2019 -set "WIXSDKDIR=%WIX%\SDK\VS2017" -if defined msi ( - echo Looking for WiX installation for Visual Studio 2022... - if not exist "%WIXSDKDIR%" ( - echo Failed to find WiX install for Visual Studio 2022 - echo VS2022 support for WiX is only present starting at version 3.XX - goto vs-set-2019 - ) - if not exist "%VCINSTALLDIR%\..\MSBuild\Microsoft\WiX" ( - echo Failed to find the WiX Toolset Visual Studio 2022 Extension - goto vs-set-2019 - ) -) @rem check if VS2022 is already setup, and for the requested arch if "_%VisualStudioVersion%_" == "_17.0_" if "_%VSCMD_ARG_TGT_ARCH%_"=="_%target_arch%_" goto found_vs2022 @rem need to clear VSINSTALLDIR for vcvarsall to work as expected @@ -299,19 +286,6 @@ echo Looking for Visual Studio 2019 if not defined target_env set "VCINSTALLDIR=" call tools\msvs\vswhere_usability_wrapper.cmd "[16.0,17.0)" %target_arch% "prerelease" if "_%VCINSTALLDIR%_" == "__" goto msbuild-not-found -set "WIXSDKDIR=%WIX%\SDK\VS2017" -if defined msi ( - echo Looking for WiX installation for Visual Studio 2019... - 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 msbuild-not-found - ) - if not exist "%VCINSTALLDIR%\..\MSBuild\Microsoft\WiX" ( - echo Failed to find the WiX Toolset Visual Studio 2019 Extension - goto msbuild-not-found - ) -) @rem check if VS2019 is already setup, and for the requested arch if "_%VisualStudioVersion%_" == "_16.0_" if "_%VSCMD_ARG_TGT_ARCH%_"=="_%target_arch%_" goto found_vs2019 @rem need to clear VSINSTALLDIR for vcvarsall to work as expected @@ -532,7 +506,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:WixSdkDir="%WIXSDKDIR%" /p:Configuration=%config% /p:Platform=%target_arch% /p:NodeVersion=%NODE_VERSION% /p:FullVersion=%FULLVERSION% /p:DistTypeDir=%DISTTYPEDIR% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo +msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Restore,Clean,Build %msbsdk% /p:PlatformToolset=%PLATFORM_TOOLSET% /p:Configuration=%config% /p:Platform=%target_arch% /p:NodeVersion=%NODE_VERSION% /p:FullVersion=%FULLVERSION% /p:DistTypeDir=%DISTTYPEDIR% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo if errorlevel 1 goto exit if not defined sign goto upload