moonlight-qt/wix/Moonlight/Product.wxs

92 lines
4 KiB
Text
Raw Normal View History

2018-07-25 09:53:51 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<?define ShortName = "Moonlight" ?>
<?define FullName = "Moonlight Game Streaming Client" ?>
<?define ShortcutName = "$(var.ShortName)" ?>
<?define ShortcutDesc = "Stream games from a NVIDIA GameStream-compatible PC" ?>
<?define InstallFolder = "Moonlight Game Streaming" ?>
2018-07-26 02:16:06 +00:00
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
2018-08-18 22:43:24 +00:00
xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
2018-07-26 02:16:06 +00:00
2018-07-25 09:53:51 +00:00
<Product Id="*"
Name="$(var.FullName)"
2018-07-25 09:53:51 +00:00
Language="1033"
Version="!(bind.fileVersion.MoonlightExe)"
Manufacturer="Moonlight Game Streaming Team"
UpgradeCode="5c09f94e-f809-4c6a-9b7b-597c99f041fe">
2018-07-26 02:16:06 +00:00
<Package InstallerVersion="500" Compressed="yes" InstallScope="perMachine" />
2018-07-25 09:53:51 +00:00
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." Schedule="afterInstallInitialize" />
2018-08-16 03:29:59 +00:00
<MediaTemplate CompressionLevel="high" EmbedCab="yes" />
2018-07-25 09:53:51 +00:00
2018-07-26 02:16:06 +00:00
<?if $(var.Platform) = x64 ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?else ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?endif ?>
2018-07-25 09:53:51 +00:00
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="DesktopFolder" />
2018-07-25 09:53:51 +00:00
<Directory Id="$(var.PlatformProgramFilesFolder)">
<Directory Id="INSTALLFOLDER" Name="$(var.InstallFolder)" />
2018-07-26 02:16:06 +00:00
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.InstallFolder)" />
2018-07-25 09:53:51 +00:00
</Directory>
</Directory>
<Property Id="APPDATAFOLDER">%LOCALAPPDATA%\Moonlight Game Streaming Project</Property>
2018-08-18 22:43:24 +00:00
2018-07-26 02:16:06 +00:00
<!-- There's no way to delete a registry key on uninstall but not major upgrade, so
we have to roll our own deletion via custom action -->
<CustomAction Id="DeleteRegistryKey"
Directory="$(var.PlatformProgramFilesFolder)"
ExeCommand="reg.exe delete &quot;HKCU\Software\Moonlight Game Streaming Project&quot; /f"
Execute="deferred"
Return="ignore"
Impersonate="yes"/>
<InstallExecuteSequence>
<Custom Action="DeleteRegistryKey" Before="InstallFinalize">Installed AND REMOVE~="ALL" AND NOT UPGRADINGPRODUCTCODE</Custom>
</InstallExecuteSequence>
2018-07-25 09:53:51 +00:00
<Component Id="MoonlightShortcuts" Guid="*" Directory="INSTALLFOLDER">
<Shortcut Id="StartMenuShortcut"
Name="$(var.ShortcutName)"
Description="$(var.ShortcutDesc)"
Target="[#MoonlightExe]"
Directory="ApplicationProgramsFolder"
WorkingDirectory="INSTALLFOLDER" />
<Shortcut Id="DesktopShortcut"
Name="$(var.ShortcutName)"
Description="$(var.ShortcutDesc)"
Target="[#MoonlightExe]"
Directory="DesktopFolder"
WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="CleanupStartMenuShortcut" Directory="ApplicationProgramsFolder" On="uninstall" />
<RemoveFolder Id="CleanupDesktopShortcut" Directory="DesktopFolder" On="uninstall" />
2018-08-18 22:43:24 +00:00
<util:RemoveFolderEx Id="CleanupAppDataFolder" On="uninstall" Property="APPDATAFOLDER" />
<RegistryValue Root="HKCU" Key="Software\Moonlight Game Streaming Project" Name="Installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
2018-07-26 02:16:06 +00:00
<DirectoryRef Id="INSTALLFOLDER">
<Component Id="Moonlight" Guid="*">
<File Id="MoonlightExe" KeyPath="yes" Checksum="yes" Source="$(var.SourceDir)\Moonlight.exe">
<fire:FirewallException Id="MoonlightFirewallException"
Scope="any"
Name="$(var.FullName)" />
2018-07-26 02:16:06 +00:00
</File>
</Component>
</DirectoryRef>
<Feature Id="ProductFeature" Title="Moonlight" Level="1" ConfigurableDirectory="INSTALLFOLDER">
<ComponentRef Id="Moonlight" />
<ComponentRef Id="MoonlightShortcuts" />
2018-07-26 02:16:06 +00:00
<ComponentGroupRef Id="MoonlightDependencies" />
</Feature>
</Product>
2018-07-25 09:53:51 +00:00
</Wix>