<?xml version="1.0"?>

<?include defines_dbg.wxi?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
   <Product  Id="*" Name="$(var.PackageName)"
      Language="1033" Version="$(var.ProductVersion)" Manufacturer="Merkaartor"
      UpgradeCode="4892C085-55A9-413b-9C7B-42E33ED7D7D2">

     <Package 
         Description="A map editor for OpenStreetMap.org (Debug version)" InstallerVersion="100" Compressed="yes" />
     
     <Upgrade Id="4892C085-55A9-413b-9C7B-42E33ED7D7D2">
       <UpgradeVersion OnlyDetect="yes" Minimum="$(var.ProductVersion)" Property="NEWERVERSIONDETECTED" IncludeMinimum="no" />
       <UpgradeVersion OnlyDetect="no" Maximum="$(var.ProductVersion)" Property="OLDERVERSIONBEINGUPGRADED" IncludeMaximum="yes" />
     </Upgrade>

     <InstallExecuteSequence>
       <RemoveExistingProducts After="InstallInitialize" />
     </InstallExecuteSequence>

      <!--Set the icon for the msi and Add/Remove programs-->
      <Icon Id='Merkaartor.exe' SourceFile='..\Icons\Merkaartor_16x16.ico'/>
      <Icon Id='MainIcon' SourceFile='..\Icons\Merkaartor_48x48.ico'/>
      <Property Id="ARPPRODUCTICON" Value="Merkaartor.exe" />
      <Property Id="ALLUSERS" Value="1"/>

      <Media Id="1" Cabinet="Product.cab" EmbedCab="yes" />
      
      <Directory Id="TARGETDIR" Name="SourceDir">
         <Directory Id="ProgramMenuFolder">
         </Directory>
         <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLLOCATION" Name="Merkaartor svn-debug">
                <Directory Id="MERKAARTORSHARE" Name="share">
                </Directory>
                <Directory Id="MERKAARTORPLUGINS" Name="plugins">
                   <Directory Id="MPBACKGROUND" Name="background" />
                   <Directory Id="MPSTYLES" Name="styles" />
                </Directory>
<!--
                <Directory Id="QTIMAGEPLUGINDIR" Name="imageformats" />
