<commit_before><?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
  <?include PythonToolsInstallerVars.wxi ?>

  <Product Id="$(var.InstallerGuid)" Name="$(var.ProductName)" Language="1033" Version="$(var.MsiVersion)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.InstallerUpgradeGuid)">
    <Package InstallerVersion="300" Compressed="yes"  />   

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

    <!-- Properties that we need to search for -->

    <!-- By default we install for all users, users can change this -->
    <Property Id="ALLUSERS" Value="1"/>
    
    <!-- we detect other installed software (IronPython, HPC pack) and set the install level of the feature to 2 if they're not installed to uncheck them by default.  -->
    <Property Id="INSTALLLEVEL" Value="1"/>
    <Property Id="ApplicationFolderName" Value="Python Tools for Visual Studio" />

    <Property Id="IPYTOOLS_INSTALLED">
      <ComponentSearch Id="Comp_VSTools" Guid="2DF41B37-FAEF-4FD8-A2F5-46B57FF9E951" Type="file" />
    </Property>

    <Property Id="IPY_INSTALLED">
      <ComponentSearch Id="Comp_Core.B25C469D_12C7_4327_AEF1_B2D3505E115E" Guid="655DFFDE-C66A-4650-8369-5447CFC1942F" Type="file" />
    </Property>

    <?include ..\InstallPath.wxi ?>
    
    <Property Id="VSLAUNCHER" >
        <DirectorySearch Path="[ProgramFilesFolder]\Common Files\Microsoft Shared\MSEnv" Depth="4" Id="FindVSLauncher">
            <FileSearch Name="VSLauncher.exe" />
        </DirectorySearch>
    </Property>

    <Property Id="DEVENV_PATH">
      <RegistrySearch Id="DevEnvPath" Root="HKLM" Key="Software\Microsoft\VisualStudio\$(var.VSTargetVersion)\Setup\VS" Name="EnvironmentPath" Type="file" />
    </Property>

    <Property Id="HPC_CLIENT_INSTALLED">
      <ComponentSearch Id="SchedUtil" Guid="4BC84A98-B96A-4564-8BD7-11CE7340DA3B" Type="file" />
    </Property>

    <Property Id="PYTHONFILETYPE" Value="Python.File">
      <RegistrySearch Id="PythonFileTypeSearch" Root="HKCR" Key=".py" Type="raw" />
    </Property>

    <Property Id="PYTHONFILETYPENODEFAULT" >
      <!-- Same thing as PYTHONFILETYPE but used to decide if we should install the default info for the file type -->
      <RegistrySearch Id="PythonFileTypeNoDefaultSearch" Root="HKCR" Key=".py" Type="raw" />
    </Property>

    <!-- Conditions for install -->
    
    <Condition Message="The IronPython Tools feature of IronPython 2.7 must be uninstalled.  Python Tools replaces IronPython Tools and supports all the same features and more.">NOT IPYTOOLS_INSTALLED OR REMOVE ~= "ALL"</Condition>
  <?if "$(var.VSTargetVersion)" = "10.0" ?>
    <Condition Message="Visual Studio 2010 must be installed.  The free integrated shell can be downloaded at http://www.microsoft.com/downloads/en/details.aspx?FamilyID=8e5aa7b6-8436-43f0-b778-00c3bca733d3"> VSINSTALLPATH OR (NOT VSINSTALLPATH AND INSTALLED) </Condition>
  <?else?>
    <Condition Message="Visual Studio Dev11 must be installed."> VSINSTALLPATH OR (NOT VSINSTALLPATH AND INSTALLED) </Condition>
  <?endif ?>
    
    <!-- Files/Components/MSMs to install -->
    
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder" Name="PFILES">
        <!-- Read me in Program Files\Python Tools for Visual Studio -->
        
        <Directory Id="APPLICATIONFOLDER" Name="[ApplicationFolderName]"  FileSource="$(var.TargetDir)">
          <Component Id="Comp_InstallDirItems" DiskId="1" Guid="F0C653EF-F90B-4C63-8AC6-7B1EC8F044A4">
              <File Id="File_License.html" Name="License.html" Source="$(var.PyToolsDir)\License.html" />
              <RegistryValue Root='HKCU' Key='SOFTWARE\Microsoft\PythonTools' Type='string' Value='Readme' KeyPath='yes' />
              
              <RemoveFolder Id='Comp_InstallDirItems' On='uninstall'/>
          </Component>
        
          <!-- Edit with Visual Studio context menu -->
          <Component Id="Comp_PyFileRegistration" DiskId="1" Guid="86592E35-864B-43D8-8E7E-E00F01EA0B6E">
            <RegistryKey Root='HKCR' Key='[PYTHONFILETYPE]'>
              <RegistryValue Type='string' Value='Python source file' />

              <RegistryKey Key='DefaultIcon'>
                <RegistryValue Type='string' Value="[VSINSTALLPATH]\Extensions\Microsoft\Python Tools for Visual Studio\1.1\PythonFile.ico" />
              </RegistryKey>
              
              <RegistryKey Key='shell\Edit with Visual Studio'>
                <RegistryValue Key='Command' Type='string' Value='[VSINSTALLPATH]devenv.exe /dde "%1"' />

                <RegistryValue Key='ddeexec' Type='string' Value='Open("%1")' />
                <RegistryValue Key='ddeexec\Application' Type='string' Value='VisualStudio.$(var.VSTargetVersion)' />
                <RegistryValue Key='ddeexec\Topic' Type='string' Value='system' />
              </RegistryKey>
            </RegistryKey>
          </Component>

          <!-- Double click to open with Visual Studio context menu -->
          <Component Id="Comp_PyFileExistance" DiskId="1" Guid="C63701DE-61D0-4C6E-877D-7717735EF737">
            <!-- This is only installed if .py is not already registered.  -->
            <RegistryValue Root='HKCR' Key='.py' Type='string' Value='[PYTHONFILETYPE]' />
            <RegistryValue Root='HKCR' Key='.py' Name='Content Type' Type='string' Value='text/plain' />
          </Component>
                  
        </Directory>
      </Directory>

      <!-- Install the tools into the VS directory -->
      <Directory Id="EXTENSION_INSTALLPATH">
        <Merge Id="ReplWindow" Language="1033" SourceFile="$(var.TargetDir)ReplWindow.msm" DiskId="1" />
        <Merge Id="PythonProfiler" Language="1033" SourceFile="$(var.TargetDir)PythonProfiler.msm" DiskId="1" />
        <Merge Id="PythonTools" Language="1033" SourceFile="$(var.TargetDir)PythonTools.msm" DiskId="1" />
        <Merge Id="PythonHpc" Language="1033" SourceFile="$(var.TargetDir)PythonHpcSupportMsm.msm" DiskId="1" />
        <Merge Id="IronPythonInterpreter" Language="1033" SourceFile="$(var.TargetDir)IronPythonInterpreterMsm.msm" DiskId="1" />

        <Component Id="Comp_PyProgRegistration" DiskId="1" Guid="933CFC77-F315-4058-AB16-AE737B31B2F8">
          <RegistryValue Root='HKCR' Key='.pyproj' Type='string' Name='PerceivedType' Value='text' />
          <RegistryValue Root='HKCR' Key='VisualStudio.Launcher.pyproj.$(var.VSTargetVersion)\DefaultIcon' Type='string' Value='[VSINSTALLPATH]\Extensions\Microsoft\Python Tools for Visual Studio\1.1\PythonProject.ico' />

          <ProgId Id="VisualStudio.Launcher.pyproj.$(var.VSTargetVersion)" Description="Python Project">
            <Extension Id="pyproj" ContentType="text/plain">
              <Verb Id="Open" Command="Open" TargetProperty="VSLAUNCHER" Argument="&quot;%1&quot;"/>
            </Extension>
          </ProgId>
        </Component>
        
        
      </Directory>
    </Directory>

    <!-- Features to install -->
    
    <Feature Id="ProductFeature" Title="Python Tools for Visual Studio" Description="Python Tools for Visual Studio"
             Display="expand" Level="1" AllowAdvertise="no" Absent="disallow"  >
      <ComponentRef Id="Comp_InstallDirItems" Primary="yes" />
      <ComponentRef Id="Comp_PyProgRegistration" Primary="yes" />
      
      <MergeRef Id="PythonTools"/>
      <MergeRef Id="ReplWindow"/>
      <MergeRef Id="PythonProfiler"/>
      
      <Feature Id="Feature_WinHpc" AllowAdvertise="no" Level="1" Title="Windows HPC Support" Description="Windows HPC Support">
        <Condition Level="2">NOT HPC_CLIENT_INSTALLED</Condition>
        <MergeRef Id="PythonHpc"/>
      </Feature>
      
      <Feature Id="Feature_IronPython" AllowAdvertise="no" Level="1" Title="IronPython support" Description="IronPython support">
        <Condition Level="2">NOT IPY_INSTALLED</Condition>
        <MergeRef Id="IronPythonInterpreter"/>
      </Feature>
      
      <Feature Id="Feature_VsPyFile" AllowAdvertise="no" Level="1" Title="Register .py context menu." Description="Adds a Edit with Visual Studio context menu for .py files">
        <ComponentRef Id="Comp_PyFileRegistration" />
        <Feature Id="Feature_PyFileExist" AllowAdvertise="no" Level="0" Title="Register .py with Visual Studio if not already registered">
          <Condition Level="1">NOT PYTHONFILETYPENODEFAULT</Condition>
          <ComponentRef Id="Comp_PyFileExistance" Primary="yes" /><commit_msg>Bug 686 - IronPython not picked up if installed after PTVS 	Removes the check to see if Ipy is installed so IronPython support is always available by default.  Users can disable it.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
  <?include PythonToolsInstallerVars.wxi ?>

  <Product Id="$(var.InstallerGuid)" Name="$(var.ProductName)" Language="1033" Version="$(var.MsiVersion)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.InstallerUpgradeGuid)">
    <Package InstallerVersion="300" Compressed="yes"  />   

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

    <!-- Properties that we need to search for -->

    <!-- By default we install for all users, users can change this -->
    <Property Id="ALLUSERS" Value="1"/>
    
    <!-- we detect other installed software (IronPython, HPC pack) and set the install level of the feature to 2 if they're not installed to uncheck them by default.  -->
    <Property Id="INSTALLLEVEL" Value="1"/>
    <Property Id="ApplicationFolderName" Value="Python Tools for Visual Studio" />

    <Property Id="IPYTOOLS_INSTALLED">
      <ComponentSearch Id="Comp_VSTools" Guid="2DF41B37-FAEF-4FD8-A2F5-46B57FF9E951" Type="file" />
    </Property>

    <?include ..\InstallPath.wxi ?>
    
    <Property Id="VSLAUNCHER" >
        <DirectorySearch Path="[ProgramFilesFolder]\Common Files\Microsoft Shared\MSEnv" Depth="4" Id="FindVSLauncher">
            <FileSearch Name="VSLauncher.exe" />
        </DirectorySearch>
    </Property>

    <Property Id="DEVENV_PATH">
      <RegistrySearch Id="DevEnvPath" Root="HKLM" Key="Software\Microsoft\VisualStudio\$(var.VSTargetVersion)\Setup\VS" Name="EnvironmentPath" Type="file" />
    </Property>

    <Property Id="HPC_CLIENT_INSTALLED">
      <ComponentSearch Id="SchedUtil" Guid="4BC84A98-B96A-4564-8BD7-11CE7340DA3B" Type="file" />
    </Property>

    <Property Id="PYTHONFILETYPE" Value="Python.File">
      <RegistrySearch Id="PythonFileTypeSearch" Root="HKCR" Key=".py" Type="raw" />
    </Property>

    <Property Id="PYTHONFILETYPENODEFAULT" >
      <!-- Same thing as PYTHONFILETYPE but used to decide if we should install the default info for the file type -->
      <RegistrySearch Id="PythonFileTypeNoDefaultSearch" Root="HKCR" Key=".py" Type="raw" />
    </Property>

    <!-- Conditions for install -->
    
    <Condition Message="The IronPython Tools feature of IronPython 2.7 must be uninstalled.  Python Tools replaces IronPython Tools and supports all the same features and more.">NOT IPYTOOLS_INSTALLED OR REMOVE ~= "ALL"</Condition>
  <?if "$(var.VSTargetVersion)" = "10.0" ?>
    <Condition Message="Visual Studio 2010 must be installed.  The free integrated shell can be downloaded at http://www.microsoft.com/downloads/en/details.aspx?FamilyID=8e5aa7b6-8436-43f0-b778-00c3bca733d3"> VSINSTALLPATH OR (NOT VSINSTALLPATH AND INSTALLED) </Condition>
  <?else?>
    <Condition Message="Visual Studio Dev11 must be installed."> VSINSTALLPATH OR (NOT VSINSTALLPATH AND INSTALLED) </Condition>
  <?endif ?>
    
    <!-- Files/Components/MSMs to install -->
    
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder" Name="PFILES">
        <!-- Read me in Program Files\Python Tools for Visual Studio -->
        
        <Directory Id="APPLICATIONFOLDER" Name="[ApplicationFolderName]"  FileSource="$(var.TargetDir)">
          <Component Id="Comp_InstallDirItems" DiskId="1" Guid="F0C653EF-F90B-4C63-8AC6-7B1EC8F044A4">
              <File Id="File_License.html" Name="License.html" Source="$(var.PyToolsDir)\License.html" />
              <RegistryValue Root='HKCU' Key='SOFTWARE\Microsoft\PythonTools' Type='string' Value='Readme' KeyPath='yes' />
              
              <RemoveFolder Id='Comp_InstallDirItems' On='uninstall'/>
          </Component>
        
          <!-- Edit with Visual Studio context menu -->
          <Component Id="Comp_PyFileRegistration" DiskId="1" Guid="86592E35-864B-43D8-8E7E-E00F01EA0B6E">
            <RegistryKey Root='HKCR' Key='[PYTHONFILETYPE]'>
              <RegistryValue Type='string' Value='Python source file' />

              <RegistryKey Key='DefaultIcon'>
                <RegistryValue Type='string' Value="[VSINSTALLPATH]\Extensions\Microsoft\Python Tools for Visual Studio\1.1\PythonFile.ico" />
              </RegistryKey>
              
              <RegistryKey Key='shell\Edit with Visual Studio'>
                <RegistryValue Key='Command' Type='string' Value='[VSINSTALLPATH]devenv.exe /dde "%1"' />

                <RegistryValue Key='ddeexec' Type='string' Value='Open("%1")' />
                <RegistryValue Key='ddeexec\Application' Type='string' Value='VisualStudio.$(var.VSTargetVersion)' />
                <RegistryValue Key='ddeexec\Topic' Type='string' Value='system' />
              </RegistryKey>
            </RegistryKey>
          </Component>

          <!-- Double click to open with Visual Studio context menu -->
          <Component Id="Comp_PyFileExistance" DiskId="1" Guid="C63701DE-61D0-4C6E-877D-7717735EF737">
            <!-- This is only installed if .py is not already registered.  -->
            <RegistryValue Root='HKCR' Key='.py' Type='string' Value='[PYTHONFILETYPE]' />
            <RegistryValue Root='HKCR' Key='.py' Name='Content Type' Type='string' Value='text/plain' />
          </Component>
                  
        </Directory>
      </Directory>

      <!-- Install the tools into the VS directory -->
      <Directory Id="EXTENSION_INSTALLPATH">
        <Merge Id="ReplWindow" Language="1033" SourceFile="$(var.TargetDir)ReplWindow.msm" DiskId="1" />
        <Merge Id="PythonProfiler" Language="1033" SourceFile="$(var.TargetDir)PythonProfiler.msm" DiskId="1" />
        <Merge Id="PythonTools" Language="1033" SourceFile="$(var.TargetDir)PythonTools.msm" DiskId="1" />
        <Merge Id="PythonHpc" Language="1033" SourceFile="$(var.TargetDir)PythonHpcSupportMsm.msm" DiskId="1" />
        <Merge Id="IronPythonInterpreter" Language="1033" SourceFile="$(var.TargetDir)IronPythonInterpreterMsm.msm" DiskId="1" />

        <Component Id="Comp_PyProgRegistration" DiskId="1" Guid="933CFC77-F315-4058-AB16-AE737B31B2F8">
          <RegistryValue Root='HKCR' Key='.pyproj' Type='string' Name='PerceivedType' Value='text' />
          <RegistryValue Root='HKCR' Key='VisualStudio.Launcher.pyproj.$(var.VSTargetVersion)\DefaultIcon' Type='string' Value='[VSINSTALLPATH]\Extensions\Microsoft\Python Tools for Visual Studio\1.1\PythonProject.ico' />

          <ProgId Id="VisualStudio.Launcher.pyproj.$(var.VSTargetVersion)" Description="Python Project">
            <Extension Id="pyproj" ContentType="text/plain">
              <Verb Id="Open" Command="Open" TargetProperty="VSLAUNCHER" Argument="&quot;%1&quot;"/>
            </Extension>
          </ProgId>
        </Component>
        
        
      </Directory>
    </Directory>

    <!-- Features to install -->
    
    <Feature Id="ProductFeature" Title="Python Tools for Visual Studio" Description="Python Tools for Visual Studio"
             Display="expand" Level="1" AllowAdvertise="no" Absent="disallow"  >
      <ComponentRef Id="Comp_InstallDirItems" Primary="yes" />
      <ComponentRef Id="Comp_PyProgRegistration" Primary="yes" />
      
      <MergeRef Id="PythonTools"/>
      <MergeRef Id="ReplWindow"/>
      <MergeRef Id="PythonProfiler"/>
      
      <Feature Id="Feature_WinHpc" AllowAdvertise="no" Level="1" Title="Windows HPC Support" Description="Windows HPC Support">
        <Condition Level="2">NOT HPC_CLIENT_INSTALLED</Condition>
        <MergeRef Id="PythonHpc"/>
      </Feature>
      
      <Feature Id="Feature_IronPython" AllowAdvertise="no" Level="1" Title="IronPython support" Description="IronPython support">
        <MergeRef Id="IronPythonInterpreter"/>
      </Feature>
      
      <Feature Id="Feature_VsPyFile" AllowAdvertise="no" Level="1" Title="Register .py context menu." Description="Adds a Edit with Visual Studio context menu for .py files">
        <ComponentRef Id="Comp_PyFileRegistration" />
        <Feature Id="Feature_PyFileExist" AllowAdvertise="no" Level="0" Title="Register .py with Visual Studio if not already registered">
          <Condition Level="1">NOT PYTHONFILETYPENODEFAULT</Condition>
          <ComponentRef Id="Comp_PyFileExistance" Primary="yes" />
{'fraction_non_alphanumeric': 0.14143075296605193, 'fraction_numerical': 0.027957241865382357, 'mean_word_length': 3.458496988740508, 'pattern_counts': {'":': 0, '<': 240, '<?xml version=': 2, '>': 240, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '678911', 'n_tokens_mistral': 5486, 'n_tokens_neox': 5004, 'n_words': 1094}