<commit_before>﻿<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*"
           UpgradeCode="{E99A1F1E-7046-44F9-89EF-D3A59F84B209}" Manufacturer="SIL International"
           Name="Keyman Developer $(var.RELEASE)" Version="$(var.VERSION)" Language="1033">
    <Package Keywords="Keyman,Keyboard,Engine" Compressed="yes"
             Description="Keyman Developer $(var.RELEASE)" Comments="Contact:  Your local administrator"
             Manufacturer="SIL International" InstallerVersion="200" Platform="x86" Languages="1033" SummaryCodepage="1252" />
    
    <!-- Upgrade from Developer 7.0 -->
    <!-- ProductID for 7.0 = {5889CA65-3E9F-445b-A22F-9277A0FB43C6} -->
    <Upgrade Id="FF590D53-075C-45a4-89C2-EC7BA4E1ECD4">
      <UpgradeVersion OnlyDetect="no" Minimum="7.0.213.0" IncludeMinimum="yes" 
                      Maximum="8.0.314.0" IncludeMaximum="no" MigrateFeatures="yes" Property="OLDERFOUND" />
    </Upgrade>

    <!-- Upgrade from Developer 8.0 -->
    
    <Upgrade Id="490D8B83-276E-4434-B1EA-30713F7916C7">
      <UpgradeVersion OnlyDetect="no" Minimum="8.0.314.0" IncludeMinimum="yes" 
                      Maximum="9.0.507.0" IncludeMaximum="yes" MigrateFeatures="yes" Property="VERSION8FOUND" />
        <!-- bug in Developer 9.0 installer means 9.0.507.0 and earlier are treated as 8.x -->
    </Upgrade>
    
    <!-- Upgrade from Developer 9.0 -->

    <Upgrade Id="E0159651-CEA3-46CF-ACD7-0B0330C1B547">
      <UpgradeVersion OnlyDetect="no" Minimum="9.0.507.1" IncludeMinimum="yes"
                      Maximum="10.0.699.0" IncludeMaximum="no" MigrateFeatures="yes" Property="VERSION9FOUND" />
    </Upgrade>

    <!-- Upgrade from Developer 10.0 or later versions -->

    <Upgrade Id="7B78D2C8-31EC-4B0C-8D7F-650418A4686E">
      <UpgradeVersion OnlyDetect="no" Minimum="10.0.0.0" IncludeMinimum="yes"
                      Maximum="172.16.17.32" IncludeMaximum="no" MigrateFeatures="yes" Property="VERSION10FOUND" />
    </Upgrade>

    <!-- Upgrade from Developer 11.0 or later versions -->

    <Upgrade Id="{E99A1F1E-7046-44F9-89EF-D3A59F84B209}">
      <UpgradeVersion OnlyDetect="no" Minimum="172.16.17.32" IncludeMinimum="yes"
                      Maximum="$(var.VERSION)" IncludeMaximum="no" MigrateFeatures="yes" Property="VERSION11FOUND" />
      <UpgradeVersion OnlyDetect="yes" Minimum="$(var.VERSION)" IncludeMinimum="yes"
                      Maximum="$(var.VERSION)" IncludeMaximum="yes" Property="CURRENTVERSIONFOUND" />
      <UpgradeVersion OnlyDetect="yes" Minimum="$(var.VERSION)" IncludeMinimum="no" Property="NEWERFOUND" />
    </Upgrade>
    
    <Property Id="ALLUSERS"><![CDATA[1]]></Property>

    <Condition Message="Keyman Developer requires Windows 7 or later"><![CDATA[Installed OR (VersionNT >= 601)]]></Condition>

    <Directory Id='TARGETDIR' Name='SourceDir' DiskId='1'>

      <Merge Id="keymanengine" Language='1033' SourceFile='..\..\engine\inst\keymanengine.msm' DiskId='1' />

      <Directory Id="ProgramFilesFolder" Name="PFiles">
        <Directory Id="KeymanRoot" Name="Keyman">
          <Directory Id="KEYMANDEV" Name="Keyman Developer">
            <Directory Id="INSTALLDIR" Name="." FileSource="..\..\..\bin\developer\">
              <Directory Id="dirRedist" Name="Redist">
                <Directory Id="dirRedistSetup" Name="Setup" />
              </Directory>
              <Directory Id="dirNode" Name="node.js" />
              <Directory Id="dirProjects" Name="Projects" />
            </Directory>
          </Directory>
        </Directory>
      </Directory>
      
      <Directory Id="FontsFolder" />
      
      <Directory Id="ProgramMenuFolder">
        <Directory Id="ProgramMenuDir" Name="Keyman Developer" />
      </Directory>

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

      <Directory Id="AppDataFolder">
        <Directory Id="App_KeymanRoot" Name="Keyman" >
          <Directory Id="App_KeymanDev" Name="Keyman Developer">
            <Directory Id="App_KeymanDev_Databases" Name="Databases" />
          </Directory>
        </Directory>
      </Directory>

      <Directory Id="PersonalFolder" Name="Documents">
        <Directory Id="KMDevSamples" Name="Keyman Developer">
          <Directory Id="Samples" Name="Samples">
            <!-- TODO: start sourcing samples from keyboards repository. European keyboard sample here is very outdated -->
            <Directory Id="Samples_IMSample" Name="imsample"  />
            <Directory Id="Samples_Keyboards" Name="Keyboards">
              <Directory Id="Samples_Keyboards_European" Name="European" />
            </Directory>
          </Directory>
        </Directory>
      </Directory>
    </Directory>

    <ComponentGroup Id="KeymanDeveloperApp" Source="..\..\..\bin\developer\" Directory="INSTALLDIR">
      <Component>
        <File Name="tike.exe" KeyPath="yes" Vital='yes'>
          <Shortcut Id="startmenuTIKE" Advertise="yes" Directory="ProgramMenuDir" Name="Keyman Developer" WorkingDirectory='INSTALLDIR' Icon="TIKE.ico" IconIndex="0" />
          <Shortcut Id="desktopTIKE" Advertise="yes" Directory="DesktopFolder" Name="Keyman Developer" WorkingDirectory='INSTALLDIR' Icon="TIKE.ico" IconIndex="0" />
        </File>

        <Environment Id="PATH" Name="PATH" Value="[INSTALLDIR]" Permanent="no" Part="last" Action="set" System="yes" />

        <RemoveFile Id="excmagic.log" On="uninstall" Name="excmagic.log" />
        <RegistryKey ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" Root="HKLM" Key="Software\Keyman\Keyman Developer" />

        <RegistryValue Root="HKLM" Key="SOFTWARE\Keyman\Keyman Developer" Name="root path" Type="string" Value="[INSTALLDIR]" />
        <RegistryValue Root="HKLM" Key="SOFTWARE\Keyman\Keyman Engine\Installed Products" Name="developer_pro" Type="string" Value="developer_pro" />
        <RegistryValue Root="HKLM" Key="SOFTWARE\Keyman\Keyman Engine\Installed Products\developer_pro" Name="product id" Type="integer" Value="4" />

        <Environment Id="environmentKeymanDeveloperPath" Action="set" Name="KeymanDeveloperPath" System="yes" Value="[INSTALLDIR]" />

        <RemoveFile Id="CachedInstallDirFiles" Property="CachedInstallDir" On="uninstall" Name="*" />
        <RemoveFolder Id="CachedInstallDir" Property="CachedInstallDir" On="uninstall" />
        <RemoveFolder Id="CachedInstallDirParent" Property="CachedInstallDirParent" On="uninstall" />

        <RegistryValue Root="HKCR" Key=".kmn" Type="string" Value="KeymanDeveloper.File.Keyboard" />
        <RegistryValue Root="HKCR" Key=".kps" Type="string" Value="KeymanDeveloper.File.Package" />
        <RegistryValue Root="HKCR" Key=".kct" Type="string" Value="KeymanDeveloper.File.Branding" />
        <RegistryValue Root="HKCR" Key=".kpp" Type="string" Value="KeymanDeveloper.File.Distribution" />

        <RegistryValue Root="HKCR" Key=".kvks" Type="string" Value="KeymanDeveloper.File.OnScreenKeyboard" />
        <RegistryValue Root="HKCR" Key=".kpj" Type="string" Value="KeymanDeveloper.File.Project" />

        <RegistryValue Root="HKCR" Key=".kmx" Type="string" Value="Keyman.File.Keyboard" />
        <RegistryValue Root="HKCR" Key=".kmp" Type="string" Value="Keyman.File.Package" />
        <RegistryValue Root="HKCR" Key=".kvk" Type="string" Value="Keyman.File.OnScreenKeyboard" />
        
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Keyboard" Type="string" Value="Keyman Developer Keyboard Source File" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Keyboard\DefaultIcon" Type="string" Value="[#tike.exe],1" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Keyboard\Shell" Type="string" Value="edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Keyboard\Shell\edit" Type="string" Value="&amp;Edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Keyboard\Shell\edit\Command" Type="string" Value='"[#tike.exe]" "%1"' />
        
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Package" Type="string" Value="Keyman Developer Package Source File" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Package\DefaultIcon" Type="string" Value="[#tike.exe],2" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Package\Shell" Type="string" Value="edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Package\Shell\edit" Type="string" Value="&amp;Edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Package\Shell\edit\Command" Type="string" Value='"[#tike.exe]" "%1"' />

        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Branding" Type="string" Value="Keyman Developer Branding Source File" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Branding\DefaultIcon" Type="string" Value="[#tike.exe],3" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Branding\Shell" Type="string" Value="edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Branding\Shell\edit" Type="string" Value="&amp;Edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Branding\Shell\edit\Command" Type="string" Value='"[#tike.exe]" "%1"' />

        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Distribution" Type="string" Value="Keyman Developer Distribution Source File" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Distribution\DefaultIcon" Type="string" Value="[#tike.exe],4" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Distribution\Shell" Type="string" Value="edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Distribution\Shell\edit" Type="string" Value="&amp;Edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Distribution\Shell\edit\Command" Type="string" Value='"[#tike.exe]" "%1"' />
       
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Project" Type="string" Value="Keyman Developer Project Source File" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Project\DefaultIcon" Type="string" Value="[#tike.exe],5" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Project\Shell" Type="string" Value="open" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Project\Shell\open" Type="string" Value="&amp;Open" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Project\Shell\open\Command" Type="string" Value='"[#tike.exe]" "%1"' />

        <RegistryValue Root="HKCR" Key="Keyman.File.Keyboard" Type="string" Value="Keyman Keyboard File" />
        <RegistryValue Root="HKCR" Key="Keyman.File.Keyboard\DefaultIcon" Type="string" Value="[#tike.exe],6" />

        <RegistryValue Root="HKCR" Key="Keyman.File.Package" Type="string" Value="Keyman Package File" />
        <RegistryValue Root="HKCR" Key="Keyman.File.Package\DefaultIcon" Type="string" Value="[#tike.exe],7" />

        <RegistryValue Root="HKCR" Key="Keyman.File.OnScreenKeyboard" Type="string" Value="Keyman Keyboard File" />
        <RegistryValue Root="HKCR" Key="Keyman.File.OnScreenKeyboard\DefaultIcon" Type="string" Value="[#tike.exe],10" />
        <RegistryValue Root="HKCR" Key="Keyman.File.OnScreenKeyboard\Shell" Type="string" Value="edit" />
        <RegistryValue Root="HKCR" Key="Keyman.File.OnScreenKeyboard\Shell\edit" Type="string" Value="&amp;Edit" />
        <RegistryValue Root="HKCR" Key="Keyman.File.OnScreenKeyboard\Shell\edit\Command" Type="string" Value='"[#tike.exe]" "%1"' />
        
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.OnScreenKeyboard" Type="string" Value="Keyman Developer On Screen Keyboard File" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.OnScreenKeyboard\DefaultIcon" Type="string" Value="[#tike.exe],11" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.OnScreenKeyboard\Shell" Type="string" Value="edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.OnScreenKeyboard\Shell\edit" Type="string" Value="&amp;Edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.OnScreenKeyboard\Shell\edit\Command" Type="string" Value='"[#tike.exe]" "%1"' />
      </Component>
      
      <Component>
        <File Name="kmcomp.exe" KeyPath="yes" />
      </Component>
      
      <Component>
        <File Name="kmconvert.exe" KeyPath="yes" />
      </Component>

      <Component>
        <File Name="kmcmpdll.dll" KeyPath="yes" />
      </Component>
      
      <Component>
        <File Name="debughost.kmx" KeyPath="yes" Source="..\..\developer\tike\redist\debughost.kmx" />
      </Component>
      
      <Component>
        <File Name="keyboard_info.distribution.json" Source="..\..\global\inst\data\keyboard_info\" KeyPath="yes" />
      </Component>
      
      <Component>
        <File Name="keyboard_info.source.json" Source="..\..\global\inst\data\keyboard_info\" KeyPath="yes" />
      </Component>

      <!-- Data Files --> 
      
      <Component>
        <File Name="unicodedata.mdb" Source="..\..\global\inst\data\" KeyPath="yes" />
      </Component>

      <Component>
        <File Name="unicodedata.txt" Source="..\..\..\..\resources\standards-data\unicode-character-database\" KeyPath="yes" />
      </Component>

      <Component>
        <File Name="blocks.txt" Source="..\..\..\..\resources\standards-data\unicode-character-database\" KeyPath="yes" />
      </Component>
    </ComponentGroup>
    
    <ComponentGroup Id="FontsAndRedist" Source="..\..\developer\inst\fonts\">

      <!-- Fonts --> 
      
      <Component Directory="FontsFolder">
        <File Name="code2000.ttf" TrueType="yes" KeyPath="yes" />
      </Component>

      <Component Directory="FontsFolder">
        <File Name="code2001.ttf" TrueType="yes" KeyPath="yes" />
      </Component>

      <Component Directory="FontsFolder">
        <File Name="code2002.ttf" TrueType="yes" KeyPath="yes" />
      </Component>  
      
      <Component Directory="FontsFolder">
        <File Name='keymanweb-osk.ttf' TrueType='yes' Source='..\..\developer\tike\xml\layoutbuilder\keymanweb-osk.ttf' KeyPath="yes" />
      </Component>
                
      <!-- Redistributable files -->

      <Component Directory="dirRedistSetup">
        <File Name="setup.exe" Source="..\..\..\bin\desktop\setup.exe" KeyPath="yes" />
      </Component>
      
    </ComponentGroup>

    <ComponentGroup Id="Node">
      <Component Directory="dirNode">
        <File Name='node.exe' KeyPath="yes" Source="..\..\..\..\developer\inst\dist\node.exe" />
        <File Name='CHANGELOG.md' Source="..\..\..\..\developer\inst\dist\CHANGELOG.md" />
        <File Name='LICENSE' Source="..\..\..\..\developer\inst\dist\LICENSE" />
        <File Name='README.md' Source="..\..\..\..\developer\inst\dist\README.md" />
      </Component>

      <Component Directory="INSTALLDIR">
        <File Name='kmlmc.cmd' KeyPath="yes" Source="..\..\..\..\developer\inst\kmlmc.cmd" />
      </Component>
    </ComponentGroup>

    <ComponentGroup Id="AppData">
      <Component Id="AppDataRemovals" Guid="{780C99E9-E97E-4EB0-BBF5-D4591EEABA7C}" Directory="App_KeymanDev_Databases">
        <RegistryValue KeyPath="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer" Name="root path" Type="string" Value="[INSTALLDIR]" />
        <RegistryKey ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer" />
        <RemoveFolder Id="AD_Uninstall" On="uninstall" Directory="App_KeymanRoot" />
        <RemoveFolder Id="AD_KeymanDev_Uninstall" On="uninstall" Directory="App_KeymanDev" />
        <RemoveFolder Id="AD_KeymanDev_Databases_Uninstall" On="uninstall" Directory="App_KeymanDev_Databases" />
        <RemoveFolder Id="ProgramMenuDir" Directory="ProgramMenuDir" On="uninstall" />
        <RemoveFile Id="AD_KeymanDev_Databases_Uninstall_F" Directory="App_KeymanDev_Databases" On="uninstall"  Name="*.mdb" />
      </Component>
    </ComponentGroup>
      
    <ComponentGroup Id="Samples">
      <Component Guid="{BC44DD9F-F91B-4DB8-B792-CA5744FE5990}" Directory="Samples">
        <RegistryValue KeyPath="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer\Samples" Type="string" Name="Readme" Value="" />
        <File Name="readme.txt" Source="..\..\developer\samples\readme.txt" />
        <RemoveFolder Id="Samples" On="uninstall" />
        <RemoveFolder Id="KMDevSamples" Directory="KMDevSamples" On="uninstall" />
      </Component>
    
      <Component Directory="Samples">
        <RegistryValue KeyPath="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer\Samples" Type="string" Name="Link" Value="" />
        <CreateFolder>
          <Shortcut Id="startmenuSamples" Directory="ProgramMenuDir" Name="Samples"
            WorkingDirectory='INSTALLDIR' Icon="samples.ico" IconIndex="0" />
        </CreateFolder>
      </Component>
              
      <Component Guid="{003288A1-C6BE-4EE0-A91A-AD9C82A6DEE1}" Directory="Samples_IMSample">
        <RegistryValue KeyPath="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer\Samples" Type="string" Name="IMSample" Value="" />
        <File Name="imsample.dll" Source="..\..\..\bin\developer\imsample.dll" />
        <File Name="imdllref.rtf" Source="..\..\developer\samples\imsample\" />
        <File Name="imlib.cpp" Source="..\..\developer\samples\imsample\" />
        <File Name="imlib.h" Source="..\..\developer\samples\imsample\" />
        <File Name="imsample.cpp" Source="..\..\developer\samples\imsample\" />
        <File Name="imsample.def" Source="..\..\developer\samples\imsample\" />
        <File Name="IMSample.sln" Source="..\..\developer\samples\imsample\" />
        <File Name="IMSample.vcxproj" Source="..\..\developer\samples\imsample\" />
        <File Name="imsample.kmn" Source="..\..\developer\samples\imsample\" />
        <File Name="IMSample.txt" Source="..\..\developer\samples\imsample\" />
        <File Name="Makefile" Source="..\..\developer\samples\imsample\" />
        <File Name="version.rc" Source="..\..\developer\samples\imsample\" />
        <RemoveFolder Id="Samples_IMSample" On="uninstall" />
      </Component>

      <Component Guid="{1B6F5A52-1E05-4A1D-8D53-77D8EB293439}" Directory="Samples_Keyboards">
        <RegistryValue KeyPath="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer\Samples" Type="string" Name="Keyboards" Value="" />
        <File Id="enhlao.bmp" Name="enhlao.bmp" Source="..\..\developer\samples\Examples\" />
        <File Id="enhlao.kmn" Name="enhlao.kmn" Source="..\..\developer\samples\Examples\" />
        <File Id="Examples.kpj" Name="Examples.kpj" Source="..\..\developer\samples\Examples\" />
        <File Id="ipamenu.kmn" Name="ipamenu.kmn" Source="..\..\developer\samples\Examples\" />
        <File Id="nepali.kmn" Name="nepali.kmn" Source="..\..\developer\samples\Examples\" />
        <File Id="qfrench.ico" Name="qfrench.ico" Source="..\..\developer\samples\Examples\" />
        <File Id="qfrench.kmn" Name="qfrench.kmn" Source="..\..\developer\samples\Examples\" />
        <File Id="sk_readme.txt" Name="readme.txt" Source="..\..\developer\samples\Examples\" />
        <RemoveFolder Id="Samples_Keyboards" On="uninstall" />
      </Component>
      
      <Component Guid="{4B72D2E9-D8F4-4C41-81DF-CBDF0CE9C97F}" Directory="Samples_Keyboards_European">
        <RegistryValue KeyPath="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer\Samples" Type="string" Name="European" Value="" />
        <File Id="ske_european.bmp" Name="european.bmp" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_european.kmn" Name="european.kmn" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_european.kps" Name="european.kps" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_readme.html" Name="readme.html" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_welcome.htm" Name="welcome.htm" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_european.html" Name="european.html" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_european_js_2.txt" Name="european_js_2.txt" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_latin.ico" Name="latin.ico" Source="..\..\developer\samples\Examples\European\" />
        <RemoveFolder Id="Samples_Keyboards_European" On="uninstall" />
      </Component>
    </ComponentGroup>

    <Feature Id="featProgram" Title="Keyman Developer Program" Description="Required program files for Keyman Developer"
             Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR" Absent="disallow">

      <ComponentGroupRef Id="KeymanDeveloperApp" />
      <ComponentGroupRef Id="FontsAndRedist" />
      <ComponentGroupRef Id="AppData" />
      <ComponentGroupRef Id="XML" />
      <ComponentGroupRef Id="CEF" />
      <ComponentGroupRef Id="Templates" />
      <ComponentGroupRef Id="ModelCompiler" />
      <ComponentGroupRef Id="Node" />
      
      <MergeRef Id='keymanengine' />
    </Feature>

    <Feature Id="featSamples" Title="Sample Files" Description="Example keyboards, packages and products"
             Display="expand" Level="1" Absent="allow">
      <ComponentGroupRef Id="Samples" />
    </Feature>

    <Media Id="1" EmbedCab="yes" CompressionLevel="high" Cabinet="Data1.cab" VolumeLabel="DISK1" />

    <UIRef Id="WixUI_FeatureTree"/>

    <Icon Id="TIKE.ico" SourceFile="..\..\global\res\90\developer\KeymanDeveloper90.ico" />
    <Icon Id="samples.ico" SourceFile="..\..\global\res\ico\samples.ico" />

    <CustomAction Id='AlreadyUpdated' Error='[ProductName] has already been updated to $(var.VERSION) or newer.' />
    <CustomAction Id='NoDowngrade' Error='A later version of [ProductName] is already installed.' />

    <Property Id='OLDINSTALLDIR'>
      <RegistrySearch Id='productinstalldir' Key='Software\Keyman\Keyman Developer' Root='HKLM' Name='root path' Type='raw' />
    </Property>

    <CustomAction Id='LocateInstallDir' Execute='immediate' Directory='INSTALLDIR' Value='[OLDINSTALLDIR]' />

		<!-- I1165 - Uninstall failure on Win9x (n.a. for Keyman Developer but cleanup anyway) -->
    <CustomAction Id='CachedInstallDir' Property='CachedInstallDir' Value='[ProgramFilesFolder]\Keyman\Cached Installer Files\[ProductCode]' />
    <CustomAction Id='CachedInstallDirParent' Property='CachedInstallDirParent' Value='[ProgramFilesFolder]\Keyman\Cached Installer Files' />

    <InstallExecuteSequence>
      <Custom Action='LocateInstallDir' After='CostFinalize'>VERSION11FOUND</Custom>

      <Custom Action='CachedInstallDir' After='CostFinalize' />
      <Custom Action='CachedInstallDirParent' After='CostFinalize' />

      <RemoveExistingProducts After='InstallValidate'>VERSION8FOUND or VERSION9FOUND or VERSION10FOUND or VERSION11FOUND or OLDERFOUND</RemoveExistingProducts><!--I2839-->
      
      <Custom Action='AlreadyUpdated' After='FindRelatedProducts'>CURRENTVERSIONFOUND</Custom>
      <Custom Action='NoDowngrade' After='AlreadyUpdated'>NEWERFOUND</Custom>
    </InstallExecuteSequence>

  </Product>
</Wix><commit_msg>[Developer] Add scripts to installer<commit_after>﻿<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*"
           UpgradeCode="{E99A1F1E-7046-44F9-89EF-D3A59F84B209}" Manufacturer="SIL International"
           Name="Keyman Developer $(var.RELEASE)" Version="$(var.VERSION)" Language="1033">
    <Package Keywords="Keyman,Keyboard,Engine" Compressed="yes"
             Description="Keyman Developer $(var.RELEASE)" Comments="Contact:  Your local administrator"
             Manufacturer="SIL International" InstallerVersion="200" Platform="x86" Languages="1033" SummaryCodepage="1252" />

    <!-- Upgrade from Developer 7.0 -->
    <!-- ProductID for 7.0 = {5889CA65-3E9F-445b-A22F-9277A0FB43C6} -->
    <Upgrade Id="FF590D53-075C-45a4-89C2-EC7BA4E1ECD4">
      <UpgradeVersion OnlyDetect="no" Minimum="7.0.213.0" IncludeMinimum="yes"
                      Maximum="8.0.314.0" IncludeMaximum="no" MigrateFeatures="yes" Property="OLDERFOUND" />
    </Upgrade>

    <!-- Upgrade from Developer 8.0 -->

    <Upgrade Id="490D8B83-276E-4434-B1EA-30713F7916C7">
      <UpgradeVersion OnlyDetect="no" Minimum="8.0.314.0" IncludeMinimum="yes"
                      Maximum="9.0.507.0" IncludeMaximum="yes" MigrateFeatures="yes" Property="VERSION8FOUND" />
        <!-- bug in Developer 9.0 installer means 9.0.507.0 and earlier are treated as 8.x -->
    </Upgrade>

    <!-- Upgrade from Developer 9.0 -->

    <Upgrade Id="E0159651-CEA3-46CF-ACD7-0B0330C1B547">
      <UpgradeVersion OnlyDetect="no" Minimum="9.0.507.1" IncludeMinimum="yes"
                      Maximum="10.0.699.0" IncludeMaximum="no" MigrateFeatures="yes" Property="VERSION9FOUND" />
    </Upgrade>

    <!-- Upgrade from Developer 10.0 or later versions -->

    <Upgrade Id="7B78D2C8-31EC-4B0C-8D7F-650418A4686E">
      <UpgradeVersion OnlyDetect="no" Minimum="10.0.0.0" IncludeMinimum="yes"
                      Maximum="172.16.17.32" IncludeMaximum="no" MigrateFeatures="yes" Property="VERSION10FOUND" />
    </Upgrade>

    <!-- Upgrade from Developer 11.0 or later versions -->

    <Upgrade Id="{E99A1F1E-7046-44F9-89EF-D3A59F84B209}">
      <UpgradeVersion OnlyDetect="no" Minimum="172.16.17.32" IncludeMinimum="yes"
                      Maximum="$(var.VERSION)" IncludeMaximum="no" MigrateFeatures="yes" Property="VERSION11FOUND" />
      <UpgradeVersion OnlyDetect="yes" Minimum="$(var.VERSION)" IncludeMinimum="yes"
                      Maximum="$(var.VERSION)" IncludeMaximum="yes" Property="CURRENTVERSIONFOUND" />
      <UpgradeVersion OnlyDetect="yes" Minimum="$(var.VERSION)" IncludeMinimum="no" Property="NEWERFOUND" />
    </Upgrade>

    <Property Id="ALLUSERS"><![CDATA[1]]></Property>

    <Condition Message="Keyman Developer requires Windows 7 or later"><![CDATA[Installed OR (VersionNT >= 601)]]></Condition>

    <Directory Id='TARGETDIR' Name='SourceDir' DiskId='1'>

      <Merge Id="keymanengine" Language='1033' SourceFile='..\..\engine\inst\keymanengine.msm' DiskId='1' />

      <Directory Id="ProgramFilesFolder" Name="PFiles">
        <Directory Id="KeymanRoot" Name="Keyman">
          <Directory Id="KEYMANDEV" Name="Keyman Developer">
            <Directory Id="INSTALLDIR" Name="." FileSource="..\..\..\bin\developer\">
              <Directory Id="dirRedist" Name="Redist">
                <Directory Id="dirRedistSetup" Name="Setup" />
              </Directory>
              <Directory Id="dirNode" Name="node.js" />
              <Directory Id="dirProjects" Name="Projects" />
            </Directory>
          </Directory>
        </Directory>
      </Directory>

      <Directory Id="FontsFolder" />

      <Directory Id="ProgramMenuFolder">
        <Directory Id="ProgramMenuDir" Name="Keyman Developer" />
      </Directory>

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

      <Directory Id="AppDataFolder">
        <Directory Id="App_KeymanRoot" Name="Keyman" >
          <Directory Id="App_KeymanDev" Name="Keyman Developer">
            <Directory Id="App_KeymanDev_Databases" Name="Databases" />
          </Directory>
        </Directory>
      </Directory>

      <Directory Id="PersonalFolder" Name="Documents">
        <Directory Id="KMDevSamples" Name="Keyman Developer">
          <Directory Id="Samples" Name="Samples">
            <!-- TODO: start sourcing samples from keyboards repository. European keyboard sample here is very outdated -->
            <Directory Id="Samples_IMSample" Name="imsample"  />
            <Directory Id="Samples_Keyboards" Name="Keyboards">
              <Directory Id="Samples_Keyboards_European" Name="European" />
            </Directory>
          </Directory>
        </Directory>
      </Directory>
    </Directory>

    <ComponentGroup Id="KeymanDeveloperApp" Source="..\..\..\bin\developer\" Directory="INSTALLDIR">
      <Component>
        <File Name="tike.exe" KeyPath="yes" Vital='yes'>
          <Shortcut Id="startmenuTIKE" Advertise="yes" Directory="ProgramMenuDir" Name="Keyman Developer" WorkingDirectory='INSTALLDIR' Icon="TIKE.ico" IconIndex="0" />
          <Shortcut Id="desktopTIKE" Advertise="yes" Directory="DesktopFolder" Name="Keyman Developer" WorkingDirectory='INSTALLDIR' Icon="TIKE.ico" IconIndex="0" />
        </File>

        <Environment Id="PATH" Name="PATH" Value="[INSTALLDIR]" Permanent="no" Part="last" Action="set" System="yes" />

        <RemoveFile Id="excmagic.log" On="uninstall" Name="excmagic.log" />
        <RegistryKey ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" Root="HKLM" Key="Software\Keyman\Keyman Developer" />

        <RegistryValue Root="HKLM" Key="SOFTWARE\Keyman\Keyman Developer" Name="root path" Type="string" Value="[INSTALLDIR]" />
        <RegistryValue Root="HKLM" Key="SOFTWARE\Keyman\Keyman Engine\Installed Products" Name="developer_pro" Type="string" Value="developer_pro" />
        <RegistryValue Root="HKLM" Key="SOFTWARE\Keyman\Keyman Engine\Installed Products\developer_pro" Name="product id" Type="integer" Value="4" />

        <Environment Id="environmentKeymanDeveloperPath" Action="set" Name="KeymanDeveloperPath" System="yes" Value="[INSTALLDIR]" />

        <RemoveFile Id="CachedInstallDirFiles" Property="CachedInstallDir" On="uninstall" Name="*" />
        <RemoveFolder Id="CachedInstallDir" Property="CachedInstallDir" On="uninstall" />
        <RemoveFolder Id="CachedInstallDirParent" Property="CachedInstallDirParent" On="uninstall" />

        <RegistryValue Root="HKCR" Key=".kmn" Type="string" Value="KeymanDeveloper.File.Keyboard" />
        <RegistryValue Root="HKCR" Key=".kps" Type="string" Value="KeymanDeveloper.File.Package" />
        <RegistryValue Root="HKCR" Key=".kct" Type="string" Value="KeymanDeveloper.File.Branding" />
        <RegistryValue Root="HKCR" Key=".kpp" Type="string" Value="KeymanDeveloper.File.Distribution" />

        <RegistryValue Root="HKCR" Key=".kvks" Type="string" Value="KeymanDeveloper.File.OnScreenKeyboard" />
        <RegistryValue Root="HKCR" Key=".kpj" Type="string" Value="KeymanDeveloper.File.Project" />

        <RegistryValue Root="HKCR" Key=".kmx" Type="string" Value="Keyman.File.Keyboard" />
        <RegistryValue Root="HKCR" Key=".kmp" Type="string" Value="Keyman.File.Package" />
        <RegistryValue Root="HKCR" Key=".kvk" Type="string" Value="Keyman.File.OnScreenKeyboard" />

        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Keyboard" Type="string" Value="Keyman Developer Keyboard Source File" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Keyboard\DefaultIcon" Type="string" Value="[#tike.exe],1" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Keyboard\Shell" Type="string" Value="edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Keyboard\Shell\edit" Type="string" Value="&amp;Edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Keyboard\Shell\edit\Command" Type="string" Value='"[#tike.exe]" "%1"' />

        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Package" Type="string" Value="Keyman Developer Package Source File" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Package\DefaultIcon" Type="string" Value="[#tike.exe],2" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Package\Shell" Type="string" Value="edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Package\Shell\edit" Type="string" Value="&amp;Edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Package\Shell\edit\Command" Type="string" Value='"[#tike.exe]" "%1"' />

        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Branding" Type="string" Value="Keyman Developer Branding Source File" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Branding\DefaultIcon" Type="string" Value="[#tike.exe],3" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Branding\Shell" Type="string" Value="edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Branding\Shell\edit" Type="string" Value="&amp;Edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Branding\Shell\edit\Command" Type="string" Value='"[#tike.exe]" "%1"' />

        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Distribution" Type="string" Value="Keyman Developer Distribution Source File" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Distribution\DefaultIcon" Type="string" Value="[#tike.exe],4" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Distribution\Shell" Type="string" Value="edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Distribution\Shell\edit" Type="string" Value="&amp;Edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Distribution\Shell\edit\Command" Type="string" Value='"[#tike.exe]" "%1"' />

        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Project" Type="string" Value="Keyman Developer Project Source File" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Project\DefaultIcon" Type="string" Value="[#tike.exe],5" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Project\Shell" Type="string" Value="open" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Project\Shell\open" Type="string" Value="&amp;Open" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.Project\Shell\open\Command" Type="string" Value='"[#tike.exe]" "%1"' />

        <RegistryValue Root="HKCR" Key="Keyman.File.Keyboard" Type="string" Value="Keyman Keyboard File" />
        <RegistryValue Root="HKCR" Key="Keyman.File.Keyboard\DefaultIcon" Type="string" Value="[#tike.exe],6" />

        <RegistryValue Root="HKCR" Key="Keyman.File.Package" Type="string" Value="Keyman Package File" />
        <RegistryValue Root="HKCR" Key="Keyman.File.Package\DefaultIcon" Type="string" Value="[#tike.exe],7" />

        <RegistryValue Root="HKCR" Key="Keyman.File.OnScreenKeyboard" Type="string" Value="Keyman Keyboard File" />
        <RegistryValue Root="HKCR" Key="Keyman.File.OnScreenKeyboard\DefaultIcon" Type="string" Value="[#tike.exe],10" />
        <RegistryValue Root="HKCR" Key="Keyman.File.OnScreenKeyboard\Shell" Type="string" Value="edit" />
        <RegistryValue Root="HKCR" Key="Keyman.File.OnScreenKeyboard\Shell\edit" Type="string" Value="&amp;Edit" />
        <RegistryValue Root="HKCR" Key="Keyman.File.OnScreenKeyboard\Shell\edit\Command" Type="string" Value='"[#tike.exe]" "%1"' />

        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.OnScreenKeyboard" Type="string" Value="Keyman Developer On Screen Keyboard File" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.OnScreenKeyboard\DefaultIcon" Type="string" Value="[#tike.exe],11" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.OnScreenKeyboard\Shell" Type="string" Value="edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.OnScreenKeyboard\Shell\edit" Type="string" Value="&amp;Edit" />
        <RegistryValue Root="HKCR" Key="KeymanDeveloper.File.OnScreenKeyboard\Shell\edit\Command" Type="string" Value='"[#tike.exe]" "%1"' />
      </Component>

      <Component>
        <File Name="kmcomp.exe" KeyPath="yes" />
      </Component>

      <Component>
        <File Name="kmconvert.exe" KeyPath="yes" />
      </Component>

      <Component>
        <File Name="kmcmpdll.dll" KeyPath="yes" />
      </Component>

      <Component>
        <File Name="debughost.kmx" KeyPath="yes" Source="..\..\developer\tike\redist\debughost.kmx" />
      </Component>

      <Component>
        <File Name="keyboard_info.distribution.json" Source="..\..\global\inst\data\keyboard_info\" KeyPath="yes" />
      </Component>

      <Component>
        <File Name="keyboard_info.source.json" Source="..\..\global\inst\data\keyboard_info\" KeyPath="yes" />
      </Component>

      <!-- Data Files -->

      <Component>
        <File Name="unicodedata.mdb" Source="..\..\global\inst\data\" KeyPath="yes" />
      </Component>

      <Component>
        <File Name="unicodedata.txt" Source="..\..\..\..\resources\standards-data\unicode-character-database\" KeyPath="yes" />
      </Component>

      <Component>
        <File Name="blocks.txt" Source="..\..\..\..\resources\standards-data\unicode-character-database\" KeyPath="yes" />
      </Component>
    </ComponentGroup>

    <ComponentGroup Id="FontsAndRedist" Source="..\..\developer\inst\fonts\">

      <!-- Fonts -->

      <Component Directory="FontsFolder">
        <File Name="code2000.ttf" TrueType="yes" KeyPath="yes" />
      </Component>

      <Component Directory="FontsFolder">
        <File Name="code2001.ttf" TrueType="yes" KeyPath="yes" />
      </Component>

      <Component Directory="FontsFolder">
        <File Name="code2002.ttf" TrueType="yes" KeyPath="yes" />
      </Component>

      <Component Directory="FontsFolder">
        <File Name='keymanweb-osk.ttf' TrueType='yes' Source='..\..\developer\tike\xml\layoutbuilder\keymanweb-osk.ttf' KeyPath="yes" />
      </Component>

      <!-- Redistributable files -->

      <Component Directory="dirRedistSetup">
        <File Name="setup.exe" Source="..\..\..\bin\desktop\setup.exe" KeyPath="yes" />
      </Component>

    </ComponentGroup>

    <ComponentGroup Id="Node">
      <Component Directory="dirNode">
        <File Name='node.exe' KeyPath="yes" Source="..\..\..\..\developer\inst\dist\node.exe" />
        <File Name='CHANGELOG.md' Source="..\..\..\..\developer\inst\dist\CHANGELOG.md" />
        <File Name='LICENSE' Source="..\..\..\..\developer\inst\dist\LICENSE" />
        <File Name='README.md' Source="..\..\..\..\developer\inst\dist\README.md" />
      </Component>

      <Component Directory="INSTALLDIR">
        <File Name='kmlmc.cmd' KeyPath="yes" Source="..\..\..\..\developer\inst\kmlmc.cmd" />
        <File Name='kmlmi.cmd' Source="..\..\..\..\developer\inst\kmlmi.cmd" />
        <File Name='kmlmp.cmd' Source="..\..\..\..\developer\inst\kmlmp.cmd" />
      </Component>
    </ComponentGroup>

    <ComponentGroup Id="AppData">
      <Component Id="AppDataRemovals" Guid="{780C99E9-E97E-4EB0-BBF5-D4591EEABA7C}" Directory="App_KeymanDev_Databases">
        <RegistryValue KeyPath="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer" Name="root path" Type="string" Value="[INSTALLDIR]" />
        <RegistryKey ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer" />
        <RemoveFolder Id="AD_Uninstall" On="uninstall" Directory="App_KeymanRoot" />
        <RemoveFolder Id="AD_KeymanDev_Uninstall" On="uninstall" Directory="App_KeymanDev" />
        <RemoveFolder Id="AD_KeymanDev_Databases_Uninstall" On="uninstall" Directory="App_KeymanDev_Databases" />
        <RemoveFolder Id="ProgramMenuDir" Directory="ProgramMenuDir" On="uninstall" />
        <RemoveFile Id="AD_KeymanDev_Databases_Uninstall_F" Directory="App_KeymanDev_Databases" On="uninstall"  Name="*.mdb" />
      </Component>
    </ComponentGroup>

    <ComponentGroup Id="Samples">
      <Component Guid="{BC44DD9F-F91B-4DB8-B792-CA5744FE5990}" Directory="Samples">
        <RegistryValue KeyPath="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer\Samples" Type="string" Name="Readme" Value="" />
        <File Name="readme.txt" Source="..\..\developer\samples\readme.txt" />
        <RemoveFolder Id="Samples" On="uninstall" />
        <RemoveFolder Id="KMDevSamples" Directory="KMDevSamples" On="uninstall" />
      </Component>

      <Component Directory="Samples">
        <RegistryValue KeyPath="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer\Samples" Type="string" Name="Link" Value="" />
        <CreateFolder>
          <Shortcut Id="startmenuSamples" Directory="ProgramMenuDir" Name="Samples"
            WorkingDirectory='INSTALLDIR' Icon="samples.ico" IconIndex="0" />
        </CreateFolder>
      </Component>

      <Component Guid="{003288A1-C6BE-4EE0-A91A-AD9C82A6DEE1}" Directory="Samples_IMSample">
        <RegistryValue KeyPath="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer\Samples" Type="string" Name="IMSample" Value="" />
        <File Name="imsample.dll" Source="..\..\..\bin\developer\imsample.dll" />
        <File Name="imdllref.rtf" Source="..\..\developer\samples\imsample\" />
        <File Name="imlib.cpp" Source="..\..\developer\samples\imsample\" />
        <File Name="imlib.h" Source="..\..\developer\samples\imsample\" />
        <File Name="imsample.cpp" Source="..\..\developer\samples\imsample\" />
        <File Name="imsample.def" Source="..\..\developer\samples\imsample\" />
        <File Name="IMSample.sln" Source="..\..\developer\samples\imsample\" />
        <File Name="IMSample.vcxproj" Source="..\..\developer\samples\imsample\" />
        <File Name="imsample.kmn" Source="..\..\developer\samples\imsample\" />
        <File Name="IMSample.txt" Source="..\..\developer\samples\imsample\" />
        <File Name="Makefile" Source="..\..\developer\samples\imsample\" />
        <File Name="version.rc" Source="..\..\developer\samples\imsample\" />
        <RemoveFolder Id="Samples_IMSample" On="uninstall" />
      </Component>

      <Component Guid="{1B6F5A52-1E05-4A1D-8D53-77D8EB293439}" Directory="Samples_Keyboards">
        <RegistryValue KeyPath="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer\Samples" Type="string" Name="Keyboards" Value="" />
        <File Id="enhlao.bmp" Name="enhlao.bmp" Source="..\..\developer\samples\Examples\" />
        <File Id="enhlao.kmn" Name="enhlao.kmn" Source="..\..\developer\samples\Examples\" />
        <File Id="Examples.kpj" Name="Examples.kpj" Source="..\..\developer\samples\Examples\" />
        <File Id="ipamenu.kmn" Name="ipamenu.kmn" Source="..\..\developer\samples\Examples\" />
        <File Id="nepali.kmn" Name="nepali.kmn" Source="..\..\developer\samples\Examples\" />
        <File Id="qfrench.ico" Name="qfrench.ico" Source="..\..\developer\samples\Examples\" />
        <File Id="qfrench.kmn" Name="qfrench.kmn" Source="..\..\developer\samples\Examples\" />
        <File Id="sk_readme.txt" Name="readme.txt" Source="..\..\developer\samples\Examples\" />
        <RemoveFolder Id="Samples_Keyboards" On="uninstall" />
      </Component>

      <Component Guid="{4B72D2E9-D8F4-4C41-81DF-CBDF0CE9C97F}" Directory="Samples_Keyboards_European">
        <RegistryValue KeyPath="yes" Root="HKCU" Key="Software\Keyman\Keyman Developer\Samples" Type="string" Name="European" Value="" />
        <File Id="ske_european.bmp" Name="european.bmp" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_european.kmn" Name="european.kmn" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_european.kps" Name="european.kps" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_readme.html" Name="readme.html" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_welcome.htm" Name="welcome.htm" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_european.html" Name="european.html" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_european_js_2.txt" Name="european_js_2.txt" Source="..\..\developer\samples\Examples\European\" />
        <File Id="ske_latin.ico" Name="latin.ico" Source="..\..\developer\samples\Examples\European\" />
        <RemoveFolder Id="Samples_Keyboards_European" On="uninstall" />
      </Component>
    </ComponentGroup>

    <Feature Id="featProgram" Title="Keyman Developer Program" Description="Required program files for Keyman Developer"
             Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR" Absent="disallow">

      <ComponentGroupRef Id="KeymanDeveloperApp" />
      <ComponentGroupRef Id="FontsAndRedist" />
      <ComponentGroupRef Id="AppData" />
      <ComponentGroupRef Id="XML" />
      <ComponentGroupRef Id="CEF" />
      <ComponentGroupRef Id="Templates" />
      <ComponentGroupRef Id="ModelCompiler" />
      <ComponentGroupRef Id="Node" />

      <MergeRef Id='keymanengine' />
    </Feature>

    <Feature Id="featSamples" Title="Sample Files" Description="Example keyboards, packages and products"
             Display="expand" Level="1" Absent="allow">
      <ComponentGroupRef Id="Samples" />
    </Feature>

    <Media Id="1" EmbedCab="yes" CompressionLevel="high" Cabinet="Data1.cab" VolumeLabel="DISK1" />

    <UIRef Id="WixUI_FeatureTree"/>

    <Icon Id="TIKE.ico" SourceFile="..\..\global\res\90\developer\KeymanDeveloper90.ico" />
    <Icon Id="samples.ico" SourceFile="..\..\global\res\ico\samples.ico" />

    <CustomAction Id='AlreadyUpdated' Error='[ProductName] has already been updated to $(var.VERSION) or newer.' />
    <CustomAction Id='NoDowngrade' Error='A later version of [ProductName] is already installed.' />

    <Property Id='OLDINSTALLDIR'>
      <RegistrySearch Id='productinstalldir' Key='Software\Keyman\Keyman Developer' Root='HKLM' Name='root path' Type='raw' />
    </Property>

    <CustomAction Id='LocateInstallDir' Execute='immediate' Directory='INSTALLDIR' Value='[OLDINSTALLDIR]' />

		<!-- I1165 - Uninstall failure on Win9x (n.a. for Keyman Developer but cleanup anyway) -->
    <CustomAction Id='CachedInstallDir' Property='CachedInstallDir' Value='[ProgramFilesFolder]\Keyman\Cached Installer Files\[ProductCode]' />
    <CustomAction Id='CachedInstallDirParent' Property='CachedInstallDirParent' Value='[ProgramFilesFolder]\Keyman\Cached Installer Files' />

    <InstallExecuteSequence>
      <Custom Action='LocateInstallDir' After='CostFinalize'>VERSION11FOUND</Custom>

      <Custom Action='CachedInstallDir' After='CostFinalize' />
      <Custom Action='CachedInstallDirParent' After='CostFinalize' />

      <RemoveExistingProducts After='InstallValidate'>VERSION8FOUND or VERSION9FOUND or VERSION10FOUND or VERSION11FOUND or OLDERFOUND</RemoveExistingProducts><!--I2839-->

      <Custom Action='AlreadyUpdated' After='FindRelatedProducts'>CURRENTVERSIONFOUND</Custom>
      <Custom Action='NoDowngrade' After='AlreadyUpdated'>NEWERFOUND</Custom>
    </InstallExecuteSequence>

  </Product>
</Wix>
{'fraction_non_alphanumeric': 0.17311257707066788, 'fraction_numerical': 0.018152028629327813, 'mean_word_length': 3.658264711789516, 'pattern_counts': {'":': 0, '<': 613, '<?xml version=': 2, '>': 615, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 8, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 151, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2871668', 'n_tokens_mistral': 15717, 'n_tokens_neox': 13899, 'n_words': 2285}