Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4b7c80f398fd3dcea03fdc4e454789b61181d300</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="7.0.0-beta.21463.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4b7c80f398fd3dcea03fdc4e454789b61181d300</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="7.0.0-beta.21463.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4b7c80f398fd3dcea03fdc4e454789b61181d300</Sha>
Expand Down
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<MicrosoftDotNetBuildTasksArchivesVersion>7.0.0-beta.21463.4</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>7.0.0-beta.21463.4</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>7.0.0-beta.21463.4</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>7.0.0-beta.21463.4</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>7.0.0-beta.21463.4</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetRemoteExecutorVersion>7.0.0-beta.21463.4</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>7.0.0-beta.21463.4</MicrosoftDotNetVersionToolsTasksVersion>
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
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.