Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove several Mac Catalyst workarounds #1958

Merged
merged 1 commit into from
Feb 17, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,4 @@

</Target>

<!-- temporarily work around https://github.com/xamarin/xamarin-macios/issues/12369 -->
<Target Name="_HarfBuzzSharpCollectFrameworksFixes" AfterTargets="_CollectFrameworks" Condition=" '$(OS)' == 'Unix' ">
<PropertyGroup>
<_HarfBuzzSharpNativeAssetPath>$(_FrameworksDirectory)\libHarfBuzzSharp.framework\libHarfBuzzSharp</_HarfBuzzSharpNativeAssetPath>
<_HarfBuzzSharpIsSymlink Condition="$([MSBuild]::BitwiseAnd(1024, $([System.IO.File]::GetAttributes('$(_HarfBuzzSharpNativeAssetPath)')))) == '1024'">true</_HarfBuzzSharpIsSymlink>
</PropertyGroup>
<RemoveDir Directories="$(_FrameworksDirectory)\libHarfBuzzSharp.framework" Condition="'$(_HarfBuzzSharpIsSymlink)' != 'true'" />
<Exec Command="cp -R $(_HarfBuzzSharpExpandNativeReferencesPath)libHarfBuzzSharp.framework $(_FrameworksDirectory)/libHarfBuzzSharp.framework" Condition="'$(_HarfBuzzSharpIsSymlink)' != 'true'" />
</Target>

</Project>
Original file line number Diff line number Diff line change
@@ -1,62 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<_HarfBuzzSharpExpandNativeReferencesStamp>$(IntermediateOutputPath)harfbuzzsharpextract.stamp</_HarfBuzzSharpExpandNativeReferencesStamp>
<_HarfBuzzSharpExpandNativeReferencesPath>$(IntermediateOutputPath)harfbuzzsharpextract\</_HarfBuzzSharpExpandNativeReferencesPath>
</PropertyGroup>

<!-- temporarily work around https://github.com/xamarin/xamarin-macios/issues/11667 -->
<Target Name="_HarfBuzzSharpExpandNativeReferencesFixes" BeforeTargets="_ExpandNativeReferences" Condition=" '$(OS)' == 'Unix' "
Inputs="$(MSBuildThisFileFullPath)" Outputs="$(_HarfBuzzSharpExpandNativeReferencesStamp)">

<ItemGroup>
<_HarfBuzzSharpPossibleNativeFramework
Include="@(ResolvedFileToPublish)"
Condition="
'%(ResolvedFileToPublish.AssetType)' == 'native' and
'%(ResolvedFileToPublish.Filename)' == 'libHarfBuzzSharp.framework' and
'%(ResolvedFileToPublish.Extension)' == '.zip' and
'%(ResolvedFileToPublish.NuGetPackageId)' != '' and
'%(ResolvedFileToPublish.PathInPackage)' != ''">
<ExtractPath>$(_HarfBuzzSharpExpandNativeReferencesPath)</ExtractPath>
<DirectoryName>$(_HarfBuzzSharpExpandNativeReferencesPath)%(ResolvedFileToPublish.Filename)</DirectoryName>
</_HarfBuzzSharpPossibleNativeFramework>
</ItemGroup>

<RemoveDir Directories="$(_HarfBuzzSharpExpandNativeReferencesPath)" />

<MakeDir Directories="%(_HarfBuzzSharpPossibleNativeFramework.ExtractPath)" />
<Exec Command="unzip -d %(_HarfBuzzSharpPossibleNativeFramework.ExtractPath) %(_HarfBuzzSharpPossibleNativeFramework.FullPath)" />

<ItemGroup>
<NativeReference Include="%(_HarfBuzzSharpPossibleNativeFramework.DirectoryName)">
<Kind>Framework</Kind>
<NuGetPackageId>%(NuGetPackageId)</NuGetPackageId>
<NuGetPackageVersion>%(NuGetPackageVersion)</NuGetPackageVersion>
<AssetType>%(AssetType)</AssetType>
<RuntimeIdentifier>$([System.Text.RegularExpressions.Regex]::Match('%(_HarfBuzzSharpPossibleNativeFramework.PathInPackage)', 'runtimes/([^/]+)/native/.*').Groups[1].Value)</RuntimeIdentifier>
</NativeReference>
</ItemGroup>

