Adding the NetCoreApp and ASP.Net Targeting Packs to the native MacOS installer (#1173)

Adding the NetCoreApp and ASP.Net Targeting Packs to the native MacOS installer - PKG
* Add the ASP.Net Targeting Pack from an archive.
This commit is contained in:
John Beisner 2019-04-02 15:51:47 -07:00 committed by GitHub
parent 11f3142728
commit 4f57f8e679
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 11 deletions

View file

@ -4,11 +4,10 @@
<BuildName>cli</BuildName>
<SdkBrandName>Microsoft .NET Core SDK $(CliBrandingVersion)</SdkBrandName>
<MSBuildExtensionsBrandName>.NET Standard Support for Visual Studio 2015</MSBuildExtensionsBrandName>
<!-- TODO: "Preview" shouldn't be hardcoded in these properties -->
<SharedFrameworkBrandName>Microsoft .NET Core Runtime $(CliVersionNoSuffix) - Preview</SharedFrameworkBrandName>
<SharedHostBrandName>Microsoft .NET Core Host $(CliVersionNoSuffix) - Preview</SharedHostBrandName>
<HostFxrBrandName>Microsoft .NET Core Host FX Resolver $(CliVersionNoSuffix) - Preview</HostFxrBrandName>
<SharedFrameworkBrandName>Microsoft .NET Core Runtime $(MicrosoftNETCoreAppPackageVersion)</SharedFrameworkBrandName>
<NetCoreAppTargetingPackBrandName>Microsoft .NET Core Targeting Pack $(MicrosoftNETCoreAppPackageVersion)</NetCoreAppTargetingPackBrandName>
<SharedHostBrandName>Microsoft .NET Core Host $(MicrosoftNETCoreAppPackageVersion)</SharedHostBrandName>
<HostFxrBrandName>Microsoft .NET Core Host FX Resolver $(MicrosoftNETCoreAppPackageVersion)</HostFxrBrandName>
<SharedFrameworkName>Microsoft.NETCore.App</SharedFrameworkName>
<SharedFrameworkNugetName>$(SharedFrameworkName)</SharedFrameworkNugetName>
</PropertyGroup>

View file

@ -47,9 +47,10 @@
<!-- Note: we use the "-internal" archives and installers that contain only the aspnetcore shared framework, and shouldn't overlap with Microsoft.NETCore.App. -->
<DownloadedAspNetCoreSharedFxInstallerFileName Condition=" '$(InstallerExtension)' == '.msi' ">aspnetcore-runtime-internal-$(AspNetCoreVersion)-$(AspNetCoreSharedFxInstallerRid).wixlib</DownloadedAspNetCoreSharedFxInstallerFileName>
<DownloadedAspNetTargetingPackInstallerFileName Condition=" '$(InstallerExtension)' != '' ">aspnetcore-targeting-pack-$(AspNetTargetingPackVersion)-$(AspNetCoreSharedFxInstallerRid)$(InstallerExtension)</DownloadedAspNetTargetingPackInstallerFileName>
<!-- The AspNetTargetingPackInstallerFileName is misnamed for DEB types at this time.
https://github.com/aspnet/AspNetCore/issues/8835 when resolved, remove the 'IsDebianBaseDistro' special contitioned line below. -->
<!-- AspNet targeting pack assets have unexpected asset names for DEB and tar.gz types:
https://github.com/aspnet/AspNetCore/issues/8835 -->
<DownloadedAspNetTargetingPackInstallerFileName Condition=" '$(IsDebianBaseDistro)' == 'true' ">aspnetcore-targeting-pack-$(AspNetTargetingPackVersion)$(InstallerExtension)</DownloadedAspNetTargetingPackInstallerFileName>
<AspNetTargetingPackArchiveFileName>aspnetcore-targeting-pack-$(AspNetCoreVersion)$(ArchiveExtension)</AspNetTargetingPackArchiveFileName>
<AspNetCoreSharedFxArchiveFileName>aspnetcore-runtime-internal-$(AspNetCoreVersion)-$(AspNetCoreSharedFxArchiveRid)$(ArchiveExtension)</AspNetCoreSharedFxArchiveFileName>
<WinFormsAndWpfSharedFxArchiveFileName>dotnet-extension-$(MicrosoftWindowsDesktopPackageVersion)-$(Architecture)$(ArchiveExtension)</WinFormsAndWpfSharedFxArchiveFileName>
@ -159,15 +160,23 @@
</ItemGroup>
<ItemGroup Condition=" '$(IncludeAspNetCoreRuntime)' != 'false' ">
<BundledLayoutComponent Include="AspNetCoreSharedFxArchiveFile">
<BundledLayoutComponent Include="DownloadedAspNetCoreSharedFxArchiveFile">
<BaseUrl>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)</BaseUrl>
<DownloadFileName>$(AspNetCoreSharedFxArchiveFileName)</DownloadFileName>
<AccessToken>$(CoreSetupBlobAccessTokenParam)</AccessToken>
<RelativeLayoutPath></RelativeLayoutPath>
</BundledLayoutComponent>
<!-- The AspNetTargetingPackInstallerFile for PKG types does not exist at this time.
https://github.com/aspnet/AspNetCore/issues/8806 when resolved, change the 'Condition' below. -->
<!-- The AspNet does not provide native MacOS PKG installers at this time; we use AspNet archives.
https://github.com/aspnet/AspNetCore/issues/8806 -->
<BundledLayoutComponent Include="DownloadedAspNetTargetingPackArchiveFile"
Condition="'$(InstallerExtension)' == '.pkg' And '$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
<BaseUrl>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)</BaseUrl>
<DownloadFileName>$(AspNetTargetingPackArchiveFileName)</DownloadFileName>
<AccessToken>$(CoreSetupBlobAccessTokenParam)</AccessToken>
<RelativeLayoutPath></RelativeLayoutPath>
</BundledLayoutComponent>
<BundledInstallerComponent Include="DownloadedAspNetTargetingPackInstallerFile"
Condition="'$(InstallerExtension)' != '.pkg' And '$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
<BaseUrl>$(AspNetCoreSharedFxRootUrl)$(AspNetTargetingPackVersion)</BaseUrl>

