<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <?include includes\Preprocessors.wxi?> 
  
  <Product Name="$(var.ProductName)"
           Id="$(var.ProductGuid)"
           Language="1033"
           Codepage="1252"
           Version="$(var.ProductVersion)"
           Manufacturer="Eiffel Software"
           UpgradeCode="$(var.UpgradeGuid)">
    
    <!-- PACKAGE -->
    <Package Id="*" Keywords="Installer" Description="$(var.ProductDescription)"
			Comments="$(var.ProductName) is a registered trademark of Eiffel Software" Manufacturer="Eiffel Software Inc."
			InstallerVersion="$(var.MsiVersion)" Platform="$(var.MsiPlatform)" Languages="1033" Compressed="yes" InstallPrivileges="elevated"
      SummaryCodepage="1252"/>
    
    <EnsureTable Id="ControlCondition"/>
    <!-- END PACKAGE -->

    <!-- MEDIA -->
    <Media Id="1" EmbedCab="yes" DiskPrompt="Disc #1" Cabinet="data.cab" CompressionLevel="high"/>
    <Property Id="DiskPrompt" Value="$(var.ProductName) Installation [1]" />
    <?ifdef Enterprise?>
      <Property Id="USERNAME">Eiffel User</Property>
      <Property Id="PIDTemplate" Hidden="yes"><![CDATA[12345<#####-#####-#####-#####-#####-#####>@@@@@]]></Property>
      <?ifdef EiffelStudio?>
        <Property Id="PIDKEY" Hidden="yes">00000-00000-00000-00000-00000-00000</Property>
      <?else?>
        <Property Id="PIDKEY" Hidden="yes">91169-08119-81772-37111-92871-67979</Property>
      <?endif?>
    <?endif?>
    <Property Id="PidKeySet" Hidden="yes">0</Property>
    <!-- END MEDIA -->

    <!-- BINARIES -->
    <Binary Id="app.ico" SourceFile="$(sys.SOURCEFILEDIR)images\app.ico" />
    <!-- END BINARIES -->
    
    <!-- ADD REMOVE PROGRAM -->
    <Property Id='ARPCOMMENTS'>$(var.ProductDescription)</Property>
    <Property Id='ARPCONTACT'>info@eiffel.com</Property>
    <Property Id='ARPHELPLINK'>http://support.eiffel.com</Property>
    <Property Id='ARPURLINFOABOUT'>http://www.eiffel.com</Property>
    <Property Id='ARPPRODUCTICON'>app.ico</Property>
    <Property Id='ARPNOMODIFY'>1</Property>
    <!-- END ADD REMOVE PROGRAM -->

    <!-- BUILT-IN PROPERTIES -->
    <Property Id='InstallMode'>Complete</Property>
    <Property Id='MaintenanceMode'>Remove</Property>
    <!-- END BUILT-IN PROPERTIES -->
    
    <!-- PROPERTIES -->
    <!-- Indicates if the installation should be for all users or not -->
    <Property Id="ALLUSERS">1</Property>
    <Property Id="ISEPLATFORM"><?ifdef x64?>win64<?else?>windows<?endif?></Property>
    <!-- Installation directory -->
    <Property Id="INSTALLDIR" Secure="yes" />
    <!-- .NET installation root -->
    <Property Id="FXINSTALLROOT">0<RegistrySearch Id="RegFxPath" Root="HKLM" Key="SOFTWARE\Microsoft\.NETFramework" Name="InstallRoot" Type="raw" Win64="$(var.IsWin64)" /></Property>
    <!-- Indicates if .NET is installed -->
    <Property Id="IS_DOTNET_INSTALLED">0</Property>

    <!-- Has license aggreement been viewed -->
    <Property Id="HAS_VIEWED_LICENSE">0</Property>
    <!-- Indicates if a C config choice is present -->
    <Property Id="C_CONFIG_CHOOSE">0</Property>
    <!-- URL for How-To-Install a C/C++ compiler -->
    <Property Id="C_CONFIG_INSTALL_URL">http://dev.eiffel.com/Installing_Microsoft_C_compiler</Property>
    <!-- Eiffel C configuration name -->
    <Property Id="C_CONFIG_NAME"><?ifdef EiffelStudio?>mingw<?else?>msc<?endif?></Property>
	<!-- The name of a MS compiler environment. Filled by `evaluate_c_ompiler' custom actions in `setup.dll' for debugging purposes. -->
    <Property Id="C_CONFIG_MSC_ENVIRONMENT">Unused</Property>
    <!-- Inidicates if a C compilation can be performed -->
    <Property Id="C_CONFIG_CAN_COMPILE">0</Property>
    <!-- Indicates if a MS C compiler has been found, usefull to bring some help in how to install the C compiler in the dialog letting you choose your C compiler. -->
    <Property Id="C_CONFIG_MSC_FOUND">0</Property>
    <!-- Last truncated error when determinine a Visual C/C++ compiler environment -->
    <Property Id="C_CONFIG_ERROR_TEXT">Unknown Reason</Property>
    <!-- Last error when determinine a Visual C/C++ compiler environment -->
    <Property Id="C_CONFIG_ERROR_FULL_TEXT">Unknown Reason</Property>
    <!-- Indicates if the View button is displayed to show a how document to install a MS C compiler -->
    <Property Id="IS_VIEW_FULL_ERROR_BUTTON_SHOWN">0</Property>
    <!-- END PROPERTIES -->
    
    <!-- INSTALL DESCRIPTION -->
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="$(var.PrgFiles)" Name="$(var.PrgFiles)">
        <Directory Id="Dir.EiffelSoftware" Name="Eiffel Software">
          <Directory Id="INSTALLDIR" Name="$(var.InstallName)">
          </Directory>
        </Directory>
      </Directory>
    </Directory>

    <FeatureRef Id="Feat.root">
    </FeatureRef>
    <!-- END INSTALL DESCRIPTION -->

    <!-- INSTALL SEQUENCING -->
    <InstallExecuteSequence>
      <?ifdef Enterprise?>
        <Custom Action="PrepareInstallCdKey" Before="InstallCdKey"><![CDATA[NOT Installed]]></Custom>
        <Custom Action="InstallCdKey" Before="InstallFinalize"><![CDATA[NOT Installed]]></Custom>
      <?endif?>
      <RemoveExistingProducts After="InstallFinalize" />
    </InstallExecuteSequence>
    <AdminExecuteSequence>
      <?ifdef Enterprise?>
        <Custom Action="PrepareInstallCdKey" Before="InstallCdKey"><![CDATA[NOT Installed]]></Custom>
        <Custom Action="InstallCdKey" Before="InstallFinalize"><![CDATA[NOT Installed]]></Custom>
      <?endif?>
    </AdminExecuteSequence>
    <!-- END INSTALL SEQUENCING -->

    <!-- USER INTERFACE -->
    <UIRef Id="UI.configuration"/>
    <UIRef Id="UI.dialog_files_in_use"/>
    <!-- END USER INTERFACE -->
  </Product>
</Wix>
