Skip to content

Commit

Permalink
Remove references to PlatformAbstractions.
Browse files Browse the repository at this point in the history
This will allow us to remove the PlatformAbstractions library from dotnet/runtime.

Contributes to dotnet/runtime#3470
  • Loading branch information
eerhardt committed May 5, 2020
1 parent befcd2f commit b4bc7d2
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 301 deletions.
206 changes: 0 additions & 206 deletions src/core-sdk-tasks/CurrentPlatform.cs

This file was deleted.

47 changes: 0 additions & 47 deletions src/core-sdk-tasks/GetCurrentRuntimeInformation.cs

This file was deleted.

1 change: 0 additions & 1 deletion src/core-sdk-tasks/core-sdk-tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="15.7.179" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.7.179" />
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="NuGet.Versioning" Version="4.3.0" />
<PackageReference Include="System.Reflection.Metadata" Version="1.4.2" />
Expand Down
24 changes: 12 additions & 12 deletions src/redist/targets/FileExtensions.targets
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<Project>
<Target Name="SetupFileExtensions" DependsOnTargets="GetCurrentRuntimeInformation">
<PropertyGroup>
<ArchiveExtension Condition=" '$(HostOSName)' == 'win' ">.zip</ArchiveExtension>
<ArchiveExtension Condition=" '$(HostOSName)' != 'win' ">.tar.gz</ArchiveExtension>
<ArchiveExtension>.tar.gz</ArchiveExtension>
<ArchiveExtension Condition=" $([MSBuild]::IsOSPlatform('WINDOWS')) ">.zip</ArchiveExtension>

<InstallerExtension Condition=" '$(HostOSName)' == 'win' ">.msi</InstallerExtension>
<InstallerExtension Condition=" '$(HostOSName)' == 'osx' ">.pkg</InstallerExtension>
<InstallerExtension Condition=" $([MSBuild]::IsOSPlatform('WINDOWS')) ">.msi</InstallerExtension>
<InstallerExtension Condition=" $([MSBuild]::IsOSPlatform('OSX')) ">.pkg</InstallerExtension>
<InstallerExtension Condition=" '$(IsDebianBaseDistro)' == 'true' ">.deb</InstallerExtension>
<InstallerExtension Condition=" '$(IsRPMBasedDistro)' == true ">.rpm</InstallerExtension>

<BundleExtension Condition=" '$(HostOSName)' == 'win' ">.exe</BundleExtension>
<BundleExtension Condition=" '$(HostOSName)' == 'osx' ">$(InstallerExtension)</BundleExtension>
<BundleExtension Condition=" $([MSBuild]::IsOSPlatform('WINDOWS')) ">.exe</BundleExtension>
<BundleExtension Condition=" $([MSBuild]::IsOSPlatform('OSX')) ">$(InstallerExtension)</BundleExtension>
<BundleExtension Condition=" '$(IsDebianBaseDistro)' == 'true' ">$(InstallerExtension)</BundleExtension>
<BundleExtension Condition=" '$(IsRPMBasedDistro)' == true ">$(InstallerExtension)</BundleExtension>

<DynamicLibPrefix>lib</DynamicLibPrefix>
<DynamicLibPrefix Condition=" '$(HostOSName)' == 'win' "></DynamicLibPrefix>
<DynamicLibPrefix Condition=" $([MSBuild]::IsOSPlatform('WINDOWS')) "></DynamicLibPrefix>

<DynamicLibExtension>.so</DynamicLibExtension>
<DynamicLibExtension Condition=" '$(HostOSName)' == 'win' ">.dll</DynamicLibExtension>
<DynamicLibExtension Condition=" '$(HostOSName)' == 'osx' ">.dylib</DynamicLibExtension>
<DynamicLibExtension Condition=" $([MSBuild]::IsOSPlatform('WINDOWS')) ">.dll</DynamicLibExtension>
<DynamicLibExtension Condition=" $([MSBuild]::IsOSPlatform('OSX')) ">.dylib</DynamicLibExtension>

<ExeExtension>.exe</ExeExtension>
<ExeExtension Condition=" '$(OS)' != 'Windows_NT' "></ExeExtension>
<ExeExtension Condition=" !$([MSBuild]::IsOSPlatform('WINDOWS')) "></ExeExtension>

<PlatformScriptExtension Condition=" '$(OS)' == 'Windows_NT' ">.ps1</PlatformScriptExtension>
<PlatformScriptExtension Condition=" '$(OS)' != 'Windows_NT' ">.sh</PlatformScriptExtension>
<PlatformScriptExtension>.sh</PlatformScriptExtension>
<PlatformScriptExtension Condition=" $([MSBuild]::IsOSPlatform('WINDOWS')) ">.ps1</PlatformScriptExtension>