View file

@ -7,6 +7,7 @@
<SharedHostComponentId>com.microsoft.dotnet.sharedhost.$(SharedHostVersion).component.osx.x64</SharedHostComponentId>
<HostFxrComponentId>com.microsoft.dotnet.hostfxr.$(HostFxrVersion).component.osx.x64</HostFxrComponentId>
<SharedFrameworkComponentId>com.microsoft.dotnet.sharedframework.$(SharedFrameworkNugetName).$(MicrosoftNETCoreAppPackageVersion).component.osx.x64</SharedFrameworkComponentId>
<NetCoreAppTargetingPackComponentId>com.microsoft.dotnet.pack.targeting.$(MicrosoftNETCoreAppPackageVersion).component.osx.x64</NetCoreAppTargetingPackComponentId>
<SdkComponentId>com.microsoft.dotnet.dev.$(SdkVersion).component.osx.x64</SdkComponentId>
<SdkProductArchiveId>com.microsoft.dotnet.dev.$(SdkVersion).osx.x64</SdkProductArchiveId>
@ -24,6 +25,7 @@
<SdkPkgIntermediatePath>$(PkgIntermediateDirectory)/$(SdkComponentId).pkg</SdkPkgIntermediatePath>
<SharedFrameworkPkgIntermediatePath>$(PkgIntermediateDirectory)/$(SharedFrameworkComponentId).pkg</SharedFrameworkPkgIntermediatePath>
<NetCoreAppTargetingPackPkgIntermediatePath>$(PkgIntermediateDirectory)/$(NetCoreAppTargetingPackComponentId).pkg</NetCoreAppTargetingPackPkgIntermediatePath>
<SharedHostPkgIntermediatePath>$(PkgIntermediateDirectory)/$(SharedHostComponentId).pkg</SharedHostPkgIntermediatePath>
<HostFxrPkgIntermediatePath>$(PkgIntermediateDirectory)/$(HostFxrComponentId).pkg</HostFxrPkgIntermediatePath>
@ -37,6 +39,9 @@
<DistributionTemplateReplacement Include="{SharedFxComponentId}">
<ReplacementString>$(SharedFrameworkComponentId)</ReplacementString>
</DistributionTemplateReplacement>
<DistributionTemplateReplacement Include="{NetCoreAppTargetingPackComponentId}">
<ReplacementString>$(NetCoreAppTargetingPackComponentId)</ReplacementString>
</DistributionTemplateReplacement>
<DistributionTemplateReplacement Include="{SharedHostComponentId}">
<ReplacementString>$(SharedHostComponentId)</ReplacementString>
</DistributionTemplateReplacement>
@ -55,6 +60,9 @@
<DistributionTemplateReplacement Include="{SharedFxBrandName}">
<ReplacementString>$(SharedFrameworkBrandName)</ReplacementString>
</DistributionTemplateReplacement>
<DistributionTemplateReplacement Include="{NetCoreAppTargetingPackBrandName}">
<ReplacementString>$(NetCoreAppTargetingPackBrandName)</ReplacementString>
</DistributionTemplateReplacement>
<DistributionTemplateReplacement Include="{SharedHostBrandName}">
<ReplacementString>$(SharedHostBrandName)</ReplacementString>
</DistributionTemplateReplacement>
@ -90,6 +98,7 @@
<GenerateSdkProductArchiveInputs Include="$(SdkPKGInstallerFile)" />
<GenerateSdkProductArchiveInputs Include="$(DownloadedSharedFrameworkInstallerFile)" />
<GenerateSdkProductArchiveInputs Include="$(DownloadedNetCoreAppTargetingPackInstallerFile)" />
<GenerateSdkProductArchiveInputs Include="$(DownloadedHostFxrInstallerFile)" />
<GenerateSdkProductArchiveInputs Include="$(DownloadedSharedHostInstallerFile)" />
<GenerateSdkProductArchiveInputs Include="$(SdkProductArchiveDistributionTemplateFile)" />
@ -103,9 +112,11 @@
DependsOnTargets="GenerateLayout;SetupPkgInputsOutputs"
Condition=" '$(OSName)' == 'osx' ">
<!-- Copy ASP.NET runtime to internal layout, as we don't currently chain that in with a pkg dependency -->
<!-- Copy ASP.NET runtime and targeting pack to internal layout, as we don't currently chain that in with a pkg dependency -->
<ExtractArchiveToDirectory SourceArchive="$(DownloadsFolder)$(AspNetCoreSharedFxArchiveFileName)"
DestinationDirectory="$(SdkInternalLayoutPath)" />
<ExtractArchiveToDirectory SourceArchive="$(DownloadsFolder)$(AspNetTargetingPackArchiveFileName)"
DestinationDirectory="$(SdkInternalLayoutPath)" />
<ReplaceFileContents
InputFiles="$(SdkPkgScriptTemplateFile)"
@ -140,10 +151,12 @@
<ItemGroup>
<PkgComponentsSourceFiles Include="$(SdkPKGInstallerFile);
$(DownloadsFolder)$(DownloadedSharedFrameworkInstallerFileName);
$(DownloadsFolder)$(DownloadedNetCoreAppTargetingPackInstallerFileName);
$(DownloadsFolder)$(DownloadedHostFxrInstallerFileName);
$(DownloadsFolder)$(DownloadedSharedHostInstallerFileName)" />
<PkgComponentsDestinationFiles Include="$(SdkPkgIntermediatePath);
$(SharedFrameworkPkgIntermediatePath);
$(NetCoreAppTargetingPackPkgIntermediatePath);
$(HostFxrPkgIntermediatePath);
$(SharedHostPkgIntermediatePath)" />
</ItemGroup>

