Skip to content

Commit c8741bc

Browse files
ericstjam11
andauthored
[release/6.0] x64 on ARM64 fixes (#59295)
* 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 <[email protected]> * Refine uname regular expressions Co-authored-by: Adeel Mujahid <[email protected]> * Updating dependencies from https://github.com/dotnet/arcade build 20210917.3 Co-authored-by: Adeel Mujahid <[email protected]>
1 parent ea504b8 commit c8741bc

File tree

8 files changed

+140
-83
lines changed

8 files changed

+140
-83
lines changed

eng/Version.Details.xml

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,73 +14,77 @@
1414
</Dependency>
1515
</ProductDependencies>
1616
<ToolsetDependencies>
17-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21460.7">
17+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21467.3">
1818
<Uri>https://github.com/dotnet/arcade</Uri>
19-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
19+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
2020
</Dependency>
21-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21460.7">
21+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21467.3">
2222
<Uri>https://github.com/dotnet/arcade</Uri>
23-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
23+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
2424
</Dependency>
25-
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21460.7">
25+
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21467.3">
2626
<Uri>https://github.com/dotnet/arcade</Uri>
27-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
27+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
2828
</Dependency>
29-
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.21460.7">
29+
<Dependency Name="Microsoft.DotNet.GenAPI" Version="6.0.0-beta.21467.3">
3030
<Uri>https://github.com/dotnet/arcade</Uri>
31-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
31+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
3232
</Dependency>
33-
<Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.21460.7">
33+
<Dependency Name="Microsoft.DotNet.GenFacades" Version="6.0.0-beta.21467.3">
3434
<Uri>https://github.com/dotnet/arcade</Uri>
35-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
35+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
3636
</Dependency>
37-
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.21460.7">
37+
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.21467.3">
3838
<Uri>https://github.com/dotnet/arcade</Uri>
39-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
39+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
4040
</Dependency>
41-
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.21460.7">
41+
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.21467.3">
4242
<Uri>https://github.com/dotnet/arcade</Uri>
43-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
43+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
4444
</Dependency>
45-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.21460.7">
45+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="6.0.0-beta.21467.3">
4646
<Uri>https://github.com/dotnet/arcade</Uri>
47-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
47+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
4848
</Dependency>
49-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.21460.7">
49+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.21467.3">
5050
<Uri>https://github.com/dotnet/arcade</Uri>
51-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
51+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
5252
</Dependency>
53-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21460.7">
53+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21467.3">
5454
<Uri>https://github.com/dotnet/arcade</Uri>
55-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
55+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
5656
</Dependency>
57-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="6.0.0-beta.21460.7">
57+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.21467.3">
5858
<Uri>https://github.com/dotnet/arcade</Uri>
59-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
59+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
6060
</Dependency>
61-
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.21460.7">
61+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="6.0.0-beta.21467.3">
6262
<Uri>https://github.com/dotnet/arcade</Uri>
63-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
63+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
6464
</Dependency>
65-
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.21460.7">
65+
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="6.0.0-beta.21467.3">
6666
<Uri>https://github.com/dotnet/arcade</Uri>
67-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
67+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
6868
</Dependency>
69-
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.21460.7">
69+
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="6.0.0-beta.21467.3">
7070
<Uri>https://github.com/dotnet/arcade</Uri>
71-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
71+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
7272
</Dependency>
73-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.21460.7">
73+
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.21467.3">
7474
<Uri>https://github.com/dotnet/arcade</Uri>
75-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
75+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
7676
</Dependency>
77-
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.21460.7">
77+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="6.0.0-beta.21467.3">
7878
<Uri>https://github.com/dotnet/arcade</Uri>
79-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
79+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
8080
</Dependency>
81-
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.21460.7">
81+
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="6.0.0-beta.21467.3">
8282
<Uri>https://github.com/dotnet/arcade</Uri>
83-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
83+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
84+
</Dependency>
85+
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="6.0.0-beta.21467.3">
86+
<Uri>https://github.com/dotnet/arcade</Uri>
87+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
8488
</Dependency>
8589
<Dependency Name="Microsoft.NET.Test.Sdk" Version="16.9.0-preview-20201201-01">
8690
<Uri>https://github.com/microsoft/vstest</Uri>
@@ -202,9 +206,9 @@
202206
<Uri>https://github.com/dotnet/xharness</Uri>
203207
<Sha>e9669dc84ecd668d3bbb748758103e23b394ffef</Sha>
204208
</Dependency>
205-
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="6.0.0-beta.21460.7">
209+
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="6.0.0-beta.21467.3">
206210
<Uri>https://github.com/dotnet/arcade</Uri>
207-
<Sha>7324320f814152b72295946847ca72413507705a</Sha>
211+
<Sha>dd9dbfedbdb31401bb16bba8366f31bbd382549b</Sha>
208212
</Dependency>
209213
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.21416.5">
210214
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>

eng/Versions.props

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,21 @@
5353
<!-- SDK dependencies -->
5454
<MicrosoftDotNetCompatibilityVersion>1.0.0-rc.2.21419.17</MicrosoftDotNetCompatibilityVersion>
5555
<!-- Arcade dependencies -->
56-
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.21460.7</MicrosoftDotNetApiCompatVersion>
57-
<MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksFeedVersion>
58-
<MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.21460.7</MicrosoftDotNetCodeAnalysisVersion>
59-
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.21460.7</MicrosoftDotNetGenAPIVersion>
60-
<MicrosoftDotNetGenFacadesVersion>6.0.0-beta.21460.7</MicrosoftDotNetGenFacadesVersion>
61-
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.21460.7</MicrosoftDotNetXUnitExtensionsVersion>
62-
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.21460.7</MicrosoftDotNetXUnitConsoleRunnerVersion>
63-
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksArchivesVersion>
64-
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksInstallersVersion>
65-
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksPackagingVersion>
66-
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
67-
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.21460.7</MicrosoftDotNetRemoteExecutorVersion>
68-
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.21460.7</MicrosoftDotNetVersionToolsTasksVersion>
69-
<MicrosoftDotNetPackageTestingVersion>6.0.0-beta.21460.7</MicrosoftDotNetPackageTestingVersion>
56+
<MicrosoftDotNetApiCompatVersion>6.0.0-beta.21467.3</MicrosoftDotNetApiCompatVersion>
57+
<MicrosoftDotNetBuildTasksFeedVersion>6.0.0-beta.21467.3</MicrosoftDotNetBuildTasksFeedVersion>
58+
<MicrosoftDotNetCodeAnalysisVersion>6.0.0-beta.21467.3</MicrosoftDotNetCodeAnalysisVersion>
59+
<MicrosoftDotNetGenAPIVersion>6.0.0-beta.21467.3</MicrosoftDotNetGenAPIVersion>
60+
<MicrosoftDotNetGenFacadesVersion>6.0.0-beta.21467.3</MicrosoftDotNetGenFacadesVersion>
61+
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.21467.3</MicrosoftDotNetXUnitExtensionsVersion>
62+
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.21467.3</MicrosoftDotNetXUnitConsoleRunnerVersion>
63+
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.21467.3</MicrosoftDotNetBuildTasksArchivesVersion>
64+
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21467.3</MicrosoftDotNetBuildTasksInstallersVersion>
65+
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21467.3</MicrosoftDotNetBuildTasksPackagingVersion>
66+
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.21467.3</MicrosoftDotNetBuildTasksTemplatingVersion>
67+
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.21467.3</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
68+
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.21467.3</MicrosoftDotNetRemoteExecutorVersion>
69+
<MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.21467.3</MicrosoftDotNetVersionToolsTasksVersion>
70+
<MicrosoftDotNetPackageTestingVersion>6.0.0-beta.21467.3</MicrosoftDotNetPackageTestingVersion>
7071
<!-- NuGet dependencies -->
7172
<NuGetBuildTasksPackVersion>6.0.0-preview.1.102</NuGetBuildTasksPackVersion>
7273
<!-- Installer dependencies -->

global.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"python3": "3.7.1"
1313
},
1414
"msbuild-sdks": {
15-
"Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.21460.7",
16-
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21460.7",
17-
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21460.7",
18-
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.21460.7",
15+
"Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.21467.3",
16+
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21467.3",
17+
"Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21467.3",
18+
"Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.21467.3",
1919
"Microsoft.Build.NoTargets": "3.1.0",
2020
"Microsoft.Build.Traversal": "3.0.23",
2121
"Microsoft.NET.Sdk.IL": "6.0.0-rc.1.21415.6"

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

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<UseBrandingNameInLinuxPackageDescription>true</UseBrandingNameInLinuxPackageDescription>
1616
<MacOSComponentNamePackType>sharedhost</MacOSComponentNamePackType>
1717
<IncludeVersionInMacOSComponentName>false</IncludeVersionInMacOSComponentName>
18-
<MacOSScriptsDirectory>osx_scripts/host</MacOSScriptsDirectory>
18+
<MacOSScriptsTemplateDirectory>osx_scripts/host</MacOSScriptsTemplateDirectory>
1919
<MacOSPackageDescription>The .NET Shared Host.</MacOSPackageDescription>
2020
<RpmScriptsDirectory>$(MSBuildThisFileDirectory)rpm_scripts/host</RpmScriptsDirectory>
2121
<RpmAfterInstallScript>$(RpmScriptsDirectory)/after_install.sh</RpmAfterInstallScript>
@@ -78,4 +78,36 @@
7878
<RpmJsonProperty Include="@(PackageConflictsProperty)" />
7979
</ItemGroup>
8080
</Target>
81+
82+
<PropertyGroup>
83+
<_MacOSIntermediatesPath>$(IntermediateOutputPath)macos/</_MacOSIntermediatesPath>
84+
<!-- CreatePkg depends on this property being set.-->
85+
<MacOSScriptsDirectory>$(_MacOSIntermediatesPath)scripts</MacOSScriptsDirectory>
86+
</PropertyGroup>
87+
<ItemGroup>
88+
<_MacOSScript Include="$(MacOSScriptsTemplateDirectory)/*" Destination="$(MacOSScriptsDirectory)/%(FileName)%(Extension)"/>
89+
</ItemGroup>
90+
<Target Name="ReplaceTemplateParametersInMacOsScripts"
91+
Inputs="@(_MacOSScript)"
92+
Outputs="@(_MacOSScript->'%(Destination)')"
93+
DependsOnTargets="_GetInstallerProperties"
94+
BeforeTargets="CreatePkg">
95+
96+
<PropertyGroup>
97+
<_UnameMachineRegex>$(InstallerTargetArchitecture)</_UnameMachineRegex>
98+
<_UnameMachineRegex Condition="'$(InstallerTargetArchitecture)' == 'arm64'">arm64|aarch64</_UnameMachineRegex>
99+
<_UnameMachineRegex Condition="'$(InstallerTargetArchitecture)' == 'x64'">amd64|x86_64</_UnameMachineRegex>
100+
<_MacOSScriptsTemplateProperties>InstallerTargetArchitecture=$(InstallerTargetArchitecture);UnameMachineRegex=$(_UnameMachineRegex)</_MacOSScriptsTemplateProperties>
101+
</PropertyGroup>
102+
103+
<GenerateFileFromTemplate TemplateFile="@(_MacOSScript)"
104+
OutputPath="@(_MacOSScript->'%(Destination)')"
105+
Properties="$(_MacOSScriptsTemplateProperties)">
106+
<Output TaskParameter="ResolvedOutputPath" ItemName="FileWrites" />
107+
</GenerateFileFromTemplate>
108+
</Target>
109+
110+
<ItemGroup>
111+
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" />
112+
</ItemGroup>
81113
</Project>

src/installer/pkg/sfx/installers/dotnet-hostfxr.proj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
<OutputFilesCandleVariable>HostFxrSrc</OutputFilesCandleVariable>
1515
<UseBrandingNameInLinuxPackageDescription>true</UseBrandingNameInLinuxPackageDescription>
1616
<MacOSComponentNamePackType>hostfxr</MacOSComponentNamePackType>
17-
<MacOSScriptsDirectory>osx_scripts/hostfxr</MacOSScriptsDirectory>
1817
<MacOSPackageDescription>The .NET HostFxr</MacOSPackageDescription>
1918
</PropertyGroup>
2019

src/installer/pkg/sfx/installers/host.wxs

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<Fragment>
77

8-
<ComponentGroup Id="InstallSharedHostandDetectionKeys">
8+
<ComponentGroup Id="InstallSharedHostandDetectionKeys" Directory="DOTNETHOME">
99

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

23-
<Component Id="cmpCoreHost" Directory="DOTNETHOME" Guid="{45399BBB-DDA5-4386-A2E9-618FB3C54A18}" >
23+
<Component Id="cmpCoreHost" Guid="{45399BBB-DDA5-4386-A2E9-618FB3C54A18}" >
2424
<File Id="fileCoreHostExe" KeyPath="yes" Source="$(var.HostSrc)\dotnet.exe">
2525
<CopyFile Id="copyFileCoreHostExe" DestinationDirectory="PROGRAMFILES_DOTNET" />
2626
</File>
27+
</Component>
28+
29+
<Component Id="cmpSharedHostVersionRegistry" Guid="*">
2730
<RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost">
28-
<RegistryValue Action="write" Name="Version" Type="string" Value="$(var.NugetVersion)"/>
31+
<RegistryValue KeyPath="yes" Action="write" Name="Version" Type="string" Value="$(var.NugetVersion)"/>
32+
</RegistryKey>
33+
</Component>
34+
35+
<Component Id="cmdPath" Guid="*">
36+
<?if $(var.Platform)~=x64 ?>
37+
<!-- For x64 installer, only add to PATH when actually on native architecture -->
38+
<Condition>NOT NON_NATIVE_ARCHITECTURE</Condition>
39+
<?endif?>
40+
41+
<!-- A stable keypath with the right SxS characteristics for our PATH entry-->
42+
<RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedhost">
43+
<RegistryValue KeyPath="yes" Action="write" Name="Path" Type="string" Value="[DOTNETHOME]"/>
2944
</RegistryKey>
3045
<Environment Id="E_PATH" Name="PATH" Value="[DOTNETHOME]" Part="last" Action="set" System="yes" />
3146
</Component>
3247

33-
<Component Id="cmpLicenseFiles" Directory="DOTNETHOME" Guid="{A61CBE5B-1282-4F29-90AD-63597AA2372E}">
48+
<Component Id="cmpLicenseFiles" Guid="{A61CBE5B-1282-4F29-90AD-63597AA2372E}">
3449
<File Id="fileLicenseTxt" KeyPath="yes" Source="$(var.HostSrc)\LICENSE.txt">
3550
<CopyFile Id="copyFileLicenseTxt" DestinationDirectory="PROGRAMFILES_DOTNET" />
3651
</File>
@@ -47,6 +62,16 @@
4762
<DirectoryRef Id="$(var.Program_Files)">
4863
<Directory Id="PROGRAMFILES_DOTNET" Name="dotnet" />
4964
</DirectoryRef>
65+
66+
<?if $(var.Platform)~=x64 ?>
67+
<CustomActionRef Id="Set_PROGRAMFILES_DOTNET_NON_NATIVE_ARCHITECTURE" />
68+
<?endif?>
5069
</Fragment>
51-
52-
</Wix>
70+
71+
<Fragment>
72+
<!-- Unlike DOTNETHOME which gives precedence to a user specified value over an x64 suffix, here we always want the suffixed path -->
73+
<SetProperty Action="Set_PROGRAMFILES_DOTNET_NON_NATIVE_ARCHITECTURE" Id="PROGRAMFILES_DOTNET" Value="[$(var.Program_Files)]dotnet\x64\" After="Set_NON_NATIVE_ARCHITECTURE">
74+
NON_NATIVE_ARCHITECTURE
75+
</SetProperty>
76+
</Fragment>
77+
</Wix>
Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
#
33
# Licensed to the .NET Foundation under one or more agreements.
44
# The .NET Foundation licenses this file to you under the MIT license.
@@ -10,9 +10,21 @@ INSTALL_DESTINATION=$2
1010
# A temporary fix for the permissions issue(s)
1111
chmod 755 $INSTALL_DESTINATION/dotnet
1212

13-
# Add the installation directory to the system-wide paths
14-
# But first create the directory if it doesn't exist
15-
mkdir -p /etc/paths.d
16-
echo $INSTALL_DESTINATION | tee /etc/paths.d/dotnet
13+
if [ -e /etc/dotnet/install_location ]; then
14+
# clear out any entries for this architecture if they exist
15+
sed -i old '/^${InstallerTargetArchitecture}=/d' /etc/dotnet/install_location
16+
else
17+
mkdir -p /etc/dotnet
18+
fi
19+
20+
echo ${InstallerTargetArchitecture}=$INSTALL_DESTINATION | tee -a /etc/dotnet/install_location
21+
22+
# if we're running on the native architecture
23+
if [[ "$(uname -m)" =~ "${UnameMachineRegex}" ]]; then
24+
# Add the installation directory to the system-wide paths
25+
# But first create the directory if it doesn't exist
26+
mkdir -p /etc/paths.d
27+
echo $INSTALL_DESTINATION | tee /etc/paths.d/dotnet
28+
fi
1729

1830
exit 0

src/installer/pkg/sfx/installers/osx_scripts/hostfxr/postinstall

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)