<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->


<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">

  <?include caSuffix.wxi ?>
  <Fragment>
    <CustomAction Id="WixSchedGameExplorer$(var.Suffix)" BinaryKey="WixGamingCA$(var.Suffix)" DllEntry="SchedGameExplorerInstall" Execute="immediate" Return="check" SuppressModularization="yes" />
    <CustomAction Id="WixSchedGameExplorerUninstall$(var.Suffix)" BinaryKey="WixGamingCA$(var.Suffix)" DllEntry="SchedGameExplorerUninstall" Execute="immediate" Return="check" SuppressModularization="yes" />
    <CustomAction Id="WixExecGameExplorer$(var.DeferredSuffix)" BinaryKey="WixGamingCA$(var.Suffix)" DllEntry="ExecGameExplorer" Execute="deferred" Impersonate="no" Return="ignore" SuppressModularization="yes" />
    <CustomAction Id="WixRollbackGameExplorer$(var.DeferredSuffix)" BinaryKey="WixGamingCA$(var.Suffix)" DllEntry="ExecGameExplorer" Execute="rollback" Impersonate="no" Return="ignore" SuppressModularization="yes" />

    <InstallExecuteSequence>
      <!-- Uninstall requires the game GDF resource file, make sure it happens before remove files -->
      <Custom Action="WixSchedGameExplorerUninstall$(var.Suffix)" Before="RemoveFiles" Overridable="yes">VersionNT &gt;= 600 AND MsiNTProductType = 1</Custom>

      <!-- Install requires the game GDF resource file, make sure it happens after install files -->
      <Custom Action="WixSchedGameExplorer$(var.Suffix)" After="InstallFiles" Overridable="yes">VersionNT &gt;= 600 AND MsiNTProductType = 1</Custom>
    </InstallExecuteSequence>
  </Fragment>

  <!-- Gaming Custom Action DLL Definitions -->
    <Fragment>
        <Binary Id="WixGamingCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))gaming.dll" />
    </Fragment>
</Include>
