Skip to content

Commit

Permalink
[release/6.0] x64 on ARM64 fixes (#59295)
Browse files Browse the repository at this point in the history
* Retarget DOTNETHOME when installing x64 on ARM64 (#58669)

* Only set path in x64 mac installer when installing on x64 (#59210)

* Only set path in x64 mac installer when installing on x64

In other words don't set the path for x64 installer on ARM64

* Remove postinstall script from hostfxr

There should be no need for both the host and hostfxr to set the path to dotnet.

Since the host installs dotnet, it should be the only package responsible for this.

* Make postinstall set install_location on mac

Also refactor script to use a template so that we don't need to fork the script.

* fix some syntax errors in script

* Update src/installer/pkg/sfx/installers/dotnet-host.proj

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>

* Refine uname regular expressions

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>

* Updating dependencies from https://github.com/dotnet/arcade build 20210917.3

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
  • Loading branch information
ericstj and am11 authored Sep 20, 2021
1 parent ea504b8 commit c8741bc
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 83 deletions.
76 changes: 40 additions & 36 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,73 +14,77 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.21460.7">
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Test.Sdk" Version="16.9.0-preview-20201201-01">
<Uri>https://github.com/microsoft/vstest</Uri>
Expand Down Expand Up @@ -202,9 +206,9 @@
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>e9669dc84ecd668d3bbb748758103e23b394ffef</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="6.0.0-beta.21460.7">
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="6.0.0-beta.21467.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.21416.5">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
Expand Down
29 changes: 15 additions & 14 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,21 @@
<!-- SDK dependencies -->
<MicrosoftDotNetCompatibilityVersion>1.0.0-rc.2.21419.17</MicrosoftDotNetCompatibilityVersion>
<!-- Arcade dependencies -->
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.21460.7</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.21460.7</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.21460.7</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetGenFacadesVersion>6.0.0-beta.21460.7</MicrosoftDotNetGenFacadesVersion>
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.21460.7</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.21460.7</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.21460.7</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.21460.7</MicrosoftDotNetVersionToolsTasksVersion>
<MicrosoftDotNetPackageTestingVersion>6.0.0-beta.21460.7</MicrosoftDotNetPackageTestingVersion>
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.21467.3</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.21467.3</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.21467.3</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.21467.3</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetGenFacadesVersion>6.0.0-beta.21467.3</MicrosoftDotNetGenFacadesVersion>
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.21467.3</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.21467.3</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.21467.3</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21467.3</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21467.3</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.21467.3</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.21467.3</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.21467.3</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.21467.3</MicrosoftDotNetVersionToolsTasksVersion>
<MicrosoftDotNetPackageTestingVersion>6.0.0-beta.21467.3</MicrosoftDotNetPackageTestingVersion>
<!-- NuGet dependencies -->
<NuGetBuildTasksPackVersion>6.0.0-preview.1.102</NuGetBuildTasksPackVersion>
<!-- Installer dependencies -->
Expand Down
8 changes: 4 additions & 4 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"python3": "3.7.1"
},
"msbuild-sdks": {
"Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.21460.7",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21460.7",
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21460.7",
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.21460.7",
"Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.21467.3",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21467.3",
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21467.3",
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.21467.3",
"Microsoft.Build.NoTargets": "3.1.0",
"Microsoft.Build.Traversal": "3.0.23",
"Microsoft.NET.Sdk.IL": "6.0.0-rc.1.21415.6"
Expand Down
34 changes: 33 additions & 1 deletion src/installer/pkg/sfx/installers/dotnet-host.proj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<UseBrandingNameInLinuxPackageDescription>true</UseBrandingNameInLinuxPackageDescription>
<MacOSComponentNamePackType>sharedhost</MacOSComponentNamePackType>
<IncludeVersionInMacOSComponentName>false</IncludeVersionInMacOSComponentName>
<MacOSScriptsDirectory>osx_scripts/host</MacOSScriptsDirectory>
<MacOSScriptsTemplateDirectory>osx_scripts/host</MacOSScriptsTemplateDirectory>
<MacOSPackageDescription>The .NET Shared Host.</MacOSPackageDescription>
<RpmScriptsDirectory>$(MSBuildThisFileDirectory)rpm_scripts/host</RpmScriptsDirectory>
<RpmAfterInstallScript>$(RpmScriptsDirectory)/after_install.sh</RpmAfterInstallScript>
Expand Down Expand Up @@ -78,4 +78,36 @@
<RpmJsonProperty Include="@(PackageConflictsProperty)" />
</ItemGroup>
</Target>

<PropertyGroup>
<_MacOSIntermediatesPath>$(IntermediateOutputPath)macos/</_MacOSIntermediatesPath>
<!-- CreatePkg depends on this property being set.-->
<MacOSScriptsDirectory>$(_MacOSIntermediatesPath)scripts</MacOSScriptsDirectory>
</PropertyGroup>
<ItemGroup>
<_MacOSScript Include="$(MacOSScriptsTemplateDirectory)/*" Destination="$(MacOSScriptsDirectory)/%(FileName)%(Extension)"/>
</ItemGroup>
<Target Name="ReplaceTemplateParametersInMacOsScripts"
Inputs="@(_MacOSScript)"
Outputs="@(_MacOSScript->'%(Destination)')"
DependsOnTargets="_GetInstallerProperties"
BeforeTargets="CreatePkg">

<PropertyGroup>
<_UnameMachineRegex>$(InstallerTargetArchitecture)</_UnameMachineRegex>
<_UnameMachineRegex Condition="'$(InstallerTargetArchitecture)' == 'arm64'">arm64|aarch64</_UnameMachineRegex>
<_UnameMachineRegex Condition="'$(InstallerTargetArchitecture)' == 'x64'">amd64|x86_64</_UnameMachineRegex>
<_MacOSScriptsTemplateProperties>InstallerTargetArchitecture=$(InstallerTargetArchitecture);UnameMachineRegex=$(_UnameMachineRegex)</_MacOSScriptsTemplateProperties>
</PropertyGroup>

<GenerateFileFromTemplate TemplateFile="@(_MacOSScript)"
OutputPath="@(_MacOSScript->'%(Destination)')"
Properties="$(_MacOSScriptsTemplateProperties)">
<Output TaskParameter="ResolvedOutputPath" ItemName="FileWrites" />
</GenerateFileFromTemplate>
</Target>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" />
</ItemGroup>
</Project>
1 change: 0 additions & 1 deletion src/installer/pkg/sfx/installers/dotnet-hostfxr.proj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<OutputFilesCandleVariable>HostFxrSrc</OutputFilesCandleVariable>
<UseBrandingNameInLinuxPackageDescription>true</UseBrandingNameInLinuxPackageDescription>
<MacOSComponentNamePackType>hostfxr</MacOSComponentNamePackType>
<MacOSScriptsDirectory>osx_scripts/hostfxr</MacOSScriptsDirectory>
<MacOSPackageDescription>The .NET HostFxr</MacOSPackageDescription>
</PropertyGroup>

Expand Down
37 changes: 31 additions & 6 deletions src/installer/pkg/sfx/installers/host.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<Fragment>

<ComponentGroup Id="InstallSharedHostandDetectionKeys">
<ComponentGroup Id="InstallSharedHostandDetectionKeys" Directory="DOTNETHOME">

<!-- When installing the SharedHost; copy all files to the traditional default install location: 'ProgramFiles'\dotnet even when installing into a custom location.
Expand All @@ -20,17 +20,32 @@
1. the legacy SDK can be subsequently installed
2. the user runs 'dotnet' commands directly against 'ProgramFiles'\dotnet\dotnet.exe -->

<Component Id="cmpCoreHost" Directory="DOTNETHOME" Guid="{45399BBB-DDA5-4386-A2E9-618FB3C54A18}" >
<Component Id="cmpCoreHost" Guid="{45399BBB-DDA5-4386-A2E9-618FB3C54A18}" >
<File Id="fileCoreHostExe" KeyPath="yes" Source="$(var.HostSrc)\dotnet.exe">
<CopyFile Id="copyFileCoreHostExe" DestinationDirectory="PROGRAMFILES_DOTNET" />
</File>
</Component>

<Component Id="cmpSharedHostVersionRegistry" Guid="*">
<RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost">
<RegistryValue Action="write" Name="Version" Type="string" Value="$(var.NugetVersion)"/>
<RegistryValue KeyPath="yes" Action="write" Name="Version" Type="string" Value="$(var.NugetVersion)"/>
</RegistryKey>
</Component>

<Component Id="cmdPath" Guid="*">
<?if $(var.Platform)~=x64 ?>
<!-- For x64 installer, only add to PATH when actually on native architecture -->
<Condition>NOT NON_NATIVE_ARCHITECTURE</Condition>
<?endif?>

<!-- A stable keypath with the right SxS characteristics for our PATH entry-->
<RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost">
<RegistryValue KeyPath="yes" Action="write" Name="Path" Type="string" Value="[DOTNETHOME]"/>
</RegistryKey>
<Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]" Part="last" Action="set" System="yes" />
</Component>

<Component Id="cmpLicenseFiles" Directory="DOTNETHOME" Guid="{A61CBE5B-1282-4F29-90AD-63597AA2372E}">
<Component Id="cmpLicenseFiles" Guid="{A61CBE5B-1282-4F29-90AD-63597AA2372E}">
<File Id="fileLicenseTxt" KeyPath="yes" Source="$(var.HostSrc)\LICENSE.txt">
<CopyFile Id="copyFileLicenseTxt" DestinationDirectory="PROGRAMFILES_DOTNET" />
</File>
Expand All @@ -47,6 +62,16 @@
<DirectoryRef Id="$(var.Program_Files)">
<Directory Id="PROGRAMFILES_DOTNET" Name="dotnet" />
</DirectoryRef>

<?if $(var.Platform)~=x64 ?>
<CustomActionRef Id="Set_PROGRAMFILES_DOTNET_NON_NATIVE_ARCHITECTURE" />
<?endif?>
</Fragment>

</Wix>

<Fragment>
<!-- Unlike DOTNETHOME which gives precedence to a user specified value over an x64 suffix, here we always want the suffixed path -->
<SetProperty Action="Set_PROGRAMFILES_DOTNET_NON_NATIVE_ARCHITECTURE" Id="PROGRAMFILES_DOTNET" Value="[$(var.Program_Files)]dotnet\x64\" After="Set_NON_NATIVE_ARCHITECTURE">
NON_NATIVE_ARCHITECTURE
</SetProperty>
</Fragment>
</Wix>
22 changes: 17 additions & 5 deletions src/installer/pkg/sfx/installers/osx_scripts/host/postinstall
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
Expand All @@ -10,9 +10,21 @@ INSTALL_DESTINATION=$2
# A temporary fix for the permissions issue(s)
chmod 755 $INSTALL_DESTINATION/dotnet

# Add the installation directory to the system-wide paths
# But first create the directory if it doesn't exist
mkdir -p /etc/paths.d
echo $INSTALL_DESTINATION | tee /etc/paths.d/dotnet
if [ -e /etc/dotnet/install_location ]; then
# clear out any entries for this architecture if they exist
sed -i old '/^${InstallerTargetArchitecture}=/d' /etc/dotnet/install_location
else
mkdir -p /etc/dotnet
fi

echo ${InstallerTargetArchitecture}=$INSTALL_DESTINATION | tee -a /etc/dotnet/install_location

# if we're running on the native architecture
if [[ "$(uname -m)" =~ "${UnameMachineRegex}" ]]; then
# Add the installation directory to the system-wide paths
# But first create the directory if it doesn't exist
mkdir -p /etc/paths.d
echo $INSTALL_DESTINATION | tee /etc/paths.d/dotnet
fi

exit 0
16 changes: 0 additions & 16 deletions src/installer/pkg/sfx/installers/osx_scripts/hostfxr/postinstall

This file was deleted.

0 comments on commit c8741bc

Please sign in to comment.