summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore10
-rw-r--r--BUILDING.md5
-rw-r--r--tools/msvs/msi/NuGet.Config6
-rw-r--r--tools/msvs/msi/custom_actions/custom_actions.cc (renamed from tools/msvs/msi/custom_actions.cc)21
-rw-r--r--tools/msvs/msi/custom_actions/custom_actions.def (renamed from tools/msvs/msi/custom_actions.def)1
-rw-r--r--tools/msvs/msi/custom_actions/custom_actions.vcxproj (renamed from tools/msvs/msi/custom_actions.vcxproj)32
-rw-r--r--tools/msvs/msi/i18n/en-us.wxl43
-rw-r--r--tools/msvs/msi/nodemsi.sln17
-rw-r--r--tools/msvs/msi/nodemsi.wixproj93
-rw-r--r--tools/msvs/msi/nodemsi/i18n/en-us.wxl42
-rw-r--r--tools/msvs/msi/nodemsi/nodemsi.wixproj70
-rw-r--r--[-rwxr-xr-x]tools/msvs/msi/nodemsi/product.wxs (renamed from tools/msvs/msi/product.wxs)148
-rw-r--r--vcbuild.bat28
13 files changed, 227 insertions, 289 deletions
diff --git a/.gitignore b/.gitignore
index 9881176886..b3399fa0df 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 3e519343a3..82a01ac0ae 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 0000000000..19d85b78fd
--- /dev/null
+++ b/tools/msvs/msi/NuGet.Config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <packageSources>
+ <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
+ </packageSources>
+</configuration>
diff --git a/tools/msvs/msi/custom_actions.cc b/tools/msvs/msi/custom_actions/custom_actions.cc
index 32811dcb19..d747823423 100644
--- a/tools/msvs/msi/custom_actions.cc
+++ b/tools/msvs/msi/custom_actions/custom_actions.cc
@@ -77,27 +77,6 @@ LExit:
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
index 93f2a28f45..5561777ae7 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
index 2fed47b6e4..6de11e1eae 100644
--- a/tools/msvs/msi/custom_actions.vcxproj
+++ b/tools/msvs/msi/custom_actions/custom_actions.vcxproj
@@ -112,7 +112,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(WixSdkDir)\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@@ -122,7 +122,7 @@
</ClCompile>
<Link>
<AdditionalDependencies>msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(WixSdkDir)\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(PkgWixToolset_WcaUtil)\build\native\v14\x86;$(PkgWixToolset_DUtil)\build\native\v14\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>custom_actions.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -131,7 +131,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(WixSdkDir)\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@@ -141,7 +141,7 @@
</ClCompile>
<Link>
<AdditionalDependencies>msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(WixSdkDir)\lib\ARM64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(PkgWixToolset_WcaUtil)\build\native\v14\ARM64;$(PkgWixToolset_DUtil)\build\native\v14\ARM64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>custom_actions.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -150,7 +150,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(WixSdkDir)\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@@ -160,7 +160,7 @@
</ClCompile>
<Link>
<AdditionalDependencies>msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(WixSdkDir)\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(PkgWixToolset_WcaUtil)\build\native\v14\x64;$(PkgWixToolset_DUtil)\build\native\v14\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>custom_actions.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -170,7 +170,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>$(WixSdkDir)\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -184,7 +184,7 @@
</ClCompile>
<Link>
<AdditionalDependencies>msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(WixSdkDir)\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(PkgWixToolset_WcaUtil)\build\native\v14\x86;$(PkgWixToolset_DUtil)\build\native\v14\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>custom_actions.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -196,7 +196,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>$(WixSdkDir)\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -210,7 +210,7 @@
</ClCompile>
<Link>
<AdditionalDependencies>msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(WixSdkDir)\lib\ARM64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(PkgWixToolset_WcaUtil)\build\native\v14\ARM64;$(PkgWixToolset_DUtil)\build\native\v14\ARM64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>custom_actions.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -222,7 +222,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>$(WixSdkDir)\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -236,7 +236,7 @@
</ClCompile>
<Link>
<AdditionalDependencies>msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(WixSdkDir)\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(PkgWixToolset_WcaUtil)\build\native\v14\x64;$(PkgWixToolset_DUtil)\build\native\v14\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>custom_actions.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
@@ -254,4 +254,12 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
+ <ItemGroup>
+ <PackageReference Include="WixToolset.WcaUtil" Version="4.0.0-rc.1" GeneratePathProperty="true" />
+ <PackageReference Include="WixToolset.DUtil" Version="4.0.0-rc.1" GeneratePathProperty="true" />
+ </ItemGroup>
+ <PropertyGroup>
+ <_NuGetTargetFallbackMoniker>$(_NuGetTargetFallbackMoniker);native,Version=v0.0</_NuGetTargetFallbackMoniker>
+ <RuntimeIdentifiers>$(RuntimeIdentifiers);win-arm64</RuntimeIdentifiers>
+ </PropertyGroup>
</Project>
diff --git a/tools/msvs/msi/i18n/en-us.wxl b/tools/msvs/msi/i18n/en-us.wxl
deleted file mode 100644
index dc69f21824..0000000000
--- a/tools/msvs/msi/i18n/en-us.wxl
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
- <!-- See https://msdn.microsoft.com/en-us/goglobal/bb964664.aspx -->
- <String Id="LocaleId">1033</String>
-
- <String Id="WelcomeDlgDescription">The Setup Wizard will install [ProductName] on your computer.</String>
- <String Id="InstallDirDlgDescription">Choose a custom location or click Next to install.</String>
-
- <String Id="MajorUpgrade_DowngradeErrorMessage">A later version of [ProductName] is already installed. Setup will now exit.</String>
-
- <String Id="NativeToolsDlg_Title">[ProductName] Setup</String>
- <String Id="NativeToolsDlgTitle">{\WixUI_Font_Title}Tools for Native Modules</String>
- <String Id="NativeToolsDlgDescription">Optionally install the tools necessary to compile native modules.</String>
- <String Id="NativeToolsDlgBannerBitmap">WixUI_Bmp_Banner</String>
- <String Id="NativeToolsDlgIntro">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.</String>
- <String Id="NativeToolsDlgInstallCheckbox">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.</String>
- <String Id="NativeToolsDlgManualDetails">Alternatively, follow the instructions at <![CDATA[<a href="https://github.com/nodejs/node-gyp#on-windows">https://github.com/nodejs/node-gyp#on-windows</a>]]> to install the dependencies yourself.</String>
-
- <!-- References like [ProductName] or $(var.ProductName) don't seem to work in Title attributes -->
- <String Id="NodeRuntime_Title">Node.js runtime</String>
- <String Id="NodeRuntime_Description">Install the core [ProductName] runtime (node.exe).</String>
-
- <String Id="npm_Title">npm package manager</String>
- <String Id="npm_Description">Install npm, the recommended package manager for [ProductName].</String>
-
- <String Id="corepack_Title">corepack manager</String>
- <String Id="corepack_Description">Install corepack, the universal package manager for [ProductName].</String>
-
- <String Id="DocumentationShortcuts_Title">Online documentation shortcuts</String>
- <String Id="DocumentationShortcuts_Description">Add start menu entries that link the online documentation for [ProductName] [FullVersion] and the [ProductName] website.</String>
-
- <String Id="EnvironmentPath_Title">Add to PATH</String>
- <String Id="EnvironmentPath_Description">Add [ProductName], npm, and modules that were globally installed by npm to the PATH environment variable.</String>
-
- <String Id="EnvironmentPathNode_Title">Node.js and npm</String>
- <String Id="EnvironmentPathNode_Description">Add [ProductName] and npm (if installed) to the PATH environment variable.</String>
-
- <String Id="EnvironmentPathNpmModules_Title">npm modules</String>
- <String Id="EnvironmentPathNpmModules_Description">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.</String>
-
- <!-- References like [ProductName] are not resolved for Property tags -->
- <String Id="WIXUI_EXITDIALOGOPTIONALTEXT">Node.js has been successfully installed.</String>
-</WixLocalization>
diff --git a/tools/msvs/msi/nodemsi.sln b/tools/msvs/msi/nodemsi.sln
index 86b4b10dcb..e06530f5e2 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 0cf215daca..0000000000
--- a/tools/msvs/msi/nodemsi.wixproj
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
- <ProductVersion>3.5</ProductVersion>
- <ProjectGuid>{1d808ff0-b5a9-4be9-859d-b334b6f48be2}</ProjectGuid>
- <SchemaVersion>2.0</SchemaVersion>
- <OutputName>node-v$(FullVersion)-$(Platform)</OutputName>
- <OutputType>Package</OutputType>
- <EnableProjectHarvesting>True</EnableProjectHarvesting>
- <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
- <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
- <NodeVersion Condition=" '$(NodeVersion)' == '' ">0.0.0.0</NodeVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
- <OutputPath>..\..\..\</OutputPath>
- <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
- <DefineConstants>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</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
- <OutputPath>..\..\..\</OutputPath>
- <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
- <DefineConstants>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</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
- <OutputPath>..\..\..\</OutputPath>
- <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
- <DefineConstants>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</DefineConstants>
- <Cultures>en-US</Cultures>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
- <OutputPath>..\..\..\</OutputPath>
- <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
- <DefineConstants>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</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|arm64' ">
- <OutputPath>..\..\..\</OutputPath>
- <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
- <DefineConstants>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</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|arm64' ">
- <OutputPath>..\..\..\</OutputPath>
- <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
- <DefineConstants>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</DefineConstants>
- </PropertyGroup>
- <PropertyGroup>
- <EnableProjectHarvesting>True</EnableProjectHarvesting>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="product.wxs" />
- <Compile Include="..\..\..\npm.wxs">
- <Link>npm.wxs</Link>
- </Compile>
- <Compile Include="..\..\..\corepack.wxs">
- <Link>corepack.wxs</Link>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <WixExtension Include="WixUIExtension">
- <HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
- <Name>WixUIExtension</Name>
- </WixExtension>
- <WixExtension Include="WiXUtilExtension">
- <HintPath>$(WixExtDir)\WiXUtilExtension.dll</HintPath>
- <Name>WiXUtilExtension</Name>
- </WixExtension>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="i18n\en-us.wxl" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="custom_actions.vcxproj">
- <Name>custom_actions</Name>
- <Project>{b70585f8-dab7-40fa-9904-13cf53a73a06}</Project>
- <Private>True</Private>
- <DoNotHarvest>True</DoNotHarvest>
- <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
- <RefTargetDir>INSTALLFOLDER</RefTargetDir>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(WixTargetsPath)" />
- <Target Name="BeforeBuild">
- <HeatDirectory ToolPath="$(WixToolPath)" Directory="..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm" PreprocessorVariable="var.NpmSourceDir" DirectoryRefId="NodeModulesFolder" ComponentGroupName="NpmSourceFiles" GenerateGuidsNow="true" SuppressFragments="false" OutputFile="..\..\..\npm.wxs" RunAsSeparateProcess="true">
- </HeatDirectory>
- <HeatDirectory ToolPath="$(WixToolPath)" Directory="..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack" PreprocessorVariable="var.CorepackSourceDir" DirectoryRefId="NodeModulesFolder" ComponentGroupName="CorepackSourceFiles" GenerateGuidsNow="true" SuppressFragments="false" OutputFile="..\..\..\corepack.wxs" RunAsSeparateProcess="true">
- </HeatDirectory>
- </Target>
- <PropertyGroup>
- <PostBuildEvent>move "!(TargetPath)" "$(TargetDir)\$(TargetFileName)"
- move "!(TargetPdbPath)" "$(TargetDir)\$(TargetPdbName)"</PostBuildEvent>
- </PropertyGroup>
-</Project>
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 0000000000..5074d5a431
--- /dev/null
+++ b/tools/msvs/msi/nodemsi/i18n/en-us.wxl
@@ -0,0 +1,42 @@
+<WixLocalization Culture="en-us" xmlns="http://wixtoolset.org/schemas/v4/wxl">
+ <!-- See https://msdn.microsoft.com/en-us/goglobal/bb964664.aspx -->
+ <String Id="LocaleId" Value="1033"/>
+
+ <String Id="WelcomeDlgDescription" Value="The Setup Wizard will install [ProductName] on your computer."/>
+ <String Id="InstallDirDlgDescription" Value="Choose a custom location or click Next to install."/>
+
+ <String Id="MajorUpgrade_DowngradeErrorMessage" Value="A later version of [ProductName] is already installed. Setup will now exit."/>
+
+ <String Id="NativeToolsDlg_Title" Value="[ProductName] Setup"/>
+ <String Id="NativeToolsDlgTitle" Value="{\WixUI_Font_Title}Tools for Native Modules"/>
+ <String Id="NativeToolsDlgDescription" Value="Optionally install the tools necessary to compile native modules."/>
+ <String Id="NativeToolsDlgBannerBitmap" Value="WixUI_Bmp_Banner"/>
+ <String Id="NativeToolsDlgIntro" Value="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."/>
+ <String Id="NativeToolsDlgInstallCheckbox" Value="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."/>
+ <String Id="NativeToolsDlgManualDetails" Value="Alternatively, follow the instructions at &lt;a href=&quot;https://github.com/nodejs/node-gyp#on-windows&quot;&gt;https://github.com/nodejs/node-gyp#on-windows&lt;/a&gt; to install the dependencies yourself."/>
+
+ <!-- References like [ProductName] or $(var.ProductName) don't seem to work in Title attributes -->
+ <String Id="NodeRuntime_Title" Value="Node.js runtime"/>
+ <String Id="NodeRuntime_Description" Value="Install the core [ProductName] runtime (node.exe)."/>
+
+ <String Id="npm_Title" Value="npm package manager"/>
+ <String Id="npm_Description" Value="Install npm, the recommended package manager for [ProductName]."/>
+
+ <String Id="corepack_Title" Value="corepack manager"/>
+ <String Id="corepack_Description" Value="Install corepack, the universal package manager for [ProductName]."/>
+
+ <String Id="DocumentationShortcuts_Title" Value="Online documentation shortcuts"/>
+ <String Id="DocumentationShortcuts_Description" Value="Add start menu entries that link the online documentation for [ProductName] [FullVersion] and the [ProductName] website."/>
+
+ <String Id="EnvironmentPath_Title" Value="Add to PATH"/>
+ <String Id="EnvironmentPath_Description" Value="Add [ProductName], npm, and modules that were globally installed by npm to the PATH environment variable."/>
+
+ <String Id="EnvironmentPathNode_Title" Value="Node.js and npm"/>
+ <String Id="EnvironmentPathNode_Description" Value="Add [ProductName] and npm (if installed) to the PATH environment variable."/>
+
+ <String Id="EnvironmentPathNpmModules_Title" Value="npm modules"/>
+ <String Id="EnvironmentPathNpmModules_Description" Value="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."/>
+
+ <!-- References like [ProductName] are not resolved for Property tags -->
+ <String Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Node.js has been successfully installed."/>
+</WixLocalization>
diff --git a/tools/msvs/msi/nodemsi/nodemsi.wixproj b/tools/msvs/msi/nodemsi/nodemsi.wixproj
new file mode 100644
index 0000000000..b1463cf656
--- /dev/null
+++ b/tools/msvs/msi/nodemsi/nodemsi.wixproj
@@ -0,0 +1,70 @@
+<Project Sdk="WixToolset.Sdk/4.0.0-rc.1">
+ <Import Project="Sdk.props" Sdk="WixToolset.Sdk" Version="4.0.0-rc.1" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>3.5</ProductVersion>
+ <ProjectGuid>{1d808ff0-b5a9-4be9-859d-b334b6f48be2}</ProjectGuid>
+ <OutputName>node-v$(FullVersion)-$(Platform)</OutputName>
+ <OutputType>Package</OutputType>
+ <NodeVersion Condition=" '$(NodeVersion)' == '' ">0.0.0.0</NodeVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>..\..\..\..\</OutputPath>
+ <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
+ <DefineConstants>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</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>..\..\..\..\</OutputPath>
+ <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
+ <DefineConstants>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</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <OutputPath>..\..\..\..\</OutputPath>
+ <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
+ <DefineConstants>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</DefineConstants>
+ <Cultures>en-US</Cultures>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>..\..\..\..\</OutputPath>
+ <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
+ <DefineConstants>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</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|arm64' ">
+ <OutputPath>..\..\..\..\</OutputPath>
+ <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
+ <DefineConstants>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</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|arm64' ">
+ <OutputPath>..\..\..\..\</OutputPath>
+ <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
+ <DefineConstants>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</DefineConstants>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\..\npm.wxs">
+ <Link>npm.wxs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\corepack.wxs">
+ <Link>corepack.wxs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="WixToolset.UI.wixext" Version="4.0.0-rc.1" />
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.0-rc.1" />
+ <PackageReference Include="WixToolset.Heat" Version="4.0.0-rc.1" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../custom_actions/custom_actions.vcxproj" />
+ </ItemGroup>
+ <Import Project="Sdk.targets" Sdk="WixToolset.Sdk" Version="4.0.0-rc.1" />
+ <Target Name="BeforeBuild">
+ <HeatDirectory ToolPath="$(WixToolPath)" Directory="..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm" PreprocessorVariable="var.NpmSourceDir" DirectoryRefId="NodeModulesFolder" ComponentGroupName="NpmSourceFiles" GenerateGuidsNow="true" SuppressFragments="false" OutputFile="..\..\..\..\npm.wxs">
+ </HeatDirectory>
+ <HeatDirectory ToolPath="$(WixToolPath)" Directory="..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack" PreprocessorVariable="var.CorepackSourceDir" DirectoryRefId="NodeModulesFolder" ComponentGroupName="CorepackSourceFiles" GenerateGuidsNow="true" SuppressFragments="false" OutputFile="..\..\..\..\corepack.wxs">
+ </HeatDirectory>
+ </Target>
+ <PropertyGroup>
+ <PostBuildEvent>move "$(TargetDir)en-us\$(TargetFileName)" "$(TargetPath)"
+ move "$(TargetDir)en-us\$(TargetPdbFileName)" "$(TargetPdbPath)"</PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/nodemsi/product.wxs
index c6984777fa..de4a6a34ce 100755..100644
--- a/tools/msvs/msi/product.wxs
+++ b/tools/msvs/msi/nodemsi/product.wxs
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
- xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
+ xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"
+ xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
<?define ProductName = "Node.js" ?>
<?define ProductDescription = "Node.js" ?>
@@ -8,24 +8,18 @@
<?define RegistryKeyPath = "SOFTWARE\Node.js" ?>
- <?define RepoDir="$(var.ProjectDir)..\..\..\" ?>
+ <?define RepoDir="$(var.ProjectDir)..\..\..\..\" ?>
<?define SourceDir="$(var.RepoDir)\$(var.Configuration)\" ?>
- <Product Id="*"
- Name="$(var.ProductName)"
+ <Package Name="$(var.ProductName)"
Language="!(loc.LocaleId)"
Version="$(var.ProductVersion)"
Manufacturer="$(var.ProductAuthor)"
- UpgradeCode="47c07a3a-42ef-4213-a85d-8f5a59077c28">
+ UpgradeCode="47c07a3a-42ef-4213-a85d-8f5a59077c28"
+ InstallerVersion="200"
+ Compressed="yes">
- <Package Languages="!(loc.LocaleId)"
- InstallerVersion="200"
- Compressed="yes"
- InstallScope="perMachine"/>
-
- <Condition Message="This application is only supported on Windows 8.1, Windows Server 2012 R2, or higher.">
- <![CDATA[Installed OR (VersionNT >= 603) OR (VersionNT >= 602 AND MsiNTProductType <> 1)]]>
- </Condition>
+ <Launch Condition="Installed OR (VersionNT &gt;= 603) OR (VersionNT &gt;= 602 AND MsiNTProductType &lt;&gt; 1)" Message="This application is only supported on Windows 8.1, Windows Server 2012 R2, or higher." />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>
@@ -46,10 +40,9 @@
<Property Id="ApplicationFolderName" Value="nodejs"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/>
- <!-- PropertyRef of the account users for setting InstallDir permission explicitly -->
- <PropertyRef Id="WIX_ACCOUNT_LOCALSYSTEM" />
- <PropertyRef Id="WIX_ACCOUNT_USERS" />
- <PropertyRef Id="WIX_ACCOUNT_ADMINISTRATORS" />
+ <!-- WiX 4 QueryWindowsWellKnownSIDs element replaces previously used PropertyRef. -->
+ <!-- It sets all properties with the WIX_ACCOUNT_ prefix eg. WIX_ACCOUNT_USERS, etc. -->
+ <util:QueryWindowsWellKnownSIDs/>
<Property Id="INSTALLDIR" Secure="yes">
<RegistrySearch Id="InstallPathRegistry"
@@ -71,7 +64,7 @@
Level="1"
Title="!(loc.NodeRuntime_Title)"
Description="!(loc.NodeRuntime_Description)"
- Absent="disallow">
+ AllowAbsent="no">
<ComponentRef Id="NodeExecutable"/>
<ComponentRef Id="NodeRegistryEntries"/>
<ComponentRef Id="NodeVarsScript"/>
@@ -79,7 +72,6 @@
<ComponentRef Id="AppData" />
<ComponentRef Id="InstallToolsBat" />
<ComponentRef Id="SetInstallDirPermission" />
- <ComponentGroupRef Id="Product.Generated"/>
</Feature>
<Feature Id="corepack"
@@ -131,16 +123,14 @@
</Feature>
</Feature>
- <Directory Id="TARGETDIR" Name="SourceDir">
- <Directory Id="ProgramMenuFolder">
- <Directory Id="ApplicationProgramsFolder" Name="Node.js"/>
- </Directory>
+ <StandardDirectory Id="ProgramMenuFolder">
+ <Directory Id="ApplicationProgramsFolder" Name="Node.js"/>
+ </StandardDirectory>
- <Directory Id="$(var.ProgramFilesFolderId)">
- <Directory Id="INSTALLDIR" Name="nodejs">
- </Directory>
+ <StandardDirectory Id="$(var.ProgramFilesFolderId)">
+ <Directory Id="INSTALLDIR" Name="nodejs">
</Directory>
- </Directory>
+ </StandardDirectory>
<DirectoryRef Id="INSTALLDIR">
<Component Id="NodeExecutable">
@@ -197,13 +187,13 @@
<Shortcut Id="NodeVarsScriptShortcut"
Name="Node.js command prompt"
Target="[%ComSpec]"
- Arguments='/k "[INSTALLDIR]nodevars.bat"'
+ Arguments="/k &quot;[INSTALLDIR]nodevars.bat&quot;"
Show="normal"
WorkingDirectory="INSTALLDIR"/>
<Shortcut Id="InstallToolsShortcut"
Name="Install Additional Tools for Node.js"
Target="[%ComSpec]"
- Arguments='/d /c "[INSTALLDIR]install_tools.bat"'
+ Arguments="/d /c &quot;[INSTALLDIR]install_tools.bat&quot;"
Show="normal"
WorkingDirectory="INSTALLDIR"/>
<Shortcut Id="NodeExecutableShortcut"
@@ -251,17 +241,17 @@
</Component>
</Directory>
</Directory>
+ </DirectoryRef>
- <Directory Id="AppDataFolder">
- <Directory Id="AppDataDir" Name="npm">
- <Component Id="AppData" Guid="D3B35D0E-D0F9-4D11-A773-D4608E90E1D1">
- <CreateFolder />
- <RemoveFolder Id="AppDataDir" On="uninstall" />
- <RegistryValue Root="HKCU" Key="$(var.RegistryKeyPath)\Components" Type="string" Value="" />
- </Component>
- </Directory>
+ <StandardDirectory Id="AppDataFolder">
+ <Directory Id="AppDataDir" Name="npm">
+ <Component Id="AppData" Guid="D3B35D0E-D0F9-4D11-A773-D4608E90E1D1">
+ <CreateFolder />
+ <RemoveFolder Id="AppDataDir" On="uninstall" />
+ <RegistryValue Root="HKCU" Key="$(var.RegistryKeyPath)\Components" Type="string" Value="" />
+ </Component>
</Directory>
- </DirectoryRef>
+ </StandardDirectory>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="DocumentationShortcuts">
@@ -314,38 +304,39 @@
</Component>
</DirectoryRef>
- <Binary Id='CustomActionsDLL'
- SourceFile='$(var.custom_actions.TargetDir)$(var.custom_actions.TargetName).dll' />
+ <Binary Id="CustomActionsDLL"
+ SourceFile="$(var.custom_actions.TargetDir)$(var.custom_actions.TargetName).dll" />
<CustomAction Id="SetInstallScope"
- BinaryKey="CustomActionsDLL"
+ BinaryRef="CustomActionsDLL"
DllEntry="SetInstallScope"
Execute="immediate"
Return="check" />
- <CustomAction Id="BroadcastEnvironmentUpdate"
- BinaryKey="CustomActionsDLL"
- DllEntry="BroadcastEnvironmentUpdate"
+ <CustomAction Id="WixBroadcastEnvironmentChange"
+ BinaryRef="Wix4UtilCA_X86"
+ DllEntry="WixBroadcastEnvironmentChange"
Execute="immediate"
Return="check" />
<CustomAction Id="GetLocalizedUserNames"
- BinaryKey="CustomActionsDLL"
+ BinaryRef="CustomActionsDLL"
DllEntry="GetLocalizedUserNames"
Execute="immediate"
Return="check" />
<Property Id="WixShellExecTarget" Value="[#InstallToolsBat]" />
- <CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" />
+ <CustomAction Id="LaunchApplication" BinaryRef="Wix4UtilCA_X86" DllEntry="WixShellExec" />
+ <CustomAction Id="PrintEula" BinaryRef="WixUiCa_X86" DllEntry="PrintEula" />
<InstallUISequence>
- <Custom Action='SetInstallScope' Before='FindRelatedProducts'/>
+ <Custom Action="SetInstallScope" Before="FindRelatedProducts"/>
</InstallUISequence>
<InstallExecuteSequence>
- <Custom Action='SetInstallScope' Before='FindRelatedProducts'/>
- <Custom Action='GetLocalizedUserNames' After='SetInstallScope'/>
- <Custom Action='BroadcastEnvironmentUpdate' After='InstallFinalize'/>
+ <Custom Action="SetInstallScope" Before="FindRelatedProducts"/>
+ <Custom Action="GetLocalizedUserNames" After="SetInstallScope"/>
+ <Custom Action="WixBroadcastEnvironmentChange" After="InstallFinalize"/>
</InstallExecuteSequence>
<UI Id="NodeInstallUI">
@@ -383,34 +374,35 @@
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" />
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
- <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
+ <Publish Event="SpawnDialog" Value="CancelDlg" />
</Control>
</Dialog>
- <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">NOT Installed</Publish>
- <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
- <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
- <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAccepted = "1"</Publish>
- <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
- <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg" Order="20">1</Publish>
- <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="10">1</Publish>
- <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="10">1</Publish>
- <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="20">1</Publish>
- <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1">NOT Installed OR WixUI_InstallMode = "Change"</Publish>
- <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
- <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3">Installed AND PATCH</Publish>
- <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="CustomizeDlg">1</Publish>
- <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
- <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
- <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
- <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
- <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="1">Installed</Publish>
- <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="2">NOT Installed</Publish>
- <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="NativeToolsDlg">1</Publish>
- <Publish Dialog="NativeToolsDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg">1</Publish>
- <Publish Dialog="NativeToolsDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
- <Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">NATIVETOOLSCHECKBOX = 1</Publish>
- <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
+ <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg" Condition="NOT Installed" />
+ <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Condition="Installed AND PATCH" />
+ <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" />
+ <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Condition="LicenseAccepted = &quot;1&quot;" />
+ <Publish Dialog="LicenseAgreementDlg" Control="Print" Event="DoAction" Value="PrintEula" />
+ <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" />
+ <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg" Order="20" />
+ <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="10" />
+ <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="10" />
+ <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="20" />
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1" Condition="NOT Installed OR WixUI_InstallMode = &quot;Change&quot;" />
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2" Condition="Installed AND NOT PATCH" />
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3" Condition="Installed AND PATCH" />
+ <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="CustomizeDlg" />
+ <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg" />
+ <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg" />
+ <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg" />
+ <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg" />
+ <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="1" Condition="Installed" />
+ <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="2" Condition="NOT Installed" />
+ <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="NativeToolsDlg" />
+ <Publish Dialog="NativeToolsDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" />
+ <Publish Dialog="NativeToolsDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" />
+ <Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication" Condition="NATIVETOOLSCHECKBOX = 1" />
+ <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" />
<Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="!(loc.WIXUI_EXITDIALOGOPTIONALTEXT)"/>
</UI>
@@ -420,6 +412,6 @@
<WixVariable Id="WixUIBannerBmp" Value="$(var.RepoDir)\doc\thin-white-stripe.jpg"/>
<WixVariable Id="WixUIDialogBmp" Value="$(var.RepoDir)\doc\full-white-stripe.jpg"/>
<WixVariable Id="WixUILicenseRtf" Value="$(var.SourceDir)\LICENSE.rtf"/>
- </Product>
+ </Package>
</Wix>
diff --git a/vcbuild.bat b/vcbuild.bat
index 858b54cc23..a4dd3a28d5 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