2016-06-28 01:26:57 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2017-02-23 21:59:20 +00:00
|
|
|
<PropertyGroup>
|
|
|
|
<PkgIntermediateDirectory>$(IntermediateDirectory)/pkgs/$(SdkVersion)</PkgIntermediateDirectory>
|
|
|
|
|
|
|
|
<!-- Properties for pkg build -->
|
|
|
|
<SharedHostComponentId>com.microsoft.dotnet.sharedhost.$(SharedHostVersion).component.osx.x64</SharedHostComponentId>
|
|
|
|
<HostFxrComponentId>com.microsoft.dotnet.hostfxr.$(HostFxrVersion).component.osx.x64</HostFxrComponentId>
|
2017-12-07 21:23:27 +00:00
|
|
|
<SharedFrameworkComponentId>com.microsoft.dotnet.sharedframework.$(SharedFrameworkNugetName).$(MicrosoftNETCoreAppPackageVersion).component.osx.x64</SharedFrameworkComponentId>
|
2017-02-23 21:59:20 +00:00
|
|
|
<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>
|
2017-07-27 06:10:48 +00:00
|
|
|
<SdkPkgScriptTemplateFile>$(SdkPkgScriptsDirectory)/postinstall</SdkPkgScriptTemplateFile>
|
|
|
|
<SdkPkgDestinationScriptsDirectory>$(PkgIntermediateDirectory)/scripts</SdkPkgDestinationScriptsDirectory>
|
|
|
|
<SdkPkgScriptFile>$(SdkPkgDestinationScriptsDirectory)/postinstall</SdkPkgScriptFile>
|
2017-02-23 21:59:20 +00:00
|
|
|
<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>
|
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<Target Name="SetupPkgInputsOutputs">
|
|
|
|
<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>
|
2017-07-27 06:10:48 +00:00
|
|
|
|
|
|
|
<PostInstallScriptReplacement Include="%SDK_VERSION%">
|
|
|
|
<ReplacementString>$(SdkVersion)</ReplacementString>
|
|
|
|
</PostInstallScriptReplacement>
|
2017-04-06 20:43:26 +00:00
|
|
|
</ItemGroup>
|
2017-02-28 18:16:52 +00:00
|
|
|
|
|
|
|
<!-- Consumed By Publish -->
|
|
|
|
<ItemGroup>
|
|
|
|
<GeneratedInstallers Include="$(SdkInstallerFile);$(CombinedFrameworkSdkHostInstallerFile)" />
|
|
|
|
</ItemGroup>
|
2016-06-29 23:21:46 +00:00
|
|
|
|
2016-07-01 14:04:40 +00:00
|
|
|
<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)/**/*" />
|
2017-04-06 20:43:26 +00:00
|
|
|
</ItemGroup>
|
2016-06-29 23:21:46 +00:00
|
|
|
</Target>
|
|
|
|
|
2016-07-26 04:29:59 +00:00
|
|
|
<Target Name="GenerateSdkPkg"
|
2016-07-01 14:04:40 +00:00
|
|
|
Inputs="@(GenerateSdkPkgInputs)"
|
2016-06-29 23:21:46 +00:00
|
|
|
Outputs="$(SdkInstallerFile)"
|
|
|
|
DependsOnTargets="Init;Layout;SetupPkgInputsOutputs"
|
2016-07-01 14:04:40 +00:00
|
|
|
Condition=" '$(OSName)' == 'osx' ">
|
2016-07-26 04:29:59 +00:00
|
|
|
|
2017-05-04 00:55:34 +00:00
|
|
|
<Copy SourceFiles="@(AspNetRuntimeFilesInput)"
|
|
|
|
DestinationFiles="@(AspNetRuntimeFilesInput->'$(SdkLayoutOutputDirectory)/%(RecursiveDir)%(FileName)%(Extension)')" />
|
2017-05-04 00:37:24 +00:00
|
|
|
|
2017-07-27 06:10:48 +00:00
|
|
|
<ReplaceFileContents
|
|
|
|
InputFile="$(SdkPkgScriptTemplateFile)"
|
|
|
|
DestinationFile="$(SdkPkgScriptFile)"
|
|
|
|
ReplacementPatterns="@(PostInstallScriptReplacement -> '%(Identity)')"
|
|
|
|
ReplacementStrings="@(PostInstallScriptReplacement -> '%(ReplacementString)')" />
|
|
|
|
|
|
|
|
<Chmod
|
|
|
|
Glob="$(SdkPkgScriptFile)"
|
|
|
|
Mode="ugo+x" />
|
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<Exec Command="pkgbuild
|
|
|
|
--root '$(SdkLayoutOutputDirectory)'
|
|
|
|
--identifier '$(SdkComponentId)'
|
|
|
|
--version '$(SdkVersion)'
|
|
|
|
--install-location '$(PkgInstallDirectory)'
|
2017-07-27 06:10:48 +00:00
|
|
|
--scripts '$(SdkPkgDestinationScriptsDirectory)'
|
2016-06-29 23:21:46 +00:00
|
|
|
'$(SdkInstallerFile)'" />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="GenerateSdkProductArchive"
|
2016-07-01 14:04:40 +00:00
|
|
|
Inputs="@(GenerateSdkProductArchiveInputs)"
|
2016-06-29 23:21:46 +00:00
|
|
|
Outputs="$(CombinedFrameworkSdkHostInstallerFile)"
|
|
|
|
DependsOnTargets="GenerateSdkPkg"
|
2016-07-01 14:04:40 +00:00
|
|
|
Condition=" '$(OSName)' == 'osx' ">
|
2017-04-06 20:43:26 +00:00
|
|
|
<ItemGroup>
|
|
|
|
<PkgComponentsSourceFiles Include="$(SdkInstallerFile);
|
|
|
|
$(DownloadedSharedFrameworkInstallerFile);
|
|
|
|
$(DownloadedHostFxrInstallerFile);
|
|
|
|
$(DownloadedSharedHostInstallerFile)" />
|
|
|
|
<PkgComponentsDestinationFiles Include="$(SdkPkgIntermediatePath);
|
|
|
|
$(SharedFrameworkPkgIntermediatePath);
|
|
|
|
$(HostFxrPkgIntermediatePath);
|
|
|
|
$(SharedHostPkgIntermediatePath)" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<!-- Move ProductArchive pkg components into place with component ids in the filenames -->
|
2017-04-06 20:43:26 +00:00
|
|
|
<Copy SourceFiles="@(PkgComponentsSourceFiles)" DestinationFiles="@(PkgComponentsDestinationFiles)" />
|
2016-07-26 04:29:59 +00:00
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<!-- Fill out parameters in the Distribution Template -->
|
|
|
|
<ReplaceFileContents
|
|
|
|
InputFile="$(SdkProductArchiveDistributionTemplateFile)"
|
|
|
|
DestinationFile="$(SdkProductArchiveDistributionFile)"
|
|
|
|
ReplacementPatterns="@(DistributionTemplateReplacement -> '%(Identity)')"
|
|
|
|
ReplacementStrings="@(DistributionTemplateReplacement -> '%(ReplacementString)')" />
|
2016-07-26 04:29:59 +00:00
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<Exec Command="productbuild
|
|
|
|
--version '$(SdkVersion)'
|
|
|
|
--identifier '$(SdkProductArchiveId)'
|
|
|
|
--package-path '$(PkgIntermediateDirectory)'
|
2016-07-01 14:04:40 +00:00
|
|
|
--resources '$(SdkProductArchiveResourcesDirectory)'
|
2016-06-29 23:21:46 +00:00
|
|
|
--distribution '$(SdkProductArchiveDistributionFile)'
|
|
|
|
'$(CombinedFrameworkSdkHostInstallerFile)'" />
|
2016-06-28 01:26:57 +00:00
|
|
|
</Target>
|
|
|
|
|
2016-07-26 04:29:59 +00:00
|
|
|
<Target Name="GeneratePkgs"
|
2016-06-29 23:21:46 +00:00
|
|
|
DependsOnTargets="Init;
|
|
|
|
Layout;
|
|
|
|
SetupPkgInputsOutputs;
|
|
|
|
GenerateSdkPkg;
|
|
|
|
GenerateSdkProductArchive"
|
2016-07-01 14:04:40 +00:00
|
|
|
Condition=" '$(OSName)' == 'osx' " />
|
2016-06-29 23:21:46 +00:00
|
|
|
|
2016-06-28 01:26:57 +00:00
|
|
|
</Project>
|