<commit_before><Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">

  <!--
    ================================================================================
      Note: $(Platform) is the PROJECT platform, not the SOLUTION platform. If
            building in Visual Studio, this won't detect amd64 unless your build
            configuration sets the x64 platform for MinionMSI, or
            you set TargetPlatform as a project variable in Visual Studio somewhere.
    ================================================================================
  -->
  <PropertyGroup>
    <!-- 
    An msi can only be for 32 or 64 bit.
    What to call "32 or 64 bit" depends on the context.
    There is Platform, TargetPlatform and InstallerPlatform. We ignore ProcessorArchitecture, which is unset.
    The msi is created as 32 or 64 bit by the candle -arch [x86|x64] parameter.
    It seems that the InstallerPlatform property triggers the candle -arch parameter.
    It seems silly that I must set TargetPlatform from InstallerPlatform.
    -->
    <TargetPlatform Condition="'$(TargetPlatform)'=='' AND '$(Platform)'=='x86'">win32</TargetPlatform>
    <TargetPlatform Condition="'$(TargetPlatform)'=='' AND '$(Platform)'=='x64'">amd64</TargetPlatform>
    <InstallerPlatform Condition="'$(TargetPlatform)'=='win32'">x86</InstallerPlatform>
    <InstallerPlatform Condition="'$(TargetPlatform)'=='amd64'">x64</InstallerPlatform>

    <BuildEnv Condition="'$(BuildEnv)'==''">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\..\..\..\salt\pkg\windows\buildenv'))</BuildEnv>
    <DefineConstants>$(DefineConstants);dist=$(BuildEnv);TargetPlatform=$(TargetPlatform)</DefineConstants>
    <BUILD_NUMBER Condition="'$(BUILD_NUMBER)'==''">0</BUILD_NUMBER>
  </PropertyGroup>

  <!--
    ================================================================================
       setVersionProperties

        Regarding DisplayVersion and InternalVersion:
        These msbuild variables are sent to WiX by in two different manners:
           Output PropertyName
           DefineConstants magic

        Rewrites the output TargetName with the discovered version information.

    ================================================================================
  -->
  <Target Name="setVersionProperties">

    <Message Text="  ****************** msbuild.d/Minion.Common.targets ***************************   "/>

    <Error Condition="'$(DisplayVersion)'==''"  Text="DisplayVersion must be set" />
    <Error Condition="'$(InternalVersion)'==''" Text="InternalVersion must be set" />

    <Message Text="  ******************  MSBuildProjectDirectory = $(MSBuildProjectDirectory)"/>
    <Message Text="  ******************           TargetPlatform = $(TargetPlatform)"/>
    <Message Text="  ******************        InstallerPlatform = $(InstallerPlatform)"/>
    <Message Text="  ******************            Configuration = $(Configuration)"/>    
    <Message Text="  ******************           TargetPlatform = $(TargetPlatform)"/>
    <Message Text="  ******************           DisplayVersion = $(DisplayVersion)"/>
    <Message Text="  ******************          InternalVersion = $(InternalVersion)"/>
    <Message Text="  ******************                  Version = $(Version)"/>
    <Message Text="  ******************            PythonVersion = $(PythonVersion)"/>

    <!-- This is to prevent insane combinations of TargetPlatform and InstallerPlatform -->
    <!-- BEWARE This is not WiX, this is msbuild -->
    <!-- BEWARE msbuild demands paranthesis for and and or -->
    <!-- KEEP THE LINK TO THE MSBuild Conditions syntax  https://msdn.microsoft.com/en-us/library/7szfhaft.aspx -->

    <Error Condition="!(('$(TargetPlatform)'=='win32' and '$(InstallerPlatform)'=='x86')
                     or ('$(TargetPlatform)'=='amd64' and '$(InstallerPlatform)'=='x64'))"
           Text="TargetPlatform $(TargetPlatform) and InstallerPlatform $(InstallerPlatform) do not match" />

    <!-- This is where the file base-name of the msi is set -->
    <PropertyGroup>
      <DefineConstants>$(DefineConstants);DisplayVersion=$(DisplayVersion);InternalVersion=$(InternalVersion)</DefineConstants>
      <TargetName Condition="'$(TargetPlatform)'=='win32'">Salt-Minion-$(DisplayVersion)-Py$(PythonVersion)-32bit</TargetName>
      <TargetName Condition="'$(TargetPlatform)'=='amd64'">Salt-Minion-$(DisplayVersion)-Py$(PythonVersion)-64bit</TargetName>
    </PropertyGroup>
  </Target>

  <!--
    ================================================================================
       DistContent

         Build the list of files in $(BuildEnv). This runs every time as the output
         is necessary for other targets.

         [OUT]
         @(DistContent) - an ITaskItem[] containing all the extracted dist files.
    ================================================================================
  -->
  <Target Name="DistContent" DependsOnTargets="setVersionProperties" Outputs="@(DistContent)">
    <Message Text="Looking for distribution content in $([System.IO.Path]::GetFullPath('$(BuildEnv)'))"/>
    <ItemGroup>
      <DistContent Include="$(BuildEnv)\**\*.*" />
    </ItemGroup>
  </Target>

