mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
a377f3477f
Both Steam and Uplay library logic would error when the library was installed, but didn't have any installed games. Thanks to @joeymanson23 for the report. Fixes #4. Adds a LOT more logging to the Steam and Uplay libraries to allow for remote troubleshooting via the log file, especially if the logging settings are set to TRACE. Also fixed the long standing issue for being able to install two copies of DisplayMagician of the same version. Now the installer will prevent that from happening!
186 lines
12 KiB
XML
186 lines
12 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--Code from https://weblogs.sqlteam.com/mladenp/2010/02/11/wix-3-tutorial-solutionproject-structure-and-dev-resources/ -->
|
|
<!-- Add xmlns:util namespace definition to be able to use stuff from WixUtilExtension dll-->
|
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
|
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
|
|
<!-- This is how we include wxi files -->
|
|
<?include $(sys.CURRENTDIR)Includes\DisplayMagicianVariables.wxi ?>
|
|
<!--
|
|
Id="*" is to enable upgrading. * means that the product ID will be autogenerated on each build.
|
|
Name is made of localized product name and version number.
|
|
-->
|
|
<Product Id="*" Name="!(loc.ProductName)" Language="!(loc.LANG)" Version="$(var.VersionNumber)" Manufacturer="!(loc.ManufacturerName)" UpgradeCode="$(var.UpgradeCode)">
|
|
<!-- Define the minimum supported installer version (3.0) and that the install should be done for the whole machine not just the current user -->
|
|
<Package InstallerVersion="314" Compressed="yes" InstallPrivileges="elevated" InstallScope="perMachine" Platform="x64"/>
|
|
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
|
|
<!-- Upgrade settings. This will be explained in more detail in a future post -->
|
|
<Upgrade Id="$(var.UpgradeCode)">
|
|
<UpgradeVersion OnlyDetect="yes" Minimum="$(var.VersionNumber)" IncludeMinimum="no" Property="NEWERFOUND" />
|
|
<UpgradeVersion OnlyDetect="yes" Minimum="$(var.VersionNumber)" Maximum="$(var.VersionNumber)" IncludeMinimum="yes" IncludeMaximum="yes" Property="SELFFOUND" />
|
|
<UpgradeVersion Minimum="0.0.0.0" IncludeMinimum="no" Maximum="$(var.VersionNumber)" IncludeMaximum="no" Property="OLDER_VERSION_FOUND" IgnoreRemoveFailure="yes" />
|
|
</Upgrade>
|
|
|
|
<CustomAction Id='AlreadyUpdated' Error='!(loc.ProductName) has already been updated to $(var.VersionNumber) or newer. If you want to reinstall this version then uninstall !(loc.ProductName) first.' />
|
|
<CustomAction Id='NoDowngrade' Error='A later version of [ProductName] is already installed.' />
|
|
|
|
<!--<Condition Message="A newer version of [ProductName] is already installed.">
|
|
NEWER_FOUND
|
|
</Condition>
|
|
<Condition Message="You are trying to upgrade to the same version of [ProductName].">
|
|
SELF_FOUND
|
|
</Condition>-->
|
|
<!--<MajorUpgrade IgnoreRemoveFailure="yes" AllowDowngrades="no" AllowSameVersionUpgrades="no" DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" />-->
|
|
<!-- Reference the global WIXNETFX4RELEASEINSTALLED property so that will automatically pull in the .Net 4.8 variables (WiX 3.14 and higher only supported) -->
|
|
<!--<PropertyRef Id="WIX_IS_NETFRAMEWORK_48_OR_LATER_INSTALLED"/>
|
|
<Condition Message="!(loc.DotNetFrameworkNeeded)">
|
|
<![CDATA[Installed OR WIX_IS_NETFRAMEWORK_48_OR_LATER_INSTALLED]]>
|
|
</Condition>-->
|
|
<!-- Load the -->
|
|
<PropertyRef Id="WIXNETFX4RELEASEINSTALLED"/>
|
|
<Condition Message="!(loc.DotNetFrameworkNeeded)">
|
|
<![CDATA[Installed OR (WIXNETFX4RELEASEINSTALLED >= "#528040")]]>
|
|
</Condition>
|
|
|
|
<Property Id="MSIRESTARTMANAGERCONTROL" Value="0" />
|
|
<Property Id="MSIRMSHUTDOWN" Value="2" />
|
|
<Property Id="MSIDISABLERMRESTART" Value="0" />
|
|
|
|
<!--
|
|
Startup conditions that checks if .Net Framework 4.8 is installed or if
|
|
we're running Windows 8.1 or higher as the OS.
|
|
If not the installation is aborted.
|
|
By doing the (Installed OR ...) property means that this condition will only
|
|
be evaluated if the app is being installed and not on uninstall or changing
|
|
-->
|
|
<Condition Message="!(loc.AppNotSupported)">
|
|
<![CDATA[Installed OR (VersionNT64 >= 603)]]>
|
|
</Condition>
|
|
<!-- This will ask the user to close the DisplayMagician app if it's running while upgrading -->
|
|
<util:CloseApplication Id="CloseDisplayMagician" CloseMessage="no" Description="!(loc.MustCloseDisplayMagician)"
|
|
ElevatedCloseMessage="no" RebootPrompt="no" Target="$(var.ExeProcessName)" />
|
|
<!-- Use the built in WixUI_InstallDir GUI -->
|
|
<UIRef Id="WixUI_InstallDir" />
|
|
|
|
<UI>
|
|
<!-- Add in some text styles to make the text white -->
|
|
<TextStyle Id="White_Normal" FaceName="Tahoma" Size="8" Red="255" Green="255" Blue="255" />
|
|
<TextStyle Id="White_Bigger" FaceName="Tahoma" Size="12" Red="255" Green="255" Blue="255" />
|
|
<TextStyle Id="White_Title" FaceName="Tahoma" Size="9" Bold="yes" Red="255" Green="255" Blue="255" />
|
|
|
|
<!-- These dialog references are needed for CloseApplication above to work correctly -->
|
|
<DialogRef Id="FilesInUse" />
|
|
<DialogRef Id="MsiRMFilesInUse" />
|
|
|
|
<!-- Here we'll add the GUI logic for installation and updating in a future post-->
|
|
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDialogOverwritten">1</Publish>
|
|
<Publish Dialog="LicenseAgreementDialogOverwritten" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
|
|
<!--<Publish Dialog="LicenseAgreementDialogOverwritten" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAcceptedOverwritten = "1" AND NOT OLDER_VERSION_FOUND</Publish>-->
|
|
<Publish Dialog="LicenseAgreementDialogOverwritten" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAcceptedOverwritten = "1"</Publish>
|
|
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDialogOverwritten">1</Publish>
|
|
<!--<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>-->
|
|
</UI>
|
|
<!-- Set the icon to show next to the program name in Add/Remove programs -->
|
|
<Icon Id="DisplayMagicianIcon.ico" SourceFile="$(var.ResourcesDir)\DisplayMagician.ico" />
|
|
<Property Id="ARPPRODUCTICON" Value="DisplayMagicianIcon.ico" />
|
|
<!-- Installer UI custom pictures. File names are made up. Add path to your pics -->
|
|
<WixVariable Id="WixUIBannerBmp" Value="Resources\WixUIBannerBmpDark.png" />
|
|
<WixVariable Id="WixUIDialogBmp" Value="Resources\WixUIDialogBmp.png" />
|
|
|
|
<!-- the default directory structure -->
|
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
|
<!-- Create a 64-bit Programs Folder for the Application-->
|
|
<Directory Id="ProgramFiles64Folder">
|
|
<Directory Id="APPLICATIONROOTDIRECTORY" Name="!(loc.ProductName)" />
|
|
</Directory>
|
|
<!-- Create a Start Menu Folder for the Application-->
|
|
<Directory Id="ProgramMenuFolder">
|
|
<Directory Id="ApplicationProgramsFolder" Name="!(loc.ProductName)"/>
|
|
</Directory>
|
|
<Component Id="HKLMRegistryEntries" Guid="4AB42CB7-3E2A-465B-9BE2-DDDE7D34797B">
|
|
<RegistryValue Root="HKLM" Key="Software\DisplayMagician" Type="string" Name="InstallDir" Value="[APPLICATIONROOTDIRECTORY]" KeyPath="yes"/>
|
|
</Component>
|
|
<Component Id="HKCURegistryEntries" Guid="481CA633-0BC0-49CD-B673-51BE9560B00F">
|
|
<RegistryValue Root="HKCU" Key="Software\DisplayMagician" Type="string" Name="AppDataDir" Value="[LocalAppDataFolder]" KeyPath="yes"/>
|
|
</Component>
|
|
</Directory>
|
|
|
|
<!-- Now we create an Application shortcut -->
|
|
<DirectoryRef Id="ApplicationProgramsFolder">
|
|
<Component Id="ApplicationShortcut" Guid="6C7BFB9E-8549-4E34-BE44-E1A718146755" >
|
|
<Shortcut Id="ApplicationStartMenuShortcut"
|
|
Name="!(loc.ProductName)"
|
|
Description="!(loc.ProductDescription)"
|
|
Target="[APPLICATIONROOTDIRECTORY]$(var.DisplayMagician.TargetFileName)"
|
|
WorkingDirectory="APPLICATIONROOTDIRECTORY"
|
|
Icon="DisplayMagicianIcon.ico">
|
|
<!--AUMID-->
|
|
<ShortcutProperty Key="System.AppUserModel.ID" Value="LittleBitBig.DisplayMagician"/>
|
|
<!--COM CLSID-->
|
|
<ShortcutProperty Key="System.AppUserModel.ToastActivatorCLSID" Value="{56F14154-6339-4B94-8B82-80F78D5BCEAF}"/>
|
|
</Shortcut>
|
|
<RemoveFolder Id="CleanUpApplicationShortCut" Directory="ApplicationProgramsFolder" On="uninstall"/>
|
|
<RegistryValue Root="HKCU" Key="Software\DisplayMagician" Name="DisplayMagicianInstalled" Type="integer" Value="1" KeyPath="yes"/>
|
|
</Component>
|
|
<Component Id="LogReporterShortcut" Guid="1C24F22F-8796-4CF0-9E84-7D06B6662239">
|
|
<Shortcut Id="LogReporterStartMenuShortcut"
|
|
Name="!(loc.LogReporterName)"
|
|
Description="!(loc.LogReporterDescription)"
|
|
Target="[APPLICATIONROOTDIRECTORY]$(var.DisplayMagicianLogReporter.TargetFileName)"
|
|
WorkingDirectory="APPLICATIONROOTDIRECTORY"
|
|
Icon="DisplayMagicianIcon.ico" />
|
|
<RemoveFolder Id="CleanUpLogReporterShortCut" Directory="ApplicationProgramsFolder" On="uninstall"/>
|
|
<RegistryValue Root="HKCU" Key="Software\DisplayMagician" Name="LogReporterInstalled" Type="integer" Value="1" KeyPath="yes"/>
|
|
</Component>
|
|
</DirectoryRef>
|
|
|
|
|
|
<!-- Set the default install location to the value of APPLICATIONROOTDIRECTORY (usually c:\Program Files\YourProductName) -->
|
|
<Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONROOTDIRECTORY" />
|
|
|
|
<!-- Set the last page to show a Launch DisplayMagician checkbox -->
|
|
<!--<Property Id="WixShellExecTarget" Value="[APPLICATIONROOTDIRECTORY]$(var.DisplayMagician.TargetFileName)" />
|
|
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch !(loc.ProductName)" />
|
|
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />-->
|
|
|
|
<!-- Preapre custom actions to register and unregisterthe ShellExtension DLL -->
|
|
<CustomAction Id="InstallShell" FileKey="ServerRegistrationManager.exe" ExeCommand='install "[APPLICATIONROOTDIRECTORY]\DisplayMagicianShellExtension.dll" -codebase' Execute="deferred" Return="check" Impersonate="no" />
|
|
<CustomAction Id="UninstallShell" FileKey="ServerRegistrationManager.exe" ExeCommand='uninstall "[APPLICATIONROOTDIRECTORY]\DisplayMagicianShellExtension.dll"' Execute="deferred" Return="check" Impersonate="no" />
|
|
|
|
<!-- Plumb the registering and unregistering of the ShellExtension DLL into the instllation sequence -->
|
|
<InstallExecuteSequence>
|
|
<RemoveExistingProducts After="InstallInitialize"/>
|
|
<Custom Action="InstallShell" After="InstallFiles">NOT Installed</Custom>
|
|
<Custom Action="UninstallShell" Before="RemoveFiles">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
|
|
<Custom Action='AlreadyUpdated' After='FindRelatedProducts'>SELFFOUND</Custom>
|
|
<Custom Action='NoDowngrade' After='FindRelatedProducts'>NEWERFOUND</Custom>
|
|
</InstallExecuteSequence>
|
|
|
|
<!-- Set the components defined in our fragment files that will be used for our feature -->
|
|
<Feature Id="DisplayMagicianFeature" Title="!(loc.ProductName)" Level="1">
|
|
<ComponentGroupRef Id="DisplayMagicianFiles" />
|
|
<ComponentRef Id="ApplicationShortcut" />
|
|
<ComponentRef Id="LogReporterShortcut" />
|
|
<ComponentRef Id="HKLMRegistryEntries" />
|
|
<ComponentRef Id="HKCURegistryEntries" />
|
|
|
|
<!-- Add in the 3 ShellExtension files we need to make the COM registration work -->
|
|
<Component Guid="*" Directory="APPLICATIONROOTDIRECTORY">
|
|
<File Id="DisplayMagicianShellExtension.dll" KeyPath="yes" Source="$(var.DisplayMagicianShellExtension.TargetDir)\DisplayMagicianShellExtension.dll" />
|
|
</Component>
|
|
<Component Guid="*" Directory="APPLICATIONROOTDIRECTORY">
|
|
<File Id="ServerRegistrationManager.exe" Source="$(var.DisplayMagicianShellExtension.TargetDir)\ServerRegistrationManager.exe" KeyPath="yes" />
|
|
</Component>
|
|
<Component Guid="*" Directory="APPLICATIONROOTDIRECTORY">
|
|
<File Id="SharpShell.dll" Source="$(var.DisplayMagicianShellExtension.TargetDir)\SharpShell.dll" KeyPath="yes" />
|
|
</Component>
|
|
|
|
<!-- Add in the LogReporter files we need -->
|
|
<Component Guid="*" Directory="APPLICATIONROOTDIRECTORY">
|
|
<File Id="LogReporter.exe" KeyPath="yes" Source="$(var.DisplayMagicianLogReporter.TargetDir)\LogReporter.exe" />
|
|
</Component>
|
|
<Component Guid="*" Directory="APPLICATIONROOTDIRECTORY">
|
|
<File Id="LogReporter.exe.config" KeyPath="yes" Source="$(var.DisplayMagicianLogReporter.TargetDir)\LogReporter.exe.config" />
|
|
</Component>
|
|
</Feature>
|
|
</Product>
|
|
</Wix> |