5ebc6a1ceb
* Eliminate CleanPublishOutput * Decompose Crossgen Task * WiP * TarGzFileExtractToDirectory * FixModeFlags --> CHMod Also various eliminations of dead code * Tasks cleanup Move all tasks to .tasks file. There is little value in keepint them in each source file as they are already being used assumptively by files that happen to get executed later. Also eliminating uses of <Exec> for DotNet invocations * Move to BuildTools implementation of TarGzCreateFromDirectory * Eliminate Command.cs and helpers * Remove dead code * Revert TarGz from BuildTools Latest build tools package has not picked up the task, though it is checked in. * Disable ChMod on Windows * Windows bug fix * PR Feedback * Finish changing Chmod caps
136 lines
7.6 KiB
XML
136 lines
7.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<Target Name="SetupPkgInputsOutputs">
|
|
<PropertyGroup>
|
|
<InstallerOutputDirectory>$(PackagesDirectory)</InstallerOutputDirectory>
|
|
<PkgIntermediateDirectory>$(IntermediateDirectory)/pkgs/$(SdkVersion)</PkgIntermediateDirectory>
|
|
|
|
<SdkInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkInstallerFile>
|
|
<CombinedFrameworkSdkHostInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostInstallerFile>
|
|
|
|
<!-- Properties for pkg build -->
|
|
<SharedHostComponentId>com.microsoft.dotnet.sharedhost.component.osx.x64</SharedHostComponentId>
|
|
<HostFxrComponentId>com.microsoft.dotnet.hostfxr.component.osx.x64</HostFxrComponentId>
|
|
<SharedFrameworkComponentId>com.microsoft.dotnet.sharedframework.$(SharedFrameworkNugetName).$(SharedFrameworkVersion).component.osx.x64</SharedFrameworkComponentId>
|
|
<SdkComponentId>com.microsoft.dotnet.dev.$(SdkVersion).component.osx.x64</SdkComponentId>
|
|
<SdkProductArchiveId>com.microsoft.dotnet.dev.$(SdkVersion).osx.x64</SdkProductArchiveId>
|
|
|
|
<PkgInstallDirectory>/usr/local/share/dotnet</PkgInstallDirectory>
|
|
|
|
<SdkPkgSourcesRootDirectory>$(RepoRoot)/packaging/osx/clisdk</SdkPkgSourcesRootDirectory>
|
|
<SdkPkgScriptsDirectory>$(SdkPkgSourcesRootDirectory)/scripts</SdkPkgScriptsDirectory>
|
|
<SdkProductArchiveResourcesDirectory>$(SdkPkgSourcesRootDirectory)/resources</SdkProductArchiveResourcesDirectory>
|
|
|
|
<SdkProductArchiveDistributionTemplateFile>$(SdkPkgSourcesRootDirectory)/Distribution-Template</SdkProductArchiveDistributionTemplateFile>
|
|
<SdkProductArchiveDistributionFile>$(PkgIntermediateDirectory)/CLI-SDK-Formatted-Distribution-Template.xml</SdkProductArchiveDistributionFile>
|
|
|
|
<SdkPkgIntermediatePath>$(PkgIntermediateDirectory)/$(SdkComponentId).pkg</SdkPkgIntermediatePath>
|
|
<SharedFrameworkPkgIntermediatePath>$(PkgIntermediateDirectory)/$(SharedFrameworkComponentId).pkg</SharedFrameworkPkgIntermediatePath>
|
|
<SharedHostPkgIntermediatePath>$(PkgIntermediateDirectory)/$(SharedHostComponentId).pkg</SharedHostPkgIntermediatePath>
|
|
<HostFxrPkgIntermediatePath>$(PkgIntermediateDirectory)/$(HostFxrComponentId).pkg</HostFxrPkgIntermediatePath>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<DistributionTemplateReplacement Include="{SharedFxComponentId}">
|
|
<ReplacementString>$(SharedFrameworkComponentId)</ReplacementString>
|
|
</DistributionTemplateReplacement>
|
|
<DistributionTemplateReplacement Include="{SharedHostComponentId}">
|
|
<ReplacementString>$(SharedHostComponentId)</ReplacementString>
|
|
</DistributionTemplateReplacement>
|
|
<DistributionTemplateReplacement Include="{HostFxrComponentId}">
|
|
<ReplacementString>$(HostFxrComponentId)</ReplacementString>
|
|
</DistributionTemplateReplacement>
|
|
<DistributionTemplateReplacement Include="{CLISdkComponentId}">
|
|
<ReplacementString>$(SdkComponentId)</ReplacementString>
|
|
</DistributionTemplateReplacement>
|
|
<DistributionTemplateReplacement Include="{CLISdkNugetVersion}">
|
|
<ReplacementString>$(SdkVersion)</ReplacementString>
|
|
</DistributionTemplateReplacement>
|
|
<DistributionTemplateReplacement Include="{CLISdkBrandName}">
|
|
<ReplacementString>$(SdkBrandName)</ReplacementString>
|
|
</DistributionTemplateReplacement>
|
|
<DistributionTemplateReplacement Include="{SharedFxBrandName}">
|
|
<ReplacementString>$(SharedFrameworkBrandName)</ReplacementString>
|
|
</DistributionTemplateReplacement>
|
|
<DistributionTemplateReplacement Include="{SharedHostBrandName}">
|
|
<ReplacementString>$(SharedHostBrandName)</ReplacementString>
|
|
</DistributionTemplateReplacement>
|
|
<DistributionTemplateReplacement Include="{HostFxrBrandName}">
|
|
<ReplacementString>$(HostFxrBrandName)</ReplacementString>
|
|
</DistributionTemplateReplacement>
|
|
</ItemGroup>
|
|
|
|
<!-- Consumed By Publish -->
|
|
<ItemGroup>
|
|
<GeneratedInstallers Include="$(SdkInstallerFile);$(CombinedFrameworkSdkHostInstallerFile)" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<GenerateSdkPkgInputs Include="$(SdkLayoutOutputDirectory)/**/*" />
|
|
<GenerateSdkPkgInputs Include="$(SdkPkgScriptsDirectory)/**/*" />
|
|
|
|
<GenerateSdkProductArchiveInputs Include="$(SdkInstallerFile)" />
|
|
<GenerateSdkProductArchiveInputs Include="$(DownloadedSharedFrameworkInstallerFile)" />
|
|
<GenerateSdkProductArchiveInputs Include="$(DownloadedHostFxrInstallerFile)" />
|
|
<GenerateSdkProductArchiveInputs Include="$(DownloadedSharedHostInstallerFile)" />
|
|
<GenerateSdkProductArchiveInputs Include="$(SdkProductArchiveDistributionTemplateFile)" />
|
|
<GenerateSdkProductArchiveInputs Include="$(SdkProductArchiveResourcesDirectory)/**/*" />
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
<Target Name="GenerateSdkPkg"
|
|
Inputs="@(GenerateSdkPkgInputs)"
|
|
Outputs="$(SdkInstallerFile)"
|
|
DependsOnTargets="Init;Layout;SetupPkgInputsOutputs"
|
|
Condition=" '$(OSName)' == 'osx' ">
|
|
|
|
<Exec Command="pkgbuild
|
|
--root '$(SdkLayoutOutputDirectory)'
|
|
--identifier '$(SdkComponentId)'
|
|
--version '$(SdkVersion)'
|
|
--install-location '$(PkgInstallDirectory)'
|
|
--scripts '$(SdkPkgScriptsDirectory)'
|
|
'$(SdkInstallerFile)'" />
|
|
</Target>
|
|
|
|
<Target Name="GenerateSdkProductArchive"
|
|
Inputs="@(GenerateSdkProductArchiveInputs)"
|
|
Outputs="$(CombinedFrameworkSdkHostInstallerFile)"
|
|
DependsOnTargets="GenerateSdkPkg"
|
|
Condition=" '$(OSName)' == 'osx' ">
|
|
<!-- Move ProductArchive pkg components into place with component ids in the filenames -->
|
|
<Copy
|
|
SourceFiles="$(SdkInstallerFile);
|
|
$(DownloadedSharedFrameworkInstallerFile);
|
|
$(DownloadedHostFxrInstallerFile);
|
|
$(DownloadedSharedHostInstallerFile);"
|
|
DestinationFiles="$(SdkPkgIntermediatePath);
|
|
$(SharedFrameworkPkgIntermediatePath);
|
|
$(HostFxrPkgIntermediatePath);
|
|
$(SharedHostPkgIntermediatePath);" />
|
|
|
|
<!-- Fill out parameters in the Distribution Template -->
|
|
<ReplaceFileContents
|
|
InputFile="$(SdkProductArchiveDistributionTemplateFile)"
|
|
DestinationFile="$(SdkProductArchiveDistributionFile)"
|
|
ReplacementPatterns="@(DistributionTemplateReplacement -> '%(Identity)')"
|
|
ReplacementStrings="@(DistributionTemplateReplacement -> '%(ReplacementString)')" />
|
|
|
|
<Exec Command="productbuild
|
|
--version '$(SdkVersion)'
|
|
--identifier '$(SdkProductArchiveId)'
|
|
--package-path '$(PkgIntermediateDirectory)'
|
|
--resources '$(SdkProductArchiveResourcesDirectory)'
|
|
--distribution '$(SdkProductArchiveDistributionFile)'
|
|
'$(CombinedFrameworkSdkHostInstallerFile)'" />
|
|
</Target>
|
|
|
|
<Target Name="GeneratePkgs"
|
|
DependsOnTargets="Init;
|
|
Layout;
|
|
SetupPkgInputsOutputs;
|
|
GenerateSdkPkg;
|
|
GenerateSdkProductArchive"
|
|
Condition=" '$(OSName)' == 'osx' " />
|
|
|
|
</Project>
|