0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
nodejs/tools/msvs/msi/product.wxs
Frederic Hemberger 45a2046f5d installer: fix installers for node.js rename
This commit completes the io.js to Node.js rename in the
Windows installer.

Fixes: https://github.com/nodejs/node/issues/2418
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2015-08-23 17:59:43 -04:00

319 lines
14 KiB
XML
Executable File

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<?define ProductName = "Node.js" ?>
<?define ProductDescription = "Node.js" ?>
<?define ProductAuthor = "Node.js Foundation" ?>
<?define RegistryKeyPath = "SOFTWARE\Node.js" ?>
<?define RepoDir="$(var.ProjectDir)..\..\..\" ?>
<?define SourceDir="$(var.RepoDir)\$(var.Configuration)\" ?>
<Product Id="*"
Name="$(var.ProductName)"
Language="!(loc.LocaleId)"
Version="$(var.ProductVersion)"
Manufacturer="$(var.ProductAuthor)"
UpgradeCode="47c07a3a-42ef-4213-a85d-8f5a59077c28">
<Package Languages="!(loc.LocaleId)" InstallerVersion="200" Compressed="yes"/>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>
<MajorUpgrade AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="!(loc.MajorUpgrade_DowngradeErrorMessage)"/>
<Icon Id="NodeIcon" SourceFile="$(var.RepoDir)\src\res\node.ico"/>
<Property Id="ARPPRODUCTICON" Value="NodeIcon"/>
<Property Id="ApplicationFolderName" Value="node"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/>
<Property Id="INSTALLDIR">
<RegistrySearch Id="InstallPathRegistry"
Type="raw"
Root="HKCU"
Key="$(var.RegistryKeyPath)"
Name="InstallPath"/>
</Property>
<Feature Id="NodeRuntime"
Level="1"
Title="!(loc.NodeRuntime_Title)"
Description="!(loc.NodeRuntime_Description)"
Absent="disallow">
<ComponentRef Id="NodeExecutable"/>
<ComponentRef Id="NodeVarsScript"/>
<ComponentRef Id="NodeStartMenuAndRegistryEntries"/>
<ComponentRef Id="AppData" />
<ComponentGroupRef Id="Product.Generated"/>
<Feature Id="NodePerfCtrSupport"
Level="1"
Title="!(loc.NodePerfCtrSupport_Title)"
Description="!(loc.NodePerfCtrSupport_Description)">
<ComponentRef Id="NodePerfCtrSupport"/>
</Feature>
<Feature Id="NodeEtwSupport"
Level="1"
Title="!(loc.NodeEtwSupport_Title)"
Description="!(loc.NodeEtwSupport_Description)">
<ComponentRef Id="NodeEtwSupport"/>
</Feature>
</Feature>
<Feature Id="npm"
Level="1"
Title="!(loc.npm_Title)"
Description="!(loc.npm_Description)">
<ComponentRef Id="NpmCmdScript"/>
<ComponentRef Id="NpmBashScript"/>
<ComponentRef Id="NpmConfigurationFile"/>
<ComponentRef Id="AppData" />
<ComponentGroupRef Id="NpmSourceFiles"/>
</Feature>
<Feature Level="1"
Id="DocumentationShortcuts"
Title="!(loc.DocumentationShortcuts_Title)"
Description="!(loc.DocumentationShortcuts_Description)">
<ComponentRef Id="DocumentationShortcuts"/>
</Feature>
<Feature Id="EnvironmentPath"
Level="1"
Title="!(loc.EnvironmentPath_Title)"
Description="!(loc.EnvironmentPath_Description)">
<Feature Id="EnvironmentPathNode"
Level="1"
Title="!(loc.EnvironmentPathNode_Title)"
Description="!(loc.EnvironmentPathNode_Description)">
<ComponentRef Id="EnvironmentPathNode"/>
</Feature>
<Feature Id="EnvironmentPathNpmModules"
Level="1"
Title="!(loc.EnvironmentPathNpmModules_Title)"
Description="!(loc.EnvironmentPathNpmModules_Description)">
<ComponentRef Id="EnvironmentPathNpmModules"/>
</Feature>
</Feature>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="Node.js"/>
</Directory>
<Directory Id="$(var.ProgramFilesFolderId)">
<Directory Id="INSTALLDIR" Name="nodejs">
</Directory>
</Directory>
</Directory>
<DirectoryRef Id="INSTALLDIR">
<Component Id="NodeExecutable">
<File Id="node.exe" KeyPath="yes" Source="$(var.SourceDir)\node.exe"/>
</Component>
<Component Id="NodeVarsScript">
<File Id="nodevars.bat" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\nodevars.bat"/>
</Component>
<?if $(var.NoPerfCtr) != 1 ?>
<Component Id="NodePerfCtrSupport">
<File Id="node_perfctr_provider_man" Name="node_perfctr_provider.man" Source="$(var.RepoDir)\src\res\node_perfctr_provider.man">
<util:PerfCounterManifest ResourceFileDirectory="[INSTALLDIR]"/>
</File>
</Component>
<?endif?>
<?if $(var.NoETW) != 1 ?>
<Component Id="NodeEtwSupport">
<File Id="node_etw_provider.man" Source="$(var.RepoDir)\src\res\node_etw_provider.man">
<util:EventManifest MessageFile="[INSTALLDIR]node.exe" ResourceFile="[INSTALLDIR]node.exe"/>
</File>
</Component>
<?endif?>
</DirectoryRef>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="NodeStartMenuAndRegistryEntries">
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)"
Name="InstallPath"
Type="string"
Value="[INSTALLDIR]"
KeyPath="yes"/>
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)"
Name="Version"
Type="string"
Value="$(var.ProductVersion)"/>
<Shortcut Id="NodeVarsScriptShortcut"
Name="Node.js command prompt"
Target="[%ComSpec]"
Arguments='/k "[INSTALLDIR]nodevars.bat"'
Show="normal"
WorkingDirectory="INSTALLDIR"/>
<Shortcut Id="NodeExecutableShortcut"
Name="Node.js"
Target="[INSTALLDIR]node.exe"
WorkingDirectory="INSTALLDIR"/>
<Shortcut Id="UninstallProduct"
Name="Uninstall Node.js"
Target="[SystemFolder]msiexec.exe"
Arguments="/x [ProductCode]"/>
<RemoveFolder Id="RemoveApplicationProgramsFolder"
On="uninstall"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLDIR">
<Component Id="NpmCmdScript">
<File Id="npm.cmd" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npm.cmd"/>
</Component>
<Component Id="NpmBashScript">
<File Id="npm.sh" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npm"/>
</Component>
<Directory Id="NodeModulesFolder" Name="node_modules">
<Directory Id="NpmFolder" Name="npm">
<Component Id="NpmConfigurationFile">
<File Id="npm.rc" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\npm\npmrc"/>
</Component>
</Directory>
</Directory>
<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>
</Directory>
</DirectoryRef>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="DocumentationShortcuts">
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)\Components"
Name="DocumentationShortcuts"
Type="integer"
Value="1"
KeyPath="yes"/>
<util:InternetShortcut Id="WebsiteShortcut"
Name="Node.js website"
Target="http://nodejs.org"
Type="url"/>
<util:InternetShortcut Id="DocsShortcut"
Name="Node.js documentation"
Target="https://nodejs.org/download/$(var.DistTypeDir)/v$(var.FullVersion)/doc/api/"
Type="url"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLDIR">
<Component Id="EnvironmentPathNode">
<RegistryValue Root="HKLM"
Key="$(var.RegistryKeyPath)\Components"
Name="EnvironmentPathNode"
Type="integer"
Value="1"
KeyPath="yes"/>
<Environment Id="EnvironmentPathNode"
Action="set"
Name="PATH"
Part="last"
System="yes"
Value="[INSTALLDIR]"/>
</Component>
<Component Id="EnvironmentPathNpmModules">
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)\Components"
Name="EnvironmentPathNpmModules"
Type="integer"
Value="1"
KeyPath="yes"/>
<Environment Id="EnvironmentPathNpmModules"
Action="set"
Name="PATH"
Part="last"
System="no"
Value="[AppDataFolder]npm"/>
</Component>
</DirectoryRef>
<Binary Id='BroadcastEnvironmentUpdate'
SourceFile='$(var.custom_actions.TargetDir)$(var.custom_actions.TargetName).dll' />
<CustomAction Id="BroadcastEnvironmentUpdate"
BinaryKey="BroadcastEnvironmentUpdate"
DllEntry="BroadcastEnvironmentUpdate"
Execute="immediate"
Return="check" />
<InstallExecuteSequence>
<Custom Action='BroadcastEnvironmentUpdate' After='InstallFinalize'/>
</InstallExecuteSequence>
<UI Id="NodeInstallUI">
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8"/>
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12"/>
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes"/>
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal"/>
<Property Id="WixUI_Mode" Value="FeatureTree"/>
<DialogRef Id="ErrorDlg"/>
<DialogRef Id="FatalError"/>
<DialogRef Id="FilesInUse"/>
<DialogRef Id="MsiRMFilesInUse"/>
<DialogRef Id="PrepareDlg"/>
<DialogRef Id="ProgressDlg"/>
<DialogRef Id="ResumeDlg"/>
<DialogRef Id="UserExit"/>
<DialogRef Id="WelcomeDlg"/>
<DialogRef Id="LicenseAgreementDlg"/>
<DialogRef Id="InstallDirDlg"/>
<DialogRef Id="BrowseDlg"/>
<DialogRef Id="InvalidDirDlg"/>
<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="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">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="VerifyReadyDlg">1</Publish>
<Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="!(loc.WIXUI_EXITDIALOGOPTIONALTEXT)"/>
</UI>
<UIRef Id="WixUI_Common"/>
<WixVariable Id="WixUIBannerBmp" Value="..\..\..\doc\thin-white-stripe.jpg"/>
<WixVariable Id="WixUIDialogBmp" Value="..\..\..\doc\full-white-stripe.jpg"/>
<WixVariable Id="WixUILicenseRtf" Value="$(var.SourceDir)\LICENSE.rtf"/>
</Product>
</Wix>