1 <?xml version="1.0" encoding="UTF-8"?>
2 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
3 xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
5 <?define ProductName = "Node.js" ?>
6 <?define ProductDescription = "Node.js" ?>
7 <?define ProductAuthor = "Joyent, Inc. and other Node contributors" ?>
9 <?define RegistryKeyPath = "SOFTWARE\Node.js" ?>
11 <?define RepoDir="$(var.ProjectDir)..\..\..\" ?>
12 <?define SourceDir="$(var.RepoDir)\$(var.Configuration)\" ?>
15 Name="$(var.ProductName)"
17 Version="$(var.ProductVersion)"
18 Manufacturer="$(var.ProductAuthor)"
19 UpgradeCode="1d60944c-b9ce-4a71-a7c0-0384eb884baa">
21 <Package InstallerVersion="200" Compressed="yes"/>
23 <Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>
25 <MajorUpgrade AllowSameVersionUpgrades="yes"
26 DowngradeErrorMessage="A later version of node.js is already installed. Setup will now exit."/>
28 <Icon Id="NodeIcon" SourceFile="$(var.RepoDir)\src\res\node.ico"/>
29 <Property Id="ARPPRODUCTICON" Value="NodeIcon"/>
30 <Property Id="ApplicationFolderName" Value="nodejs"/>
31 <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/>
33 <Property Id="INSTALLDIR">
34 <RegistrySearch Id="InstallPathRegistry"
37 Key="$(var.RegistryKeyPath)"
41 <Feature Id="NodeRuntime"
43 Title="Node.js runtime"
44 Description="Install the core Node.js runtime (node.exe)."
46 <ComponentRef Id="NodeExecutable"/>
47 <ComponentRef Id="NodeVarsScript"/>
48 <ComponentRef Id="NodeStartMenuAndRegistryEntries"/>
49 <ComponentGroupRef Id="Product.Generated"/>
51 <Feature Id="NodePerfCtrSupport"
53 Title="Performance counters"
54 Description="Installs support for Node.js-specific performance counters.">
55 <ComponentRef Id="NodePerfCtrSupport"/>
58 <Feature Id="NodeEtwSupport"
60 Title="Event tracing (ETW)"
61 Description="Installs support for event tracing (ETW) events generated by Node.js.">
62 <ComponentRef Id="NodeEtwSupport"/>
68 Title="npm package manager"
69 Description="Install npm, the recommended package manager for Node.js.">
70 <ComponentRef Id="NpmCmdScript"/>
71 <ComponentRef Id="NpmBashScript"/>
72 <ComponentRef Id="NpmConfigurationFile"/>
73 <ComponentGroupRef Id="NpmSourceFiles"/>
77 Id="DocumentationShortcuts"
78 Title="Online documentation shortcuts"
79 Description="Add start menu entries that link the the online documentation for Node.js $(var.ProductVersion) and the Node.js website.">
80 <ComponentRef Id="DocumentationShortcuts"/>
83 <Feature Id="EnvironmentPath"
86 Description="Add Node, npm, and modules that were globally installed by npm to the PATH environment variable.">
87 <Feature Id="EnvironmentPathNode"
90 Description="Add Node and npm (if installed) to the PATH environment variable.">
91 <ComponentRef Id="EnvironmentPathNode"/>
94 <Feature Id="EnvironmentPathNpmModules"
97 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.">
98 <ComponentRef Id="EnvironmentPathNpmModules"/>
102 <Directory Id="TARGETDIR" Name="SourceDir">
103 <Directory Id="ProgramMenuFolder">
104 <Directory Id="ApplicationProgramsFolder" Name="Node.js"/>
107 <Directory Id="$(var.ProgramFilesFolderId)">
108 <Directory Id="INSTALLDIR" Name="nodejs">
113 <DirectoryRef Id="INSTALLDIR">
114 <Component Id="NodeExecutable">
115 <File Id="node.exe" KeyPath="yes" Source="$(var.SourceDir)\node.exe"/>
118 <Component Id="NodeVarsScript">
119 <File Id="nodevars.bat" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\nodevars.bat"/>
122 <?if $(var.NoPerfCtr) != 1 ?>
123 <Component Id="NodePerfCtrSupport">
124 <File Id="node_perfctr_provider_man" Name="node_perfctr_provider.man" Source="$(var.RepoDir)\src\res\node_perfctr_provider.man">
125 <util:PerfCounterManifest ResourceFileDirectory="[INSTALLDIR]"/>
130 <?if $(var.NoETW) != 1 ?>
131 <Component Id="NodeEtwSupport">
132 <File Id="node_etw_provider.man" Source="$(var.RepoDir)\src\res\node_etw_provider.man">
133 <util:EventManifest MessageFile="[INSTALLDIR]node.exe" ResourceFile="[INSTALLDIR]node.exe"/>
139 <DirectoryRef Id="ApplicationProgramsFolder">
140 <Component Id="NodeStartMenuAndRegistryEntries">
141 <RegistryValue Root="HKCU"
142 Key="$(var.RegistryKeyPath)"
147 <RegistryValue Root="HKCU"
148 Key="$(var.RegistryKeyPath)"
151 Value="$(var.ProductVersion)"/>
152 <Shortcut Id="NodeVarsScriptShortcut"
153 Name="Node.js command prompt"
155 Arguments='/k "[INSTALLDIR]nodevars.bat"'
157 WorkingDirectory="INSTALLDIR"/>
158 <Shortcut Id="NodeExecutableShortcut"
160 Target="[INSTALLDIR]node.exe"
161 WorkingDirectory="INSTALLDIR"/>
162 <Shortcut Id="UninstallProduct"
163 Name="Uninstall Node.js"
164 Target="[SystemFolder]msiexec.exe"
165 Arguments="/x [ProductCode]"/>
166 <RemoveFolder Id="RemoveApplicationProgramsFolder"
171 <DirectoryRef Id="INSTALLDIR">
172 <Component Id="NpmCmdScript">
173 <File Id="npm.cmd" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npm.cmd"/>
176 <Component Id="NpmBashScript">
177 <File Id="npm.sh" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npm"/>
180 <Directory Id="NodeModulesFolder" Name="node_modules">
181 <Directory Id="NpmFolder" Name="npm">
182 <Component Id="NpmConfigurationFile">
183 <File Id="npm.rc" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\npm\npmrc"/>
189 <DirectoryRef Id="ApplicationProgramsFolder">
190 <Component Id="DocumentationShortcuts">
191 <RegistryValue Root="HKCU"
192 Key="$(var.RegistryKeyPath)\Components"
193 Name="DocumentationShortcuts"
197 <util:InternetShortcut Id="WebsiteShortcut"
198 Name="Node.js website"
199 Target="http://nodejs.org"
201 <util:InternetShortcut Id="DocsShortcut"
202 Name="Node.js documentation"
203 Target="http://nodejs.org/dist/v$(var.ProductVersion)/docs/api/"
208 <DirectoryRef Id="INSTALLDIR">
209 <Component Id="EnvironmentPathNode">
210 <RegistryValue Root="HKLM"
211 Key="$(var.RegistryKeyPath)\Components"
212 Name="EnvironmentPathNode"
216 <Environment Id="EnvironmentPathNode"
221 Value="[INSTALLDIR]"/>
224 <Component Id="EnvironmentPathNpmModules">
225 <RegistryValue Root="HKCU"
226 Key="$(var.RegistryKeyPath)\Components"
227 Name="EnvironmentPathNpmModules"
231 <Environment Id="EnvironmentPathNpmModules"
236 Value="[AppDataFolder]npm"/>
240 <UI Id="NodeInstallUI">
241 <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8"/>
242 <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12"/>
243 <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes"/>
245 <Property Id="DefaultUIFont" Value="WixUI_Font_Normal"/>
246 <Property Id="WixUI_Mode" Value="FeatureTree"/>
248 <DialogRef Id="ErrorDlg"/>
249 <DialogRef Id="FatalError"/>
250 <DialogRef Id="FilesInUse"/>
251 <DialogRef Id="MsiRMFilesInUse"/>
252 <DialogRef Id="PrepareDlg"/>
253 <DialogRef Id="ProgressDlg"/>
254 <DialogRef Id="ResumeDlg"/>
255 <DialogRef Id="UserExit"/>
256 <DialogRef Id="WelcomeDlg"/>
257 <DialogRef Id="LicenseAgreementDlg"/>
258 <DialogRef Id="InstallDirDlg"/>
259 <DialogRef Id="BrowseDlg"/>
260 <DialogRef Id="InvalidDirDlg"/>
262 <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">NOT Installed</Publish>
263 <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
264 <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
265 <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAccepted = "1"</Publish>
266 <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
267 <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg" Order="20">1</Publish>
268 <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="10">1</Publish>
269 <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="10">1</Publish>
270 <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="20">1</Publish>
271 <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
272 <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1">NOT Installed OR WixUI_InstallMode = "Change"</Publish>
273 <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
274 <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3">Installed AND PATCH</Publish>
275 <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="CustomizeDlg">1</Publish>
276 <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
277 <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
278 <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
279 <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
280 <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="1">Installed</Publish>
281 <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="2">NOT Installed</Publish>
282 <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
284 <Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Node.js has been successfully installed."/>
287 <UIRef Id="WixUI_Common"/>
288 <WixVariable Id="WixUIBannerBmp" Value="..\..\..\doc\thin-white-stripe.jpg"/>
289 <WixVariable Id="WixUIDialogBmp" Value="..\..\..\doc\full-white-stripe.jpg"/>
290 <WixVariable Id="WixUILicenseRtf" Value="$(var.SourceDir)\LICENSE.rtf"/>