<?include Config.wxi?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
	<Product Id="*" Name="$(var.ProductName)" Language="1031" Codepage="1252" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
		<Package
		  Id="*"
		  Keywords="Installer"
		  Description="$(var.Description)"
		  Comments="$(var.Comments)"
		  Manufacturer="$(var.Manufacturer)"
		  InstallerVersion="100"
		  Languages="1031"
		  Compressed="yes"
		  SummaryCodepage="1252"
		  InstallScope="perMachine"
    />

		<Media Id='1' Cabinet='$(var.ProgramName).cab' EmbedCab='yes' DiskPrompt='$(var.ProgramName)'  />
		<Property Id='DiskPrompt' Value="$(var.ProgramName) Install" />

		<MajorUpgrade
		  AllowDowngrades="no"
		  AllowSameVersionUpgrades="yes"
		  DowngradeErrorMessage="Eine neuere Version von [ProductName] ist bereits installiert. Das Setup wird beendet."
    />

		<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
		<Upgrade Id="$(var.UpgradeCode)">
			<UpgradeVersion
			  Minimum="1.0.0.0" Maximum="99.0.0.0"
			  Property="PREVIOUSVERSIONSINSTALLED"
			  IncludeMinimum="yes" IncludeMaximum="no" />
		</Upgrade>

		<!-- Legt das Icon fest -->
		<Icon Id="AppIcon.exe" SourceFile="$(var.ProgramName).exe" />
		<!-- Zeige Icon in Systemsteuerung > Programme entfernen -->
		<Property Id="ARPPRODUCTICON" Value="AppIcon" />

		<!-- Legt die Verzeichnisstruktur fest -->
		<Directory Id="TARGETDIR" Name="SourceDir">
			<Directory Id="ProgramFilesFolder">
				<Directory Id="DDDIR" Name="$(var.Manufacturer)">
					<Directory Id="INSTALLDIR" Name="$(var.ProductName)"/>
				</Directory>
			</Directory>

			<Directory Id="ProgramMenuFolder">
				<Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)"/>
			</Directory>

			<Directory Id="DesktopFolder" />
		</Directory>

		<!-- Verknüpfung für Startmenü -->
		<DirectoryRef Id="ApplicationProgramsFolder">
			<Component Id="ApplicationShortcut_StartMenu" Guid="336014aa-996a-455b-be29-19c1986130ff">
				<Shortcut Id="ApplicationStartMenuShortcut_StartMenu"
					 Name="$(var.ProductName)"
					 Target="[INSTALLDIR]$(var.ProgramName).exe"
					 WorkingDirectory="INSTALLDIR"/>
				<RemoveFolder Id="ApplicationProgramsFolder_StartMenu" On="uninstall"/>
				<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
			</Component>
		</DirectoryRef>

		<!-- Verknüpfung für Desktop -->
		<DirectoryRef Id="DesktopFolder">
			<Component Id="ApplicationShortcut_Desktop" Guid="773e188e-70a9-47bb-a734-71349814ab96">
				<Shortcut Id="ApplicationStartMenuShortcut_Desktop"
					 Name="$(var.ProductName)"
					 Target="[INSTALLDIR]$(var.ProgramName).exe"
					 WorkingDirectory="INSTALLDIR"/>
				<RemoveFolder Id="ApplicationProgramsFolder_Desktop" On="uninstall"/>
				<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
			</Component>
		</DirectoryRef>

		<DirectoryRef Id="INSTALLDIR">
			<Component Id="MainApplicationExe" Guid="ac6b7460-9c48-47b3-a590-da0905dd433a">
				<File Id="MainApplicationExe" Name="$(var.ProgramName).exe" KeyPath="yes" Checksum="no">
				<Shortcut Id="DesktopShortcut" Directory="DesktopFolder" Name="$(var.ProductName)" WorkingDirectory="INSTALLDIR" Icon="AppIcon.exe" IconIndex="0" Advertise="yes" />
				<Shortcut Id="StartMenuShortcut" Directory="ProgramMenuFolder" Name="$(var.ProductName)" WorkingDirectory="INSTALLDIR" Icon="AppIcon.exe" IconIndex="0" Advertise="yes" />
				</File>
			</Component>

			<Component Id="RegistryKeys" Guid="70d8acd5-b94c-49d7-9ae2-5ccc97a96fd1">
				<RegistryKey Root="HKLM" Key="Software">
					<RegistryKey Key="[Manufacturer]">
						<RegistryKey Key="[ProductName]" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" Id="REGKEYINSTALLDIR">
							<RegistryValue Type="string" Value="[INSTALLDIR]" Name="Path" />
						</RegistryKey>
					</RegistryKey>
				</RegistryKey>

				<util:RemoveFolderEx Id="RemoveApplicationFolder" On="uninstall" Property="APPLICATIONFOLDER" />
			</Component>

			<Component Id="Libraries" Guid="38154538-ccbb-4984-b229-e2ac9ba68177">
				<File Id="DevExpress.BonusSkins.v21.2.dll" Name="DevExpress.BonusSkins.v21.2.dll" KeyPath="yes" Checksum="no" />
				<File Id="DevExpress.Charts.v21.2.Core.dll" Name="DevExpress.Charts.v21.2.Core.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.CodeParser.v21.2.dll" Name="DevExpress.CodeParser.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Data.Desktop.v21.2.dll" Name="DevExpress.Data.Desktop.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Data.v21.2.dll" Name="DevExpress.Data.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.DataAccess.v21.2.dll" Name="DevExpress.DataAccess.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.DataAccess.v21.2.UI.dll" Name="DevExpress.DataAccess.v21.2.UI.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.DataVisualization.v21.2.Core.dll" Name="DevExpress.DataVisualization.v21.2.Core.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Diagram.v21.2.Core.dll" Name="DevExpress.Diagram.v21.2.Core.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Dialogs.v21.2.Core.dll" Name="DevExpress.Dialogs.v21.2.Core.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Images.v21.2.dll" Name="DevExpress.Images.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Office.v21.2.Core.dll" Name="DevExpress.Office.v21.2.Core.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Pdf.v21.2.Core.dll" Name="DevExpress.Pdf.v21.2.Core.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Pdf.v21.2.Drawing.dll" Name="DevExpress.Pdf.v21.2.Drawing.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Printing.v21.2.Core.dll" Name="DevExpress.Printing.v21.2.Core.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.RichEdit.v21.2.Core.dll" Name="DevExpress.RichEdit.v21.2.Core.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Sparkline.v21.2.Core.dll" Name="DevExpress.Sparkline.v21.2.Core.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Spreadsheet.v21.2.Core.dll" Name="DevExpress.Spreadsheet.v21.2.Core.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.TreeMap.v21.2.Core.dll" Name="DevExpress.TreeMap.v21.2.Core.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Utils.v21.2.dll" Name="DevExpress.Utils.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Utils.v21.2.UI.dll" Name="DevExpress.Utils.v21.2.UI.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.Xpo.v21.2.dll" Name="DevExpress.Xpo.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraBars.v21.2.dll" Name="DevExpress.XtraBars.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraCharts.v21.2.dll" Name="DevExpress.XtraCharts.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraDiagram.v21.2.dll" Name="DevExpress.XtraDiagram.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraDialogs.v21.2.dll" Name="DevExpress.XtraDialogs.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraEditors.v21.2.dll" Name="DevExpress.XtraEditors.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraGrid.v21.2.dll" Name="DevExpress.XtraGrid.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraLayout.v21.2.dll" Name="DevExpress.XtraLayout.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraNavBar.v21.2.dll" Name="DevExpress.XtraNavBar.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraPrinting.v21.2.dll" Name="DevExpress.XtraPrinting.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraRichEdit.v21.2.dll" Name="DevExpress.XtraRichEdit.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraSpreadsheet.v21.2.dll" Name="DevExpress.XtraSpreadsheet.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraTreeList.v21.2.dll" Name="DevExpress.XtraTreeList.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraTreeMap.v21.2.dll" Name="DevExpress.XtraTreeMap.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DevExpress.XtraVerticalGrid.v21.2.dll" Name="DevExpress.XtraVerticalGrid.v21.2.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Controls.DocumentViewer.dll" Name="DigitalData.Controls.DocumentViewer.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Controls.LookupGrid.dll" Name="DigitalData.Controls.LookupGrid.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Controls.RegexEditor.dll" Name="DigitalData.Controls.RegexEditor.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Controls.SnapPanel.dll" Name="DigitalData.Controls.SnapPanel.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Controls.SQLConfig.dll" Name="DigitalData.Controls.SQLConfig.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.GUIs.ClipboardWatcher.dll" Name="DigitalData.GUIs.ClipboardWatcher.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.GUIs.Common.dll" Name="DigitalData.GUIs.Common.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.GUIs.GlobalIndexer.dll" Name="DigitalData.GUIs.GlobalIndexer.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Modules.Base.dll" Name="DigitalData.Modules.Base.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Modules.Config.dll" Name="DigitalData.Modules.Config.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Modules.Database.dll" Name="DigitalData.Modules.Database.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Modules.EDMI.API.dll" Name="DigitalData.Modules.EDMI.API.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Modules.Encryption.dll" Name="DigitalData.Modules.Encryption.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Modules.Filesystem.dll" Name="DigitalData.Modules.Filesystem.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Modules.Interfaces.dll" Name="DigitalData.Modules.Interfaces.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Modules.Language.dll" Name="DigitalData.Modules.Language.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Modules.Logging.dll" Name="DigitalData.Modules.Logging.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Modules.Messaging.dll" Name="DigitalData.Modules.Messaging.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Modules.Patterns.dll" Name="DigitalData.Modules.Patterns.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Modules.Windows.dll" Name="DigitalData.Modules.Windows.dll" KeyPath="no" Checksum="no" />
				<File Id="DigitalData.Modules.ZooFlow.dll" Name="DigitalData.Modules.ZooFlow.dll" KeyPath="no" Checksum="no" />
				<File Id="Independentsoft.Msg.dll" Name="Independentsoft.Msg.dll" KeyPath="no" Checksum="no" />
				<File Id="Mail.dll" Name="Mail.dll" KeyPath="no" Checksum="no" />
				<File Id="NLog.dll" Name="NLog.dll" KeyPath="no" Checksum="no" />
				<File Id="Oracle.ManagedDataAccess.dll" Name="Oracle.ManagedDataAccess.dll" KeyPath="no" Checksum="no" />
			</Component>

			<Component Id="External" Guid="fe785ceb-09fe-40fa-988d-011ebd574f81">
				<File Id="GdPicture.NET.14.filters.64.dll" Name="GdPicture.NET.14.filters.64.dll" Source="D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET.14.filters.64.dll" KeyPath="yes" Checksum="no" />
				<File Id="GdPicture.NET.14.filters.dll" Name="GdPicture.NET.14.filters.dll" Source="D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET.14.filters.dll" KeyPath="no" Checksum="no" />
				<File Id="GdPicture.NET.14.image.gdimgplug.64.dll" Name="GdPicture.NET.14.image.gdimgplug.64.dll" Source="D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET.14.image.gdimgplug.64.dll" KeyPath="no" Checksum="no" />
				<File Id="GdPicture.NET.14.image.gdimgplug.dll" Name="GdPicture.NET.14.image.gdimgplug.dll" Source="D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET.14.image.gdimgplug.dll" KeyPath="no" Checksum="no" />
				<File Id="GdPicture.NET.14.Imaging.Rendering.Skia.64.dll" Name="GdPicture.NET.14.Imaging.Rendering.Skia.64.dll" Source="D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET.14.Imaging.Rendering.Skia.64.dll" KeyPath="no" Checksum="no" />
				<File Id="GdPicture.NET.14.Imaging.Rendering.Skia.dll" Name="GdPicture.NET.14.Imaging.Rendering.Skia.dll" Source="D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET.14.Imaging.Rendering.Skia.dll" KeyPath="no" Checksum="no" />
				
				<File Id="MailLicense.xml" Name="MailLicense.xml" KeyPath="no" Checksum="no" />				
			</Component>

			<!-- Für weitere Dateien hier Component Elemente anlegen!! -->
			<!--
			<Component Id="FirmaXYLib" Guid="PUT-GUID-HERE">
				<File Id="FirmaXYLib" Name="FirmaXYLib.dll" KeyPath="yes" Checksum="no"/>
			</Component>
			-->
		</DirectoryRef>

		<Feature Id="MainApplication" Title="Main Application" Level="1">
			<ComponentRef Id="MainApplicationExe" />
			<ComponentRef Id="RegistryKeys" />
			<ComponentRef Id="Libraries" />
			<ComponentRef Id="External" />
			<!-- Weitere Komponenten hier hinzufügen! -->
		</Feature>

		<!-- 
			Diese Features können mit einem Parameter beim Aufruf des Installers deaktiviert werden
		-->
		<Feature Id="DesktopShortcut" Title="Desktop Shortcut">
			<Condition Level="0">DISABLE_DESKTOP_ICON</Condition>
			<ComponentRef Id="ApplicationShortcut_Desktop"/>
		</Feature>

		<Feature Id="StartmenuShortcut" Title="Startmenu Shortcut">
			<Condition Level="0">DISABLE_STARTMENU_ICON</Condition>
			<ComponentRef Id="ApplicationShortcut_StartMenu" />
		</Feature>

		<!-- Legt das Standard-Installationsverzeichnis fest-->
		<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
		<Property Id="_BrowseProperty" Value="INSTALLDIR" />

		<!-- Konfiguriert die Reihenfolge der Installer-Dialoge -->
		<UI>
			<UIRef Id="WixUI_FeatureTree"/>
			<UIRef Id="WixUI_ErrorProgressText" />
			<Publish Dialog="WelcomeDlg"
				  Control="Next"
				  Event="NewDialog"
				  Value="InstallDirDlg"
				  Order="2">1</Publish>
			<Publish Dialog="InstallDirDlg"
				  Control="Back"
				  Event="NewDialog"
				  Value="WelcomeDlg"
				  Order="2">1</Publish>
			<Publish Dialog="InstallDirDlg"
				  Control="Next"
				  Event="NewDialog"
				  Value="FeaturesDlg"
				  Order="2">1</Publish>
			<Publish Dialog="InstallDirDlg"
				  Control="ChangeFolder"
				  Event="NewDialog"
				  Value="BrowseDlg"
				  Order="2">1</Publish>
			<Publish Dialog="FeaturesDlg"
					Control="Back"
					Event="NewDialog"
					Value="InstallDirDlg"
					Order="2">1</Publish>
		</UI>
	</Product>
</Wix>
