Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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>fa4a48044d33222537e6dbd000f8a2adaa7a15c7</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="7.0.0-beta.21459.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>fa4a48044d33222537e6dbd000f8a2adaa7a15c7</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="7.0.0-beta.21459.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>fa4a48044d33222537e6dbd000f8a2adaa7a15c7</Sha>
Expand Down
3 changes: 2 additions & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.21459.5</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>7.0.0-beta.21459.5</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>7.0.0-beta.21459.5</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>7.0.0-beta.21459.5</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>7.0.0-beta.21459.5</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>7.0.0-beta.21459.5</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>7.0.0-beta.21459.5</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetRemoteExecutorVersion>7.0.0-beta.21459.5</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>7.0.0-beta.21459.5</MicrosoftDotNetVersionToolsTasksVersion>
Expand Down
33 changes: 32 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,35 @@
<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)' == 'x64'">x64|x86_x64</_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.