mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-14 21:32:27 +00:00
102 lines
4.6 KiB
XML
102 lines
4.6 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 Team"
|
|
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 ?>
|
|
<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"
|
|
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>
|
|
<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>
|