<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
	<Product Id="7D65E5D3-A191-4208-875A-43F149F9C36F"
					 UpgradeCode="8A1FACD4-F003-4720-AD50-4161CA58E84B"
					 Name="FirebirdClient $(var.Version)"
					 Language="1033"
					 Version="$(var.Version)"
					 Manufacturer="FirebirdSQL">
		<Package InstallerVersion="200" Compressed="yes" Description="ADO.NET Data Provider for Firebird" />

		<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" CompressionLevel="high" />

		<Feature Id="FirebirdClientFeature" Title="Files" Level="1" Absent="disallow">
			<ComponentRef Id="FirebirdClientAssemblyComponent" />
			<ComponentRef Id="OtherFilesComponent" />
		</Feature>
		<Feature Id="GACInstallationFeature" Title ="GAC installation" Level="1">
			<ComponentRef Id="FirebirdClientGACComponent" />
		</Feature>
		<Feature Id="MachineConfig32Feature" Title ="machine.config (x86) registration" Level="1">
			<ComponentRef Id="FirebirdClientMachineConfig32Component" />
		</Feature>
		<Feature Id="MachineConfig64Feature" Title ="machine.config (x64) registration" Level="1">
			<ComponentRef Id="FirebirdClientMachineConfig64Component" />
		</Feature>

		<Directory Id="TARGETDIR" Name="SourceDir">
			<Directory Id="ProgramFilesFolder">
				<Directory Id="APPLICATIONFOLDER" Name="FirebirdClient">
					<Component Id="FirebirdClientAssemblyComponent" Guid="5FC7B74A-949A-448E-9E5A-1893C3CE9184">
						<File Id="FirebirdSql.Data.FirebirdClient.dll"
									Name="FirebirdSql.Data.FirebirdClient.dll"
									Source="$(var.BaseDir)\src\FirebirdSql.Data.FirebirdClient\bin\$(var.Configuration)\net452\FirebirdSql.Data.FirebirdClient.dll" />
					</Component>
					<Component Id="OtherFilesComponent" Guid="348EA22F-390E-4BA6-9C93-3879581E9297">
						<File Id="readme.txt"
									Name="readme.txt"
									Source="$(var.BaseDir)\readme.txt" />
						<File Id="license.txt"
									Name="license.txt"
									Source="$(var.BaseDir)\..\license.txt" />
						<File Id="FirebirdSql.Data.FirebirdClient.pdb"
									Name="FirebirdSql.Data.FirebirdClient.pdb"
									Source="$(var.BaseDir)\src\FirebirdSql.Data.FirebirdClient\bin\$(var.Configuration)\net452\FirebirdSql.Data.FirebirdClient.pdb" />
					</Component>
				</Directory>
			</Directory>
			
			<Component Id="FirebirdClientGACComponent" Guid="58016F1C-35F3-4049-A138-D6F577FB9D3F">
				<File Id="FirebirdSql.Data.FirebirdClient.dll_GAC"
							Name="FirebirdSql.Data.FirebirdClient.dll"
							Assembly=".net"
							KeyPath="yes"
							Source="$(var.BaseDir)\src\FirebirdSql.Data.FirebirdClient\bin\$(var.Configuration)\net452\FirebirdSql.Data.FirebirdClient.dll" />
			</Component>
			<Component Id="FirebirdClientMachineConfig32Component" Guid="CBA6E615-0521-4D14-8576-351EEF79DD1D">
				<util:XmlConfig Id="MachineConfig32DbProviderFactories"
									 File="[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\Config\machine.config"
									 Action="create"
									 On="install"
									 ElementPath="//configuration/system.data/DbProviderFactories"
									 Name="add"
									 Node="element"
									 Sequence="1" />
				<util:XmlConfig Id="MachineConfig32DbProviderFactories_Name"
									 File="[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\Config\machine.config"
									 ElementId="MachineConfig32DbProviderFactories"
									 Name="name"
									 Value="FirebirdClient Data Provider"
									 Sequence="2" />
				<util:XmlConfig Id="MachineConfig32DbProviderFactories_Invariant"
									 File="[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\Config\machine.config"
									 ElementId="MachineConfig32DbProviderFactories"
									 Name="invariant"
									 Value="FirebirdSql.Data.FirebirdClient"
									 Sequence="2" />
				<util:XmlConfig Id="MachineConfig32DbProviderFactories_Description"
									 File="[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\Config\machine.config"
									 ElementId="MachineConfig32DbProviderFactories"
									 Name="description"
									 Value=".NET Framework Data Provider for Firebird"
									 Sequence="2" />
				<util:XmlConfig Id="MachineConfig32DbProviderFactories_Type"
									 File="[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\Config\machine.config"
									 ElementId="MachineConfig32DbProviderFactories"
									 Name="type"
									 Value="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient, Version=!(bind.fileVersion.FirebirdSql.Data.FirebirdClient.dll), Culture=neutral, PublicKeyToken=3750abcc3150b00c"
									 Sequence="2" />

				<util:XmlConfig Id="MachineConfig32DbProviderFactories_Uninstall"
									 File="[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\Config\machine.config"
									 Action="delete"
									 On="uninstall"
									 ElementPath="//configuration/system.data/DbProviderFactories/add[\[]@invariant='FirebirdSql.Data.FirebirdClient'[\]]"
									 Sequence="1" />
			</Component>
			<Component Id="FirebirdClientMachineConfig64Component" Guid="BEFFCC7B-0EE0-47DD-BB9F-8AD8838D789C">
				<Condition>VersionNT64</Condition>
				<util:XmlConfig Id="MachineConfig64DbProviderFactories"
									 File="[WindowsFolder]Microsoft.NET\Framework64\v4.0.30319\Config\machine.config"
									 Action="create"
									 On="install"
									 ElementPath="//configuration/system.data/DbProviderFactories"
									 Name="add"
									 Node="element"
									 Sequence="1" />
				<util:XmlConfig Id="MachineConfig64DbProviderFactories_Name"
									 File="[WindowsFolder]Microsoft.NET\Framework64\v4.0.30319\Config\machine.config"
									 ElementId="MachineConfig64DbProviderFactories"
									 Name="name"
									 Value="FirebirdClient Data Provider"
									 Sequence="2" />
				<util:XmlConfig Id="MachineConfig64DbProviderFactories_Invariant"
									 File="[WindowsFolder]Microsoft.NET\Framework64\v4.0.30319\Config\machine.config"
									 ElementId="MachineConfig64DbProviderFactories"
									 Name="invariant"
									 Value="FirebirdSql.Data.FirebirdClient"
									 Sequence="2" />
				<util:XmlConfig Id="MachineConfig64DbProviderFactories_Description"
									 File="[WindowsFolder]Microsoft.NET\Framework64\v4.0.30319\Config\machine.config"
									 ElementId="MachineConfig64DbProviderFactories"
									 Name="description"
									 Value=".NET Framework Data Provider for Firebird"
									 Sequence="2" />
				<util:XmlConfig Id="MachineConfig64DbProviderFactories_Type"
									 File="[WindowsFolder]Microsoft.NET\Framework64\v4.0.30319\Config\machine.config"
									 ElementId="MachineConfig64DbProviderFactories"
									 Name="type"
									 Value="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient, Version=!(bind.fileVersion.FirebirdSql.Data.FirebirdClient.dll), Culture=neutral, PublicKeyToken=3750abcc3150b00c"
									 Sequence="2" />

				<util:XmlConfig Id="MachineConfig64DbProviderFactories_Uninstall"
									 File="[WindowsFolder]Microsoft.NET\Framework64\v4.0.30319\Config\machine.config"
									 Action="delete"
									 On="uninstall"
									 ElementPath="//configuration/system.data/DbProviderFactories/add[\[]@invariant='FirebirdSql.Data.FirebirdClient'[\]]"
									 Sequence="1" />
			</Component>
		</Directory>

		<UIRef Id="WixUI_Advanced" />
		<Property Id="ApplicationFolderName" Value="FirebirdClient" />
		<Property Id="WixAppFolder" Value="WixPerMachineFolder" />
		<WixVariable Id="WixUISupportPerUser" Value="0" />
		<Property Id='ALLUSERS' Value='1' />
		<WixVariable Id="WixUILicenseRtf" Value="$(var.BaseDir)\..\license.rtf" />
	</Product>
</Wix>