<Touch Files="$(_HarfBuzzSharpExpandNativeReferencesStamp)" AlwaysCreate="True" />

<ItemGroup>
<FileWrites Include="$(_HarfBuzzSharpExpandNativeReferencesPath)\**" />
<FileWrites Include="$(_HarfBuzzSharpExpandNativeReferencesStamp)" />
<_PossibleNativeFramework Remove="@(_PossibleNativeFramework)" />
</ItemGroup>

</Target>

<!-- temporarily work around https://github.com/xamarin/xamarin-macios/issues/12369 -->
<Target Name="_HarfBuzzSharpCollectFrameworksFixes" AfterTargets="_CollectFrameworks" Condition=" '$(OS)' == 'Unix' ">
<PropertyGroup>
<_HarfBuzzSharpNativeAssetPath>$(_FrameworksDirectory)\libHarfBuzzSharp.framework\libHarfBuzzSharp</_HarfBuzzSharpNativeAssetPath>
<_HarfBuzzSharpIsSymlink Condition="$([MSBuild]::BitwiseAnd(1024, $([System.IO.File]::GetAttributes('$(_HarfBuzzSharpNativeAssetPath)')))) == '1024'">true</_HarfBuzzSharpIsSymlink>
</PropertyGroup>
<RemoveDir Directories="$(_FrameworksDirectory)\libHarfBuzzSharp.framework" Condition="'$(_HarfBuzzSharpIsSymlink)' != 'true'" />
<Exec Command="cp -R $(_HarfBuzzSharpExpandNativeReferencesPath)libHarfBuzzSharp.framework $(_FrameworksDirectory)/libHarfBuzzSharp.framework" Condition="'$(_HarfBuzzSharpIsSymlink)' != 'true'" />
</Target>

</Project>
10 changes: 0 additions & 10 deletions binding/SkiaSharp/nuget/build/maccatalyst/SkiaSharp.Local.targets
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,4 @@

</Target>

<!-- temporarily work around https://github.com/xamarin/xamarin-macios/issues/12369 -->
<Target Name="_SkiaSharpCollectFrameworksFixes" AfterTargets="_CollectFrameworks" Condition=" '$(OS)' == 'Unix' ">
<PropertyGroup>
<_SkiaSharpNativeAssetPath>$(_FrameworksDirectory)\libSkiaSharp.framework\libSkiaSharp</_SkiaSharpNativeAssetPath>
<_SkiaSharpIsSymlink Condition="$([MSBuild]::BitwiseAnd(1024, $([System.IO.File]::GetAttributes('$(_SkiaSharpNativeAssetPath)')))) == '1024'">true</_SkiaSharpIsSymlink>
</PropertyGroup>
<RemoveDir Directories="$(_FrameworksDirectory)\libSkiaSharp.framework" Condition="'$(_SkiaSharpIsSymlink)' != 'true'" />
<Exec Command="cp -R $(_SkiaSharpExpandNativeReferencesPath)libSkiaSharp.framework $(_FrameworksDirectory)/libSkiaSharp.framework" Condition="'$(_SkiaSharpIsSymlink)' != 'true'" />
</Target>

</Project>
58 changes: 0 additions & 58 deletions binding/SkiaSharp/nuget/build/maccatalyst/SkiaSharp.targets
Original file line number Diff line number Diff line change
@@ -1,62 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<_SkiaSharpExpandNativeReferencesStamp>$(IntermediateOutputPath)skiasharpextract.stamp</_SkiaSharpExpandNativeReferencesStamp>
<_SkiaSharpExpandNativeReferencesPath>$(IntermediateOutputPath)skiasharpextract\</_SkiaSharpExpandNativeReferencesPath>
</PropertyGroup>