</PropertyGroup>
</Target>
Expand Down
8 changes: 4 additions & 4 deletions src/redist/targets/GenerateLayout.targets
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
<DotnetToolsetBlobRootUrl Condition="'$(DotnetToolsetBlobRootUrl)' == ''">https://dotnetfeed.blob.core.windows.net/dotnet-core/</DotnetToolsetBlobRootUrl>

<CoreSetupRid Condition="'$(CoreSetupRid)' == ''">$(HostRid)</CoreSetupRid>
<CoreSetupRid Condition=" ('$(HostOSName)' == 'win' or '$(HostOSName)' == 'osx' or '$(HostOSName)' == 'freebsd') and '$(DotNetBuildFromSource)' != 'true' ">$(HostMonikerRid)</CoreSetupRid>
<CoreSetupRid Condition=" ('$(OSName)' == 'win' or '$(OSName)' == 'osx' or '$(OSName)' == 'freebsd') and '$(DotNetBuildFromSource)' != 'true' ">$(OSName)-$(Architecture)</CoreSetupRid>

<!-- only the runtime OSX .pkgs have a `-internal` suffix -->
<InstallerStartSuffix Condition="'$(HostOSName)' == 'osx'">-internal</InstallerStartSuffix>
<InstallerStartSuffix Condition="$([MSBuild]::IsOSPlatform('OSX'))">-internal</InstallerStartSuffix>

<!-- Downloaded Installers + Archives -->

Expand Down Expand Up @@ -77,7 +77,7 @@
<AspNetCoreSharedFxArchiveRid>$(AspNetCoreSharedFxInstallerRid)</AspNetCoreSharedFxArchiveRid>
<AspNetCoreSharedFxInstallerRid Condition="'$(InstallerExtension)' == '.deb' OR '$(InstallerExtension)' == '.rpm'">x64</AspNetCoreSharedFxInstallerRid>

<DownloadedAspNetCoreSharedFxInstallerFileName Condition=" '$(InstallerExtension)' != '' AND '$(HostOSName)' != 'osx' ">aspnetcore-runtime-$(MicrosoftAspNetCoreAppRuntimePackageVersion)-$(AspNetCoreSharedFxInstallerRid)$(InstallerExtension)</DownloadedAspNetCoreSharedFxInstallerFileName>
<DownloadedAspNetCoreSharedFxInstallerFileName Condition=" '$(InstallerExtension)' != '' AND !$([MSBuild]::IsOSPlatform('OSX')) ">aspnetcore-runtime-$(MicrosoftAspNetCoreAppRuntimePackageVersion)-$(AspNetCoreSharedFxInstallerRid)$(InstallerExtension)</DownloadedAspNetCoreSharedFxInstallerFileName>
<!-- Note: we use the "-internal" archives and installers that contain only the aspnetcore shared framework, and shouldn't overlap with Microsoft.NETCore.App. -->
<DownloadedAspNetCoreSharedFxWixLibFileName Condition=" '$(InstallerExtension)' == '.msi' ">aspnetcore-runtime-internal-$(MicrosoftAspNetCoreAppRuntimePackageVersion)-$(AspNetCoreSharedFxInstallerRid).wixlib</DownloadedAspNetCoreSharedFxWixLibFileName>
<DownloadedAspNetTargetingPackInstallerFileName Condition=" '$(InstallerExtension)' != '' ">aspnetcore-targeting-pack-$(MicrosoftAspNetCoreAppRefPackageVersion)$(InstallerExtension)</DownloadedAspNetTargetingPackInstallerFileName>
Expand All @@ -98,7 +98,7 @@
<CombinedSharedHostAndFrameworkArchive>$(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension)</CombinedSharedHostAndFrameworkArchive>
</PropertyGroup>

<PropertyGroup Condition="'$(HostOSName)' == 'win' And !$(Architecture.StartsWith('arm'))">
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('WINDOWS')) And !$(Architecture.StartsWith('arm'))">
<AlternateAppHostRid>win-$(AlternateArchitecture)</AlternateAppHostRid>
<ArmAppHostRid>win-arm</ArmAppHostRid>
<Arm64AppHostRid>win-arm64</Arm64AppHostRid>
Expand Down
29 changes: 9 additions & 20 deletions src/redist/targets/GetRuntimeInformation.targets
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
<Project>
<Target Name="GetCurrentRuntimeInformation">
<GetCurrentRuntimeInformation>
<Output TaskParameter="Rid" PropertyName="HostRid" />
<Output TaskParameter="OSName" PropertyName="HostOSName" />
<Output TaskParameter="OSPlatform" PropertyName="HostOSPlatform" />
</GetCurrentRuntimeInformation>