</Project><commit_msg>Name the MSI installer the same as the NSIS installer<commit_after><Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">

  <!--
    ================================================================================
      Note: $(Platform) is the PROJECT platform, not the SOLUTION platform. If
            building in Visual Studio, this won't detect amd64 unless your build
            configuration sets the x64 platform for MinionMSI, or
            you set TargetPlatform as a project variable in Visual Studio somewhere.
    ================================================================================
  -->
  <PropertyGroup>
    <!-- 
    An msi can only be for 32 or 64 bit.
    What to call "32 or 64 bit" depends on the context.
    There is Platform, TargetPlatform and InstallerPlatform. We ignore ProcessorArchitecture, which is unset.
    The msi is created as 32 or 64 bit by the candle -arch [x86|x64] parameter.
    It seems that the InstallerPlatform property triggers the candle -arch parameter.
    It seems silly that I must set TargetPlatform from InstallerPlatform.
    -->
    <TargetPlatform Condition="'$(TargetPlatform)'=='' AND '$(Platform)'=='x86'">win32</TargetPlatform>
    <TargetPlatform Condition="'$(TargetPlatform)'=='' AND '$(Platform)'=='x64'">amd64</TargetPlatform>
    <InstallerPlatform Condition="'$(TargetPlatform)'=='win32'">x86</InstallerPlatform>
    <InstallerPlatform Condition="'$(TargetPlatform)'=='amd64'">x64</InstallerPlatform>

    <BuildEnv Condition="'$(BuildEnv)'==''">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\..\..\..\salt\pkg\windows\buildenv'))</BuildEnv>
    <DefineConstants>$(DefineConstants);dist=$(BuildEnv);TargetPlatform=$(TargetPlatform)</DefineConstants>
    <BUILD_NUMBER Condition="'$(BUILD_NUMBER)'==''">0</BUILD_NUMBER>
  </PropertyGroup>

  <!--
    ================================================================================
       setVersionProperties

        Regarding DisplayVersion and InternalVersion:
        These msbuild variables are sent to WiX by in two different manners:
           Output PropertyName
           DefineConstants magic

        Rewrites the output TargetName with the discovered version information.

    ================================================================================
  -->
  <Target Name="setVersionProperties">

    <Message Text="  ****************** msbuild.d/Minion.Common.targets ***************************   "/>

    <Error Condition="'$(DisplayVersion)'==''"  Text="DisplayVersion must be set" />
    <Error Condition="'$(InternalVersion)'==''" Text="InternalVersion must be set" />

    <Message Text="  ******************  MSBuildProjectDirectory = $(MSBuildProjectDirectory)"/>
    <Message Text="  ******************           TargetPlatform = $(TargetPlatform)"/>
    <Message Text="  ******************        InstallerPlatform = $(InstallerPlatform)"/>
    <Message Text="  ******************            Configuration = $(Configuration)"/>    
    <Message Text="  ******************           TargetPlatform = $(TargetPlatform)"/>
    <Message Text="  ******************           DisplayVersion = $(DisplayVersion)"/>
    <Message Text="  ******************          InternalVersion = $(InternalVersion)"/>
    <Message Text="  ******************                  Version = $(Version)"/>
    <Message Text="  ******************            PythonVersion = $(PythonVersion)"/>

    <!-- This is to prevent insane combinations of TargetPlatform and InstallerPlatform -->
    <!-- BEWARE This is not WiX, this is msbuild -->
    <!-- BEWARE msbuild demands paranthesis for and and or -->
    <!-- KEEP THE LINK TO THE MSBuild Conditions syntax  https://msdn.microsoft.com/en-us/library/7szfhaft.aspx -->

    <Error Condition="!(('$(TargetPlatform)'=='win32' and '$(InstallerPlatform)'=='x86')
                     or ('$(TargetPlatform)'=='amd64' and '$(InstallerPlatform)'=='x64'))"
           Text="TargetPlatform $(TargetPlatform) and InstallerPlatform $(InstallerPlatform) do not match" />

    <!-- This is where the file base-name of the msi is set -->
    <PropertyGroup>
      <DefineConstants>$(DefineConstants);DisplayVersion=$(DisplayVersion);InternalVersion=$(InternalVersion)</DefineConstants>
      <TargetName Condition="'$(TargetPlatform)'=='win32'">Salt-Minion-$(DisplayVersion)-Py$(PythonVersion)-x86-Setup</TargetName>
      <TargetName Condition="'$(TargetPlatform)'=='amd64'">Salt-Minion-$(DisplayVersion)-Py$(PythonVersion)-AMD64-Setup</TargetName>
    </PropertyGroup>
  </Target>

  <!--
    ================================================================================
       DistContent

         Build the list of files in $(BuildEnv). This runs every time as the output
         is necessary for other targets.

         [OUT]
         @(DistContent) - an ITaskItem[] containing all the extracted dist files.
    ================================================================================
  -->
  <Target Name="DistContent" DependsOnTargets="setVersionProperties" Outputs="@(DistContent)">
    <Message Text="Looking for distribution content in $([System.IO.Path]::GetFullPath('$(BuildEnv)'))"/>
    <ItemGroup>
      <DistContent Include="$(BuildEnv)\**\*.*" />
    </ItemGroup>
  </Target>

</Project>
{'fraction_non_alphanumeric': 0.2521640948438088, 'fraction_numerical': 0.011479111780203237, 'mean_word_length': 4.1347826086956525, 'pattern_counts': {'":': 0, '<': 115, '<?xml version=': 0, '>': 115, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5301472', 'n_tokens_mistral': 2746, 'n_tokens_neox': 2404, 'n_words': 672}