<!-- temporarily work around https://github.com/xamarin/xamarin-macios/issues/11667 -->
<Target Name="_SkiaSharpExpandNativeReferencesFixes" BeforeTargets="_ExpandNativeReferences" Condition=" '$(OS)' == 'Unix' "
Inputs="$(MSBuildThisFileFullPath)" Outputs="$(_SkiaSharpExpandNativeReferencesStamp)">

<ItemGroup>
<_SkiaSharpPossibleNativeFramework
Include="@(ResolvedFileToPublish)"
Condition="
'%(ResolvedFileToPublish.AssetType)' == 'native' and
'%(ResolvedFileToPublish.Filename)' == 'libSkiaSharp.framework' and
'%(ResolvedFileToPublish.Extension)' == '.zip' and
'%(ResolvedFileToPublish.NuGetPackageId)' != '' and
'%(ResolvedFileToPublish.PathInPackage)' != ''">
<ExtractPath>$(_SkiaSharpExpandNativeReferencesPath)</ExtractPath>
<DirectoryName>$(_SkiaSharpExpandNativeReferencesPath)%(ResolvedFileToPublish.Filename)</DirectoryName>
</_SkiaSharpPossibleNativeFramework>
</ItemGroup>

<RemoveDir Directories="$(_SkiaSharpExpandNativeReferencesPath)" />

<MakeDir Directories="%(_SkiaSharpPossibleNativeFramework.ExtractPath)" />
<Exec Command="unzip -d %(_SkiaSharpPossibleNativeFramework.ExtractPath) %(_SkiaSharpPossibleNativeFramework.FullPath)" />

<ItemGroup>
<NativeReference Include="%(_SkiaSharpPossibleNativeFramework.DirectoryName)">
<Kind>Framework</Kind>
<NuGetPackageId>%(NuGetPackageId)</NuGetPackageId>
<NuGetPackageVersion>%(NuGetPackageVersion)</NuGetPackageVersion>
<AssetType>%(AssetType)</AssetType>
<RuntimeIdentifier>$([System.Text.RegularExpressions.Regex]::Match('%(_SkiaSharpPossibleNativeFramework.PathInPackage)', 'runtimes/([^/]+)/native/.*').Groups[1].Value)</RuntimeIdentifier>
</NativeReference>
</ItemGroup>

<Touch Files="$(_SkiaSharpExpandNativeReferencesStamp)" AlwaysCreate="True" />

<ItemGroup>
<FileWrites Include="$(_SkiaSharpExpandNativeReferencesPath)\**" />
<FileWrites Include="$(_SkiaSharpExpandNativeReferencesStamp)" />
<_PossibleNativeFramework Remove="@(_PossibleNativeFramework)" />
</ItemGroup>

</Target>

<!-- temporarily work around https://github.com/xamarin/xamarin-macios/issues/12369 -->
<Target Name="_SkiaSharpCollectFrameworksFixes" AfterTargets="_CollectFrameworks" Condition=" '$(OS)' == 'Unix' ">
<PropertyGroup>
<_SkiaSharpNativeAssetPath>$(_FrameworksDirectory)\libSkiaSharp.framework\libSkiaSharp</_SkiaSharpNativeAssetPath>
<_SkiaSharpIsSymlink Condition="$([MSBuild]::BitwiseAnd(1024, $([System.IO.File]::GetAttributes('$(_SkiaSharpNativeAssetPath)')))) == '1024'">true</_SkiaSharpIsSymlink>
</PropertyGroup>
<RemoveDir Directories="$(_FrameworksDirectory)\libSkiaSharp.framework" Condition="'$(_SkiaSharpIsSymlink)' != 'true'" />
<Exec Command="cp -R $(_SkiaSharpExpandNativeReferencesPath)libSkiaSharp.framework $(_FrameworksDirectory)/libSkiaSharp.framework" Condition="'$(_SkiaSharpIsSymlink)' != 'true'" />
</Target>

</Project>