<PropertyGroup>
<IsLinux Condition = " '$(HostOSName)' != 'win' AND '$(HostOSName)' != 'osx' AND '$(HostOSName)' != 'freebsd' ">True</IsLinux>
<OSName Condition=" '$(OSName)' == '' AND '$(IsLinux)' != 'True' ">$(HostOSName)</OSName>
<OSPlatform Condition=" '$(OSPlatform)' == '' AND '$(IsLinux)' != 'True' ">$(HostOSPlatform)</OSPlatform>
<HostRid Condition="'$(HostRid)' == '' and '$(MSBuildRuntimeType)' == 'core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</HostRid>
<HostRid Condition="'$(HostRid)' == '' and '$(MSBuildRuntimeType)' != 'core'">win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)</HostRid>

<IsLinux Condition = " $([MSBuild]::IsOSPlatform('LINUX')) ">True</IsLinux>
<OSName Condition=" '$(OSName)' == '' AND $([MSBuild]::IsOSPlatform('WINDOWS')) ">win</OSName>
<OSName Condition=" '$(OSName)' == '' AND $([MSBuild]::IsOSPlatform('OSX')) ">osx</OSName>
<OSName Condition=" '$(OSName)' == '' AND $([MSBuild]::IsOSPlatform('FREEBSD')) ">freebsd</OSName>
<OSName Condition=" '$(OSName)' == '' AND '$(IsLinux)' == 'True' ">linux</OSName>
<OSPlatform Condition=" '$(OSPlatform)' == '' AND '$(IsLinux)' == 'True' ">linux</OSPlatform>

<Rid Condition=" '$(Rid)' == '' ">$(OSName)-$(Architecture)</Rid>
</PropertyGroup>

<PropertyGroup>
<IsDebianBaseDistro Condition=" '$(HostOSName)' == 'ubuntu' OR '$(HostOSName)' == 'debian' ">true</IsDebianBaseDistro>
<IsDebianBaseDistro Condition=" $(HostRid.StartsWith('ubuntu')) OR $(HostRid.StartsWith('debian')) ">true</IsDebianBaseDistro>
<IsRPMBasedDistro Condition=" $(HostRid.StartsWith('rhel')) AND '$(HostRid)' != 'rhel.6-x64' ">true</IsRPMBasedDistro>
<PublishNativeInstallers Condition=" '$(IslinuxPortable)' != 'true' AND '$(HostRid)' != 'rhel.6-x64' AND '$(HostRid)' != 'linux-musl-x64'">true</PublishNativeInstallers>
<PublishArchives Condition=" '$(IslinuxPortable)' == 'true' OR ('$(IsDebianBaseDistro)' != 'true' AND '$(IsRPMBasedDistro)' != 'true') ">true</PublishArchives>
Expand All @@ -29,13 +26,6 @@
'$(Rid)' == 'linux-musl-x64' ">$(Rid)</ProductMonikerRid>
<ProductMonikerRid Condition=" '$(ProductMonikerRid)' == '' ">$(OSName)-$(Architecture)</ProductMonikerRid>

<HostMonikerRid Condition=" '$(HostRid)' == 'ubuntu.16.04-x64' OR
'$(HostRid)' == 'rhel.6-x64' OR
'$(HostRid)' == 'linux-musl-x64' ">$(HostRid)</HostMonikerRid>
<HostMonikerRid Condition=" '$(HostMonikerRid)' == '' ">$(HostOSName)-$(Architecture)</HostMonikerRid>
<HostMonikerRidForFileName>$(HostMonikerRid)</HostMonikerRidForFileName>
<HostMonikerRidForFileName Condition=" '$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true' ">$(Architecture)</HostMonikerRidForFileName>

<ArtifactNameSdk>dotnet-sdk-internal</ArtifactNameSdk>
<ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-sdk</ArtifactNameCombinedHostHostFxrFrameworkSdk>

Expand All @@ -45,8 +35,7 @@
<!-- Warning: changing the value "ProductBandCombinedHostHostFxrFrameworkSdkName" can only occur on a product-band boundary [CliProductBandVersion],
Changing "ProductBandCombinedHostHostFxrFrameworkSdkName" mid-product-band will break the upgradablilty of the SDK bundle installer. -->
<ProductBandCombinedHostHostFxrFrameworkSdkName>Dotnet SDK Bundle Installer $(CliProductBandVersion) $(ProductMonikerRid)</ProductBandCombinedHostHostFxrFrameworkSdkName>
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(Version)-</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid)$(HostMonikerRidForFileName)</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(Version)-$(Architecture)</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
</PropertyGroup>
</Target>
</Project>
Loading

0 comments on commit b4bc7d2

Please sign in to comment.