<?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">
	<?define VersionNumber="!(bind.packageVersion.OCATPackage)" ?>
	<Bundle Name="Open Capture and Analytics Tool (OCAT)"
					Version="$(var.VersionNumber)"
			    Manufacturer="Advanced Micro Devices, Inc."
					UpgradeCode="6d56f42e-f6cf-4856-a45e-1c353fae8610"
          IconSourceFile="../Frontend/ocat.ico"
					>
		<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLargeLicense">
			<bal:WixStandardBootstrapperApplication
						LicenseFile="license.rtf"
						ShowVersion="yes"
            LogoFile="../icon/branding.png"
            ThemeFile="theme.xml"
						/>
		</BootstrapperApplicationRef>
		<Variable Name="InstallFolder" Type="string" Value="[ProgramFilesFolder]OCAT" />

    <Chain>
			<PackageGroupRef Id="NetFx452Web"/>
      <ExePackage
         Cache="no"
         Compressed="yes"
         PerMachine="yes"
         Permanent="yes"
         Vital="yes"
         Name="redist\vc_redist.x64.exe"
         SourceFile="redist\vc_redist.x64.exe"
         InstallCommand="/install /quiet /norestart">

        <!-- -->
        <ExitCode Value="3010" Behavior="forceReboot"/>

        <!-- Ignore "Newer version installed" error -->
        <ExitCode Value="1638" Behavior="success"/>
      </ExePackage>
      
      <MsiPackage Id="OCATPackage" SourceFile="$(var.Installer.TargetPath)" DisplayInternalUI="no" Compressed="yes" Vital="yes">
				<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]" />
			</MsiPackage>
		</Chain>
	</Bundle>
</Wix>
