moonlight-qt/wix/MoonlightSetup/Bundle.wxs
2020-05-04 17:51:57 -07:00

86 lines
3.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="Moonlight Game Streaming Client"
Version="!(bind.PackageVersion.Moonlight)"
Manufacturer="Moonlight Game Streaming Project"
UpgradeCode="466fa35d-4be4-40ef-9ce5-afadc3b63bc5"
HelpUrl="https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide"
UpdateUrl="https://github.com/moonlight-stream/moonlight-qt/releases"
DisableModify="yes"
IconSourceFile="..\..\app\moonlight.ico">
<bal:Condition Message="Moonlight requires Windows 7 or later.">
<![CDATA[VersionNT >= v6.1]]>
</bal:Condition>
<?if $(env.ARCH) ~= x64 ?>
<bal:Condition Message="This Moonlight installer requires a 64-bit (x64) OS. Please download the 32-bit (x86) installer.">
VersionNT64
</bal:Condition>
<?elseif $(env.ARCH) ~= x86 ?>
<bal:Condition Message="This Moonlight installer requires a 32-bit (x86) OS. Please download the 64-bit (x64) installer.">
NOT VersionNT64
</bal:Condition>
<?endif ?>
<!-- HACK: Force replacement of lower versioned files too. This is only safe because we don't install any shared files -->
<Variable Name="REINSTALLMODE" bal:Overridable="yes" Value="dmus" />
<?if $(env.ARCH) ~= x64 ?>
<Variable Name="InstallFolder" Type="string" Value="[ProgramFiles64Folder]Moonlight Game Streaming" />
<?elseif $(env.ARCH) ~= x86 ?>
<Variable Name="InstallFolder" Type="string" Value="[ProgramFilesFolder]Moonlight Game Streaming" />
<?endif ?>
<!-- Define "Add desktop shortcut" -checkbox's state by defining a variable
which has same name as the checkbox has. Value 1 means that checkbox
is checked, 0 means that is unchecked-->
<!-- Set checkbox's state as checked by default -->
<Variable Name="AddDesktopShortcutCheckbox" Type="numeric" Value="1" />
<!-- Get checkbox's state from registry if present. The registry value
"DesktopShortcutInstallState" is set in Product.wxs. -->
<util:RegistrySearch Variable="HasDesktopShortcutInstallStateRegKey"
Root="HKCU"
Key="Software\Moonlight Game Streaming Project"
Value="DesktopShortcutInstallState"
Result="exists" />
<util:RegistrySearch Variable="AddDesktopShortcutCheckbox"
Root="HKCU"
Key="Software\Moonlight Game Streaming Project"
Value="DesktopShortcutInstallState"
Condition="HasDesktopShortcutInstallStateRegKey" />
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
ShowVersion="yes"
LicenseFile="license.rtf"
LogoFile="..\..\app\moonlight_wix.png"
ShowFilesInUse="yes"
LaunchTarget="[InstallFolder]\Moonlight.exe"
ThemeFile="RtfTheme.xml" />
</BootstrapperApplicationRef>
<Chain>
<ExePackage Cache="no"
PerMachine="yes"
Permanent="yes"
Vital="yes"
Compressed="yes"
SourceFile="$(env.VCToolsRedistDir)vcredist_$(env.ARCH).exe"
InstallCommand="/install /quiet /norestart">
<!-- Newer version installed is fine -->
<ExitCode Value="1638" Behavior="success" />
</ExePackage>
<MsiPackage Id="Moonlight" SourceFile="$(var.Moonlight.TargetPath)" Vital="yes">
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]" />
<MsiProperty Name="REINSTALLMODE" Value="[REINSTALLMODE]" />
<MsiProperty Name="ADDDESKTOPSHORTCUT" Value="[AddDesktopShortcutCheckbox]" />
</MsiPackage>
</Chain>
</Bundle>
</Wix>