<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildThisFileDirectory)/LinuxDistrosNativeInstaller.props" />

  <Target Name="BuildAndPublishAllLinuxDistrosNativeInstallers" DependsOnTargets="Prepare;Compile;SetBuildingAndPublishingProps;RunAllSandBoxAndPackage;MultiPublish" />


  <Target Name="RunAllSandBoxAndPackage" >
      <MSBuild Projects="$(MSBuildThisFileDirectory)/SandBoxAndPackageInParallel.proj"
      Targets="RunInSandBoxAndPackage"
            Properties="RepoRoot=$(RepoRoot);
            BuildConfiguration=$(BuildConfiguration);
            InstallerOutputDirectory=$(InstallerOutputDirectory);
            " />
  </Target>

  <Target Name="MultiPublish" DependsOnTargets="AddAllGeneratedInstaller;PublishWithoutPackage" />

  <Target Name="AddAllGeneratedInstaller">
    <ItemGroup>
      <GeneratedInstallers Include="$(InstallerOutputDirectory)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid)%(LinuxDistrosNeedNativeInstaller.DistroNameInInstaller).%(LinuxDistrosNeedNativeInstaller.InstallerExtension)" />
    </ItemGroup>
  </Target>

  <Target Name="SetBuildingAndPublishingProps">
    <PropertyGroup>
      <IsBuildingAndPublishingAllLinuxDistrosNativeInstallers>true</IsBuildingAndPublishingAllLinuxDistrosNativeInstallers>
    </PropertyGroup>
  </Target>
</Project>