<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi' xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
  <!--
    OpenVox Agent Specific Registry Entries
    This overrides the generic file in the vanagon directory
  -->
  <Fragment>
    <!-- These shortcuts will be created in the INSTALLDIR/bin directory -->
    <DirectoryRef Id='INSTALLDIR'>
      <Directory Id="ShortCutBinDir" Name="bin">
      </Directory>
    </DirectoryRef>

    <!-- Directory Definitions for Start Menu Shortcuts -->
    <DirectoryRef Id='TARGETDIR'>
      <Directory Id='ProgramMenuFolder'>
        <Directory Id='PuppetShortcutDir' Name="<%= settings[:pl_product_id] %>">
          <Directory Id='PuppetShortcutDocumentationDir' Name="Documentation">
          </Directory>
        </Directory>
      </Directory>
    </DirectoryRef>

    <ComponentGroup Id="ShortCutsComponentGroup">

      <Component
        Id="PuppetShortcuts"
        Guid="0B69C3FF-8967-4F8A-AC71-0EAE34E91ACC"
        Directory="PuppetShortcutDir"
        Win64="<%= settings[:win64] %>">
        <Shortcut
          Id="PuppetShortcut"
          Name="Run Puppet Agent"
          Description="Run Puppet in an interactive command window"
          Target="[INSTALLDIR]bin\run_puppet_interactive.bat"
          Icon="PuppetShortcutIcon"
          WorkingDirectory="bin">
          <Icon
            Id="PuppetShortcutIcon"
            SourceFile="wix\icon\voxpupuli.ico"/>
        </Shortcut>
        <Shortcut
          Id="FacterShortcut"
          Name="Run Facter"
          Description="Run Facter in an interactive command window"
          Target="[INSTALLDIR]bin\run_facter_interactive.bat"
          Icon="FacterShortcutIcon"
          WorkingDirectory="bin">
          <Icon
            Id="FacterShortcutIcon"
            SourceFile="wix\icon\voxpupuli.ico"/>
        </Shortcut>
        <Shortcut
          Id="PuppetShellShortcut"
          Name="Start Command Prompt with Puppet"
          Description="Start a Command Prompt with Puppet already in the PATH and RUBYLIB load path."
          Target="[%ComSpec]"
          Arguments='/E:ON /K "[INSTALLDIR]bin\puppet_shell.bat"'
          Icon="PuppetShellShortcutIcon"
          WorkingDirectory="APPDATADIR">
          <Icon
            Id="PuppetShellShortcutIcon"
            SourceFile="wix\icon\voxpupuli.ico"/>
        </Shortcut>
        <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
        <!-- This registry entry is required to be a keypath for this component -->
        <RegistryValue
          Root="HKCU"
          Key="SOFTWARE\<%= settings[:pl_company_name] %>\<%= settings[:pl_product_id] %>"
          Name="installed"
          Value="1"
          Type="integer"
          KeyPath="yes" />
      </Component>

      <Component
        Id="PuppetDocumentationShortcuts"
        Guid="651178BC-76D8-4574-B97B-B132064EE2FB"
        Directory="PuppetShortcutDocumentationDir"
        Win64="<%= settings[:win64] %>">
        <IniFile
          Id="PuppetSupportURL"
          Name="Get <%= settings[:product_name] %> Support.url"
          Action="addLine"
          Section="InternetShortcut"
          Key="URL"
          Value="<%= settings[:links][:HelpLink] %>"
          Directory="PuppetShortcutDocumentationDir" />
        <IniFile
          Id="PuppetCommunityURL"
          Name="Explore the OpenVox Community.url"
          Action="addLine"
          Section="InternetShortcut"
          Key="URL"
          Value="<%= settings[:links][:CommunityLink] %>"
          Directory="PuppetShortcutDocumentationDir" />
        <IniFile
          Id="PuppetNextStepURL"
          Name="<%= settings[:product_name] %> First Steps.url"
          Action="addLine"
          Section="InternetShortcut"
          Key="URL"
          Value="<%= settings[:links][:NextStepLink] %>"
          Directory="PuppetShortcutDocumentationDir" />
        <IniFile
          Id="PuppetManualURL"
          Name="<%= settings[:product_name] %> Manual.url"
          Action="addLine"
          Section="InternetShortcut"
          Key="URL"
          Value="<%= settings[:links][:ManualLink] %>"
          Directory="PuppetShortcutDocumentationDir" />
        <IniFile
          Id="PuppetForgeURL"
          Name="Puppet Forge.url"
          Action="addLine"
          Section="InternetShortcut"
          Key="URL"
          Value="<%= settings[:links][:ForgeLink] %>"
          Directory="PuppetShortcutDocumentationDir" />
        <CreateFolder />
        <RemoveFolder
          Id="PuppetShortcutDocumentationDir"
          On="uninstall"/>
        <RegistryValue
          Root="HKCU"
          Key="SOFTWARE\<%= settings[:pl_company_name] %>\<%= settings[:pl_product_id] %>\Documentation"
          Name="installed"
          Value="1"
          Type="integer"
          KeyPath="yes" />
      </Component>

    </ComponentGroup>
  </Fragment>
</Wix>