-->
                <Directory Id="QTTRANSLATIONS" Name="translations" />
            </Directory>
         </Directory>
      </Directory>

      <DirectoryRef Id="MERKAARTORSHARE">
         <Component Id="worldbackgroundosb" Guid="12ACB195-D065-49bb-A7A9-CACE30DD8F1B">
            <File Id="world_background.osb" Name="world_background.osb"
               Source="$(var.SharePath)\world_background.osb" DiskId="1">
            </File>
         </Component>
      </DirectoryRef>

      <DirectoryRef Id="MPBACKGROUND">
         <Component Id="background_plug" Guid="A37E552D-FF55-4507-8C8D-3201993F7C48">
            <File Id="MYahooBackgroundPlugind0.dll" Name="MYahooBackgroundPlugind0.dll"
               Source="$(var.BinPath)\plugins\background\MYahooBackgroundPlugind0.dll" DiskId="1">
            </File>
            <File Id="MYahooTiledBackgroundPlugind0.dll" Name="MYahooTiledBackgroundPlugind0.dll"
		    Source="$(var.BinPath)\plugins\background\MYahooTiledBackgroundPlugind0.dll" DiskId="1" />
            <File Id="MGeoTiffBackgroundPlugind0.dll" Name="MGeoTiffBackgroundPlugind0.dll"
		    Source="$(var.BinPath)\plugins\background\MGeoTiffBackgroundPlugind0.dll" DiskId="1" />
            <File Id="MWalkingPapersBackgroundPlugind0.dll" Name="MWalkingPapersBackgroundPlugind0.dll"
		    Source="$(var.BinPath)\plugins\background\MWalkingPapersBackgroundPlugind0.dll" DiskId="1" />
            <File Id="MCadastreFranceBackgroundPlugind0.dll" Name="MCadastreFranceBackgroundPlugind0.dll"
		    Source="$(var.BinPath)\plugins\background\MCadastreFranceBackgroundPlugind0.dll" DiskId="1" />
            <File Id="MSpatialiteBackgroundPlugind0.dll" Name="MSpatialiteBackgroundPlugind0.dll"
		    Source="$(var.BinPath)\plugins\background\MSpatialiteBackgroundPlugind0.dll" DiskId="1" />
            <File Id="MGdalBackgroundPlugind0.dll" Name="MGdalBackgroundPlugind0.dll"
		    Source="$(var.BinPath)\plugins\background\MGdalBackgroundPlugind0.dll" DiskId="1" />
            <File Id="MMsBingMapBackgroundPlugind0.dll" Name="MMsBingMapBackgroundPlugind0.dll"
		    Source="$(var.BinPath)\plugins\background\MMsBingMapBackgroundPlugind0.dll" DiskId="1" />
         </Component>
      </DirectoryRef>
      
      <DirectoryRef Id="MPSTYLES">
         <Component Id="skulpture" Guid="47E06B1A-DBF5-452d-A68A-5F45CE411353">
            <File Id="skulptured0.dll" Name="skulptured0.dll"
               Source="$(var.BinPath)\plugins\styles\skulptured0.dll" DiskId="1">
            </File>
         </Component>
      </DirectoryRef>
      
      <DirectoryRef Id="INSTALLLOCATION">
         <Component Id="Merkaartor" Guid="23E47A10-B9C8-406f-AC6B-3BF68B288470">
	          <RegistryValue Root="HKCU" Key="Software\Merkaartor" Name="Installed" Type="integer" Value="1"/>
            <File Id="MerkaartorExe" Name="Merkaartor.exe"
               Source="$(var.BinPath)\Merkaartor.exe" DiskId="1">
            </File>         
            <File Id="Qgpsmm" Name="Qgpsmm.dll"
               Source="$(var.DllPath)\Qgpsmm.dll" DiskId="1">
            </File>
            <File Id="merkaartor.cmd" Name="merkaartor.cmd"
               Source="merkaartor.cmd" DiskId="1">
               <Shortcut Id="myshort" Directory="ProgramMenuFolder"
                     Name="Merkaartor $(var.VERSION)$(var.REVISION) (Debug)" WorkingDirectory="INSTALLLOCATION"
					 Icon="MainIcon" />
            </File>
            <File Id="gdb.exe" Name="gdb.exe"
               Source="$(var.MingwPath)\bin\gdb.exe" DiskId="1">
            </File>
         </Component>
      </DirectoryRef>
 
      
       <Feature Id="MerkaartorFeature" Title="Merkaartor editor" Level="1"
         Display="expand" ConfigurableDirectory="INSTALLLOCATION">
         <ComponentRef Id="DllCt" />
         <ComponentRef Id="Merkaartor" />
         <ComponentRef Id="background_plug" />
         <ComponentRef Id="skulpture" />
         <ComponentRef Id="proj4_bin" />
         <ComponentRef Id="proj4_shr" />
      </Feature>
      <Feature Id="ftWorld_Shp" Title="World Shape file" Level="1"
         Display="expand" ConfigurableDirectory="MERKAARTORSHARE">
         <ComponentRef Id="worldbackgroundosb" />
      </Feature>
<!--     <Feature Id="QtMainFeature" Title="Main Qt DLLs" Level="1"
        Display="expand" ConfigurableDirectory="INSTALLLOCATION">
       <ComponentRef Id="QtMainD" />
     </Feature>
     <Feature Id="QtImagePluginsFeature" Title="Qt Image Plugins DLLs" Level="1"
        Display="expand" ConfigurableDirectory="QTIMAGEPLUGINDIR">
       <ComponentRef Id="QtImagePluginsD" />
     </Feature>
-->
     <Feature Id="TranslationsFeature" Title="Translation files" Level="1"
        Display="expand" ConfigurableDirectory="QTTRANSLATIONS">
<!--
       <ComponentRef Id="QtTranslations" />
-->
       <ComponentRef Id="MerkaartorTranslationsCt" />
     </Feature>

     <UIRef Id="WixUI_Mondo"/>

   </Product>

<!--   
   <?include qt_dbg.wxi?>
   <?include qttrans.wxi?>
-->
   <?include external.wxi?>
   <?include proj4.wxi?>
   <?include merkaartor_trans.wxi?>

</Wix>
