moonlight-qt/wix/MoonlightSetup/Bundle.wxs

103 lines
4.6 KiB
Text
Raw Normal View History

2018-07-25 09:53:51 +00:00
<?xml version="1.0" encoding="UTF-8"?>
2018-07-26 02:16:06 +00:00
<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">
2018-07-26 02:16:06 +00:00
<Bundle Name="Moonlight Game Streaming Client"
2018-07-26 02:33:09 +00:00
Version="!(bind.PackageVersion.Moonlight)"
Manufacturer="Moonlight Game Streaming Project"
2018-07-26 02:16:06 +00:00
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>
<!-- https://stackoverflow.com/questions/46637094/how-can-i-find-the-upgrade-code-for-an-installed-msi-file -->
<?if $(env.ARCH) ~= x86 ?>
<util:ProductSearch Id="Find_VCRedist_x86"
UpgradeCode="{C78B8E51-0C65-377E-85D1-282F689FE505}"
Result="state"
Variable="VCRedist_Present" />
<?elseif $(env.ARCH) ~= x64 ?>
<util:ProductSearch Id="Find_VCRedist_x64"
UpgradeCode="{9B0BAA88-E15F-3A1F-ACC0-B206E9DDF71C}"
Result="state"
Variable="VCRedist_Present" />
<?else ?>
<?error Bad ARCH value ?>
<?endif ?>
<?if $(env.ARCH) ~= x64 ?>
2018-07-28 20:59:27 +00:00
<bal:Condition Message="This Moonlight installer requires a 64-bit (x64) OS. Please download the 32-bit (x86) installer.">
VersionNT64
</bal:Condition>
2018-07-28 20:59:27 +00:00
<?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 ?>
2018-07-26 02:16:06 +00:00
<!-- 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" />
2018-07-25 09:53:51 +00:00
<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" />
2018-07-25 09:53:51 +00:00
</BootstrapperApplicationRef>
2018-07-26 02:16:06 +00:00
2018-07-25 09:53:51 +00:00
<Chain>
<ExePackage Cache="no"
PerMachine="yes"
Permanent="yes"
InstallCondition="VCRedist_Present = 2"
Vital="yes"
Compressed="yes"
SourceFile="$(env.VCREDIST_INSTALLER)"
InstallCommand="/install /quiet /norestart">
<!-- Newer version installed is fine -->
<ExitCode Value="1638" Behavior="success" />
</ExePackage>
2018-07-26 02:33:09 +00:00
<MsiPackage Id="Moonlight" SourceFile="$(var.Moonlight.TargetPath)" Vital="yes">
2018-07-26 02:16:06 +00:00
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]" />
<MsiProperty Name="REINSTALLMODE" Value="[REINSTALLMODE]" />
<MsiProperty Name="ADDDESKTOPSHORTCUT" Value="[AddDesktopShortcutCheckbox]" />
2018-07-26 02:16:06 +00:00
</MsiPackage>
2018-07-25 09:53:51 +00:00
</Chain>
2018-07-26 02:16:06 +00:00
2018-07-25 09:53:51 +00:00
</Bundle>
</Wix>