View file

@ -11,11 +11,15 @@
</allowed-os-versions>
</volume-check>
<choices-outline>
<line choice="{NetCoreAppTargetingPackComponentId}.pkg" />
<line choice="{SharedFxComponentId}.pkg" />
<line choice="{HostFxrComponentId}.pkg" />
<line choice="{SharedHostComponentId}.pkg" />
<line choice="{CLISdkComponentId}.pkg"/>
</choices-outline>
<choice id="{NetCoreAppTargetingPackComponentId}.pkg" visible="true" title="{NetCoreAppTargetingPackBrandName} (x64)" description="The .NET Core Targeting Pack">
<pkg-ref id="{NetCoreAppTargetingPackComponentId}.pkg" />
</choice>
<choice id="{SharedFxComponentId}.pkg" visible="true" title="{SharedFxBrandName} (x64)" description="The .NET Core Shared Framework">
<pkg-ref id="{SharedFxComponentId}.pkg" />
</choice>
@ -28,6 +32,7 @@
<choice id="{CLISdkComponentId}.pkg" visible="true" title="{CLISdkBrandName} (x64)" description="The .NET Core SDK">
<pkg-ref id="{CLISdkComponentId}.pkg"/>
</choice>
<pkg-ref id="{NetCoreAppTargetingPackComponentId}.pkg">{NetCoreAppTargetingPackComponentId}.pkg</pkg-ref>
<pkg-ref id="{SharedFxComponentId}.pkg">{SharedFxComponentId}.pkg</pkg-ref>
<pkg-ref id="{HostFxrComponentId}.pkg">{HostFxrComponentId}.pkg</pkg-ref>
<pkg-ref id="{SharedHostComponentId}.pkg">{SharedHostComponentId}.pkg</pkg-ref>