summaryrefslogtreecommitdiffstats
path: root/src/etc/installer/msi
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/etc/installer/msi
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/etc/installer/msi')
-rw-r--r--src/etc/installer/msi/remove-duplicates.xsl24
-rw-r--r--src/etc/installer/msi/rust.wxs293
-rw-r--r--src/etc/installer/msi/rustwelcomedlg.wxs57
-rw-r--r--src/etc/installer/msi/squash-components.xsl34
-rw-r--r--src/etc/installer/msi/ui.wxs83
5 files changed, 491 insertions, 0 deletions
diff --git a/src/etc/installer/msi/remove-duplicates.xsl b/src/etc/installer/msi/remove-duplicates.xsl
new file mode 100644
index 000000000..05b4c9bcc
--- /dev/null
+++ b/src/etc/installer/msi/remove-duplicates.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
+ <!-- Copy all attributes and elements to the output. -->
+ <xsl:template match="@*|*">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|*"/>
+ </xsl:copy>
+ </xsl:template>
+ <xsl:output method="xml" indent="yes" />
+
+ <!-- LICENSE* files are installed from rustc dir. -->
+ <xsl:key name="duplicates-cmp-ids" match="wix:Component[./wix:File[contains(@Source, 'LICENSE')]|./wix:File[contains(@Source, 'rust-installer-version')]]" use="@Id" />
+ <xsl:template match="wix:Component[key('duplicates-cmp-ids', @Id)]" />
+ <xsl:template match="wix:ComponentRef[key('duplicates-cmp-ids', @Id)]" />
+
+ <xsl:template match="wix:File[contains(@Source, 'README.md')]">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|*"/>
+ <xsl:attribute name="Name">README-CARGO.md</xsl:attribute>
+ </xsl:copy>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/src/etc/installer/msi/rust.wxs b/src/etc/installer/msi/rust.wxs
new file mode 100644
index 000000000..a182bc406
--- /dev/null
+++ b/src/etc/installer/msi/rust.wxs
@@ -0,0 +1,293 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+
+ <?if $(sys.BUILDARCH)="x64" ?>
+ <?define ArchSuffix=" 64-bit" ?>
+ <?else?>
+ <?define ArchSuffix="" ?>
+ <?endif?>
+
+ <?if $(env.CFG_CHANNEL)="stable" ?>
+ <?define ProductName="Rust $(env.CFG_VER_MAJOR).$(env.CFG_VER_MINOR) ($(env.CFG_ABI)$(var.ArchSuffix))" ?>
+ <?else?>
+ <?define ProductName="Rust $(env.CFG_CHANNEL) $(env.CFG_VER_MAJOR).$(env.CFG_VER_MINOR) ($(env.CFG_ABI)$(var.ArchSuffix))" ?>
+ <?endif?>
+
+ <?define BaseRegKey="Software\[Manufacturer]\Rust $(env.CFG_CHANNEL) ($(env.CFG_ABI)$(var.ArchSuffix))\$(env.CFG_VER_MAJOR).$(env.CFG_VER_MINOR)" ?>
+
+ <!-- Upgrade code should be different for each platform -->
+ <?if $(sys.BUILDARCH)="x64" ?>
+ <?if $(env.CFG_ABI)="GNU" ?>
+ <!-- UpgradeCode should stay the same for all MSI versions in channel -->
+ <?if $(env.CFG_CHANNEL)="stable" ?>
+ <?define UpgradeCode="B440B077-F8D1-4730-8E1D-D6D37702B4CE" ?>
+ <?elseif $(env.CFG_CHANNEL)="beta" ?>
+ <?define UpgradeCode="7205CEDC-CDA6-4B62-8E4E-4D19EC5D88FC" ?>
+ <?elseif $(env.CFG_CHANNEL)="nightly" ?>
+ <?define UpgradeCode="622497D9-E0B1-448E-838A-4A33D0C5F82C" ?>
+ <?elseif $(env.CFG_CHANNEL)="dev" ?>
+ <?define UpgradeCode="7D32FD99-BB26-45CF-935D-1B0593BBDDBE" ?>
+ <?endif ?>
+ <?elseif $(env.CFG_ABI)="MSVC" ?>
+ <?if $(env.CFG_CHANNEL)="stable" ?>
+ <?define UpgradeCode="123039F9-68E3-44F1-AC9F-C78ADD4D0723" ?>
+ <?elseif $(env.CFG_CHANNEL)="beta" ?>
+ <?define UpgradeCode="ABC640B9-2AB5-4270-9A0D-E54E502A1CCA" ?>
+ <?elseif $(env.CFG_CHANNEL)="nightly" ?>
+ <?define UpgradeCode="56263F12-4AA1-4FE1-AFAE-572915C4FA3E" ?>
+ <?elseif $(env.CFG_CHANNEL)="dev" ?>
+ <?define UpgradeCode="231A9544-7E39-4A60-A069-0EB3CA4BAB2E" ?>
+ <?endif ?>
+ <?endif ?>
+ <?define PlatformProgramFilesFolder="ProgramFiles64Folder" ?>
+ <?elseif $(sys.BUILDARCH)="x86" ?>
+ <?if $(env.CFG_ABI)="GNU" ?>
+ <?if $(env.CFG_CHANNEL)="stable" ?>
+ <?define UpgradeCode="1C7CADA5-D117-43F8-A356-DF15F9FBEFF6" ?>
+ <?elseif $(env.CFG_CHANNEL)="beta" ?>
+ <?define UpgradeCode="5229EAC1-AB7C-4A62-9881-6FAD2DE7D0F9" ?>
+ <?elseif $(env.CFG_CHANNEL)="nightly" ?>
+ <?define UpgradeCode="B94FF1C2-2C7B-4859-A08B-546815516FDA" ?>
+ <?elseif $(env.CFG_CHANNEL)="dev" ?>
+ <?define UpgradeCode="7E6D1349-2773-4792-B8CD-EA2685D86A99" ?>
+ <?endif ?>
+ <?elseif $(env.CFG_ABI)="MSVC" ?>
+ <?if $(env.CFG_CHANNEL)="stable" ?>
+ <?define UpgradeCode="5805719C-45E9-4CF6-9CE7-1E8B57F3C243" ?>
+ <?elseif $(env.CFG_CHANNEL)="beta" ?>
+ <?define UpgradeCode="BC0731C1-BED1-424C-BE99-3589C35C84DE" ?>
+ <?elseif $(env.CFG_CHANNEL)="nightly" ?>
+ <?define UpgradeCode="FF193BBC-E73B-4FBD-ADE0-12F3CFC84145" ?>
+ <?elseif $(env.CFG_CHANNEL)="dev" ?>
+ <?define UpgradeCode="87DFC303-6492-4E9B-911E-56EAD56C5E58" ?>
+ <?endif ?>
+ <?endif ?>
+ <?define PlatformProgramFilesFolder="ProgramFilesFolder" ?>
+ <?else ?>
+ <?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH)?>
+ <?endif ?>
+
+ <Product Id="*"
+ Name="$(var.ProductName)"
+ Language="1033"
+ Version="$(env.CFG_VER_MAJOR).$(env.CFG_VER_MINOR).$(env.CFG_VER_PATCH).$(env.CFG_VER_BUILD)"
+ UpgradeCode="$(var.UpgradeCode)"
+ Manufacturer="The Rust Project Developers">
+ <Package
+ Comments="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes, and eliminates data races."
+ InstallerVersion="200"
+ InstallPrivileges="elevated"
+ Compressed="yes" />
+
+ <Icon Id="rust.ico" SourceFile="rust-logo.ico" />
+ <Property Id="ApplicationFolderName" Value="Rust $(env.CFG_CHANNEL) $(env.CFG_ABI) $(env.CFG_VER_MAJOR).$(env.CFG_VER_MINOR)" />
+ <Property Id="WixAppFolder" Value="WixPerMachineFolder" />
+ <Property Id="ARPPRODUCTICON" Value="rust.ico" />
+ <Property Id="ARPURLINFOABOUT" Value="https://www.rust-lang.org/" />
+ <Property Id="ARPCOMMENTS" Value="$(env.CFG_RELEASE_INFO)" />
+ <!-- This is a dual-mode package. https://docs.microsoft.com/en-us/windows/win32/msi/single-package-authoring -->
+ <Property Id="ALLUSERS" Value="2" Secure="yes" />
+ <Property Id="MSIINSTALLPERUSER" Secure="yes" />
+ <!-- The actual install location (initialized below) -->
+ <Property Id="INSTALLDIR" Secure="yes" />
+
+ <!-- Detect path(s) of a previous installation. -->
+ <Property Id="INSTALLDIR_USER">
+ <RegistrySearch Id="InstallDir_User" Type="raw" Root="HKCU" Key="$(var.BaseRegKey)" Name="InstallDir" />
+ </Property>
+ <Property Id="INSTALLDIR_MACHINE">
+ <RegistrySearch Id="InstallDir_Mach" Type="raw" Root="HKLM" Key="$(var.BaseRegKey)" Name="InstallDir" />
+ </Property>
+
+ <!-- Set ALLUSERS to match the previous installation mode, otherwise FindRelatedProducts will ignore
+ the previous installation. If both INSTALLDIR_USER and INSTALLDIR_MACHINE are set, prefer the former. -->
+ <SetProperty Sequence="first" Before="FindRelatedProducts"
+ Id="ALLUSERS" Value="{}">INSTALLDIR_USER</SetProperty>
+
+ <!-- Set default values if RegSearch found nothing, or if we not upgrading -->
+ <SetProperty Sequence="both" Before="SetINSTALLDIR1"
+ Id="INSTALLDIR_USER" Value="[LocalAppDataFolder]Programs\[ApplicationFolderName]">NOT INSTALLDIR_USER</SetProperty>
+ <SetProperty Sequence="both" Before="SetINSTALLDIR1"
+ Id="INSTALLDIR_MACHINE" Value="[$(var.PlatformProgramFilesFolder)][ApplicationFolderName]">NOT INSTALLDIR_MACHINE</SetProperty>
+
+ <!-- Choose the default install location according to ALLUSERS (unless set from the command line) -->
+ <SetProperty Sequence="both" Action="SetINSTALLDIR1" Before="SetINSTALLDIR2"
+ Id="INSTALLDIR" Value="[INSTALLDIR_USER]">NOT INSTALLDIR AND NOT ALLUSERS</SetProperty>
+ <SetProperty Sequence="both" Action="SetINSTALLDIR2" Before="CostFinalize"
+ Id="INSTALLDIR" Value="[INSTALLDIR_MACHINE]">NOT INSTALLDIR AND ALLUSERS</SetProperty>
+
+ <SetProperty Sequence="ui" Before="CostFinalize"
+ Id="WixAppFolder" Value="WixPerUserFolder">NOT ALLUSERS</SetProperty>
+
+ <!-- UI sets ALLUSERS per user selection; progagate this choice to MSIINSTALLPERUSER before executing installation actions -->
+ <SetProperty Sequence="ui" Before="ExecuteAction"
+ Id="MSIINSTALLPERUSER" Value="1">NOT ALLUSERS</SetProperty>
+
+ <!-- Update ARPINSTALLLOCATION to match INSTALLDIR -->
+ <SetProperty Sequence="execute" Before="CostFinalize"
+ Id="ARPINSTALLLOCATION" Value="[INSTALLDIR]" />
+
+ <!-- Path of cmd.exe for the shortcut -->
+ <Property Id="SHORTCUTTARGET" Value="%windir%\System32\cmd.exe" />
+ <!-- Microsoft Installer will resolve any Environment Variables in the working directory at install time -->
+ <Property Id="SHORTCUTWKDIR" Value="%SystemDrive%\" />
+
+ <InstallUISequence>
+ <FindRelatedProducts After="AppSearch" />
+ </InstallUISequence>
+ <InstallExecuteSequence>
+ <FindRelatedProducts After="AppSearch" />
+ <RemoveExistingProducts Before="InstallInitialize" />
+ </InstallExecuteSequence>
+
+ <Upgrade Id="$(var.UpgradeCode)">
+ <UpgradeVersion
+ Minimum="$(env.CFG_VER_MAJOR).$(env.CFG_VER_MINOR).0"
+ Maximum="$(env.CFG_VER_MAJOR).$(env.CFG_VER_MINOR).65535"
+ IncludeMinimum="yes"
+ IncludeMaximum="yes"
+ MigrateFeatures="yes"
+ Property="UPGRADE_DETECTED"
+ />
+ </Upgrade>
+
+ <!-- Specifies a single cab file to be embedded in the installer's .msi. -->
+ <MediaTemplate EmbedCab="yes" CompressionLevel="mszip" />
+
+ <!-- Send a WM_SETTINGCHANGE message to tell processes like explorer to update their
+ environments so any new command prompts get the updated %PATH% -->
+ <CustomActionRef Id="WixBroadcastEnvironmentChange" />
+
+ <!-- Installation directory and files are defined in Files.wxs -->
+ <Directory Id="TARGETDIR" Name="SourceDir">
+ <Directory Id="$(var.PlatformProgramFilesFolder)">
+ <Directory Id="INSTALLDIR" Name="Rust">
+ <!-- Root directories for every feature should have different IDs for correct work of heat.exe -->
+ <Directory Id="Rustc" Name="." />
+ <?if $(env.CFG_MINGW)="1" ?>
+ <Directory Id="Gcc" Name="." />
+ <?endif?>
+ <Directory Id="Docs" Name="." />
+ <Directory Id="Cargo" Name="." />
+ <Directory Id="Std" Name="." />
+ <!-- tool-rls-start -->
+ <Directory Id="Rls" Name="." />
+ <Directory Id="Analysis" Name="." />
+ <!-- tool-rls-end -->
+ </Directory>
+ </Directory>
+
+ <!-- Record our install location -->
+ <Component Id="InstallDir" Guid="*">
+ <RegistryValue Root="HKMU" Key="$(var.BaseRegKey)"
+ Type="string"
+ Name="InstallDir"
+ Value="[INSTALLDIR]" />
+ </Component>
+
+ <!-- Add $/bin to PATH -->
+ <Component Id="PathEnvPerMachine" Guid="*">
+ <Condition>ALLUSERS=1 OR (ALLUSERS=2 AND Privileged)</Condition>
+ <RegistryValue Root="HKMU" Key="$(var.BaseRegKey)" Name="PathEnvPerMachine" Type="string" Value="1" KeyPath="yes" />
+ <!-- [INSTALLDIR] contains trailing backslash -->
+ <Environment Id="PathPerMachine" Name="PATH" Value="[INSTALLDIR]bin" Permanent="no" Part="last" Action="set" System="yes" />
+ </Component>
+ <Component Id="PathEnvPerUser" Guid="*">
+ <Condition>ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged))</Condition>
+ <RegistryValue Root="HKMU" Key="$(var.BaseRegKey)" Name="PathEnvPerUser" Type="string" Value="1" KeyPath="yes" />
+ <Environment Id="PathPerUser" Name="PATH" Value="[INSTALLDIR]bin" Permanent="no" Part="last" Action="set" System="no" />
+ </Component>
+
+ <!-- Start Menu shortcuts -->
+ <Directory Id="ProgramMenuFolder">
+ <Directory Id="ApplicationProgramsFolder" Name="Rust">
+ <Component Id="RustShellShortcut" Guid="*">
+ <Shortcut Id="RustShell"
+ Name="$(var.ProductName) Shell"
+ Description="Opens Command Prompt with Rust tools directory added to the PATH"
+ Target="[SHORTCUTTARGET]"
+ Arguments="/K path [INSTALLDIR]bin;%PATH%"
+ WorkingDirectory="SHORTCUTWKDIR">
+ <Icon Id="rust2.ico" SourceFile="rust-logo.ico" />
+ </Shortcut>
+ <RegistryValue Root="HKMU" Key="$(var.BaseRegKey)" Name="RustShell" Type="integer" Value="1" KeyPath="yes" />
+ <RemoveFolder Id="ApplicationProgramsFolder1" On="uninstall" />
+ </Component>
+ <Component Id="DocIndexShortcut" Guid="*">
+ <Shortcut Id="RustDocs"
+ Name="$(var.ProductName) Documentation"
+ Description="Opens Rust HTML documentation in the default browser"
+ Target="[INSTALLDIR]share\doc\rust\html\index.html" />
+ <RegistryValue Root="HKMU" Key="$(var.BaseRegKey)" Name="RustDocs" Type="integer" Value="1" KeyPath="yes" />
+ <RemoveFolder Id="ApplicationProgramsFolder2" On="uninstall" />
+ </Component>
+ </Directory>
+ </Directory>
+
+ </Directory>
+
+ <Feature Id="Rustc"
+ Title="Rust compiler and standard crates"
+ Display="1"
+ Level="1"
+ Absent="disallow"
+ AllowAdvertise="no">
+ <ComponentGroupRef Id="RustcGroup" />
+ <ComponentRef Id="RustShellShortcut" />
+ <ComponentRef Id="InstallDir" />
+ </Feature>
+ <Feature Id="Std"
+ Title="The Rust standard library"
+ Display="2"
+ Level="1"
+ AllowAdvertise="no">
+ <ComponentGroupRef Id="StdGroup" />
+ </Feature>
+ <Feature Id="Cargo"
+ Title="Cargo, the Rust package manager"
+ Display="3"
+ Level="1"
+ AllowAdvertise="no">
+ <ComponentGroupRef Id="CargoGroup" />
+ </Feature>
+ <?if $(env.CFG_MINGW)="1" ?>
+ <Feature Id="Gcc"
+ Title="Linker and platform libraries"
+ Description="If you choose to not install this component, you will require an external MinGW installation in order to create executables and libraries."
+ Display="4"
+ Level="1"
+ AllowAdvertise="no">
+ <ComponentGroupRef Id="GccGroup" />
+ </Feature>
+ <?endif?>
+ <Feature Id="Docs"
+ Title="HTML documentation"
+ Display="5"
+ Level="1"
+ AllowAdvertise="no">
+ <ComponentGroupRef Id="DocsGroup" />
+ <ComponentRef Id="DocIndexShortcut" />
+ </Feature>
+ <Feature Id="Path"
+ Title="Add to PATH"
+ Description="Add Rust to PATH environment variable"
+ Display="6"
+ Level="1"
+ AllowAdvertise="no">
+ <ComponentRef Id="PathEnvPerMachine" />
+ <ComponentRef Id="PathEnvPerUser" />
+ </Feature>
+ <!-- tool-rls-start -->
+ <Feature Id="RLS"
+ Title="RLS, the Rust Language Server"
+ Display="7"
+ Level="2"
+ AllowAdvertise="no">
+ <ComponentGroupRef Id="RlsGroup" />
+ <ComponentGroupRef Id="AnalysisGroup" />
+ </Feature>
+ <!-- tool-rls-end -->
+
+ <UIRef Id="RustUI" />
+ </Product>
+</Wix>
diff --git a/src/etc/installer/msi/rustwelcomedlg.wxs b/src/etc/installer/msi/rustwelcomedlg.wxs
new file mode 100644
index 000000000..0ee5415ff
--- /dev/null
+++ b/src/etc/installer/msi/rustwelcomedlg.wxs
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <UI>
+ <Dialog Id="RustWelcomeDlg" Width="370" Height="270" Title="!(loc.AdvancedWelcomeEulaDlg_Title)">
+ <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.AdvancedWelcomeEulaDlgBannerBitmap)" />
+ <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
+ <Control Id="Title" Type="Text" X="20" Y="10" Width="300" Height="24" Transparent="yes" NoPrefix="yes" Text="!(loc.AdvancedWelcomeEulaDlgTitle)" />
+ <Control Id="DescriptionPerMachine" Type="Text" X="20" Y="182" Width="330" Height="31" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="!(loc.AdvancedWelcomeEulaDlgDescriptionPerMachine)">
+ <Condition Action="show">NOT UPGRADE_DETECTED AND ALLUSERS</Condition>
+ </Control>
+ <Control Id="DescriptionPerUser" Type="Text" X="20" Y="182" Width="330" Height="31" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="!(loc.AdvancedWelcomeEulaDlgDescriptionPerUser)">
+ <Condition Action="show">NOT UPGRADE_DETECTED AND NOT ALLUSERS</Condition>
+ </Control>
+ <Control Id="DescriptionUpgrade" Type="Text" X="20" Y="182" Width="330" Height="31" Transparent="yes" NoPrefix="yes" Hidden="yes"
+ Text="Click Install to upgrade the existing version of [ProductName]. Click Advanced to change installation options.">
+ <Condition Action="show">UPGRADE_DETECTED</Condition>
+ </Control>
+ <Control Id="TargetPath" Type="Text" X="20" Y="212" Width="330" Height="31" Transparent="yes" NoPrefix="yes" Hidden="no"
+ Text="Install Directory: [INSTALLDIR]">
+ </Control>
+ <Control Id="Print" Type="PushButton" X="88" Y="243" Width="56" Height="17" Text="!(loc.WixUIPrint)">
+ <Publish Event="DoAction" Value="WixUIPrintEula">1</Publish>
+ </Control>
+ <Control Id="Advanced" Type="PushButton" X="156" Y="243" Width="56" Height="17" Text="!(loc.AdvancedWelcomeEulaDlgAdvanced)" />
+ <Control Id="Install" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Default="yes" Text="!(loc.AdvancedWelcomeEulaDlgInstall)" Hidden="yes">
+ <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1</Publish>
+ <Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
+ <Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
+ <Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
+ <Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
+ <Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
+ <Condition Action="show">ALLUSERS</Condition>
+ </Control>
+ <Control Id="InstallNoShield" Type="PushButton" ElevationShield="no" X="212" Y="243" Width="80" Height="17" Default="yes" Text="!(loc.AdvancedWelcomeEulaDlgInstall)" Hidden="yes">
+ <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1</Publish>
+ <Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
+ <Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
+ <Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
+ <Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
+ <Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
+ <Condition Action="show">NOT ALLUSERS</Condition>
+ </Control>
+ <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>
+ </Control>
+ <Control Id="LicenseText" Type="ScrollableText" X="20" Y="55" Width="330" Height="121" Sunken="yes" TabSkip="no">
+ <Text SourceFile="!(wix.WixUILicenseRtf)" />
+ </Control>
+ </Dialog>
+ </UI>
+
+ <InstallUISequence>
+ <Show Dialog="RustWelcomeDlg" Before="ProgressDlg">NOT Installed</Show>
+ </InstallUISequence>
+ </Fragment>
+</Wix>
diff --git a/src/etc/installer/msi/squash-components.xsl b/src/etc/installer/msi/squash-components.xsl
new file mode 100644
index 000000000..17b4e0388
--- /dev/null
+++ b/src/etc/installer/msi/squash-components.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
+ <!-- Copy all attributes and elements to the output. -->
+ <xsl:template match="@*|*">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|*"/>
+ </xsl:copy>
+ </xsl:template>
+ <xsl:output method="xml" indent="yes" />
+
+ <!-- Move all files in directory into first component in that directory. -->
+ <xsl:template match="wix:Component[1]">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|*"/>
+ <xsl:for-each select="../wix:Component[preceding-sibling::*]/wix:File">
+ <xsl:copy>
+ <!-- Component can only have one KeyPath -->
+ <xsl:apply-templates select="@*[not(name()='KeyPath')]|*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ </xsl:copy>
+ </xsl:template>
+
+ <!-- Now the rest of components are empty, find them. -->
+ <xsl:key name="empty-cmp-ids" match="wix:Component[preceding-sibling::*]" use="@Id" />
+
+ <!-- And remove. -->
+ <xsl:template match="wix:Component[preceding-sibling::*]" />
+
+ <!-- Also remove componentsrefs referencing empty components. -->
+ <xsl:template match="wix:ComponentRef[key('empty-cmp-ids', @Id)]" />
+</xsl:stylesheet>
diff --git a/src/etc/installer/msi/ui.wxs b/src/etc/installer/msi/ui.wxs
new file mode 100644
index 000000000..3e2db6051
--- /dev/null
+++ b/src/etc/installer/msi/ui.wxs
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Based on WixUI_Advanced
+-->
+
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <WixVariable Id="WixUISupportPerUser" Value="1" Overridable="yes" />
+ <WixVariable Id="WixUISupportPerMachine" Value="1" Overridable="yes" />
+ <WixVariable Id="WixUILicenseRtf" Value="LICENSE.rtf" />
+ <WixVariable Id="WixUIDialogBmp" Value="dialogbg.bmp" />
+ <WixVariable Id="WixUIBannerBmp" Value="banner.bmp" />
+
+ <UI Id="RustUI">
+ <TextStyle Id="WixUI_Font_Normal" FaceName="!(loc.Advanced_Font_FaceName)" Size="!(loc.Advanced_Font_Normal_Size)" />
+ <TextStyle Id="WixUI_Font_Bigger" FaceName="!(loc.Advanced_Font_FaceName)" Size="!(loc.Advanced_Font_Bigger_Size)" />
+ <TextStyle Id="WixUI_Font_Title" FaceName="!(loc.Advanced_Font_FaceName)" Size="!(loc.Advanced_Font_Title_Size)" Bold="yes" />
+ <TextStyle Id="WixUI_Font_Emphasized" FaceName="!(loc.Advanced_Font_FaceName)" Size="!(loc.Advanced_Font_Emphasized_Size)" Bold="yes" />
+
+ <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
+ <Property Id="WixUI_Mode" Value="Advanced" />
+
+ <DialogRef Id="BrowseDlg" />
+ <DialogRef Id="DiskCostDlg" />
+ <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"/>
+
+ <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
+
+ <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="1">1</Publish>
+ <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="2"><![CDATA[WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
+
+ <Publish Dialog="RustWelcomeDlg" Control="Advanced" Event="NewDialog" Value="InstallScopeDlg" Order="1" />
+
+ <Publish Dialog="InstallScopeDlg" Control="Back" Event="NewDialog" Value="RustWelcomeDlg">1</Publish>
+ <!-- override default WixAppFolder of WixPerMachineFolder as standard user won't be shown the radio group to set WixAppFolder -->
+ <Publish Dialog="InstallScopeDlg" Control="Next" Property="WixAppFolder" Value="WixPerUserFolder" Order="1">!(wix.WixUISupportPerUser) AND NOT Privileged</Publish>
+ <Publish Dialog="InstallScopeDlg" Control="Next" Property="ALLUSERS" Value="{}" Order="2">WixAppFolder = "WixPerUserFolder"</Publish>
+ <Publish Dialog="InstallScopeDlg" Control="Next" Property="ALLUSERS" Value="1" Order="3">WixAppFolder = "WixPerMachineFolder"</Publish>
+ <Publish Dialog="InstallScopeDlg" Control="Next" Property="INSTALLDIR" Value="[INSTALLDIR_USER]" Order="4">WixAppFolder = "WixPerUserFolder"</Publish>
+ <Publish Dialog="InstallScopeDlg" Control="Next" Property="INSTALLDIR" Value="[INSTALLDIR_MACHINE]" Order="5">WixAppFolder = "WixPerMachineFolder"</Publish>
+ <Publish Dialog="InstallScopeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="6">1</Publish>
+
+ <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="InstallScopeDlg" />
+ <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
+ <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
+ <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
+ <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
+ <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
+ <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
+
+ <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg">NOT Installed AND WixAppFolder = "WixPerUserFolder"</Publish>
+ <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg">NOT Installed AND WixAppFolder = "WixPerMachineFolder"</Publish>
+ <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">Installed</Publish>
+
+ <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
+
+ <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="FeaturesDlg">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="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="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
+ </UI>
+
+ <InstallUISequence>
+ <Show Dialog="WelcomeDlg" Before="RustWelcomeDlg" >Installed AND PATCH</Show>
+ </InstallUISequence>
+
+ <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
+ <UIRef Id="WixUI_Common" />
+ </Fragment>
+</Wix>