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

Support arm64 native assets for Tizen #2324

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
6 changes: 4 additions & 2 deletions binding/HarfBuzzSharp.Classic/HarfBuzzSharp.Classic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'tizen40'">
<!-- Tizen -->
<None Include="..\..\output\native\tizen\armel\libHarfBuzzSharp.*" Link="nuget\build\$(TargetFramework)\arm\%(Filename)%(Extension)" />
<None Include="..\..\output\native\tizen\i386\libHarfBuzzSharp.*" Link="nuget\build\$(TargetFramework)\x86\%(Filename)%(Extension)" />
<None Include="..\..\output\native\tizen\armel\libHarfBuzzSharp.*" Link="nuget\runtimes\tizen-armel\%(Filename)%(Extension)" />
<None Include="..\..\output\native\tizen\arm64\libHarfBuzzSharp.*" Link="nuget\runtimes\tizen-arm64\%(Filename)%(Extension)" />
<None Include="..\..\output\native\tizen\i386\libHarfBuzzSharp.*" Link="nuget\runtimes\tizen-x86\%(Filename)%(Extension)" />
<None Include="..\..\output\native\tizen\i386\libHarfBuzzSharp.*" Link="nuget\runtimes\linux-x86\%(Filename)%(Extension)" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need the linux-x86 runtime? I am not sure we can do this as it will replace the linux binary - and will also cause the tizen binary to run on a linux (desktop) machine.

What we can do is actually just keep the tizen-x86 version, and pack it twice in the tizen nuget.

<None Include="..\HarfBuzzSharp\nuget\build\tizen40\HarfBuzzSharp.targets" Link="nuget\build\$(TargetFramework)\HarfBuzzSharp.targets" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('uap10'))">
Expand Down
19 changes: 0 additions & 19 deletions binding/HarfBuzzSharp/nuget/build/tizen40/HarfBuzzSharp.targets
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<_HarfBuzzSharpNativeLibraryCurrPath>$([System.IO.Path]::GetDirectoryName('$(MSBuildThisFileDirectory)'))</_HarfBuzzSharpNativeLibraryCurrPath>
<_HarfBuzzSharpNativeLibraryDirName>$([System.IO.Path]::GetFileName('$(_HarfBuzzSharpNativeLibraryCurrPath)'))</_HarfBuzzSharpNativeLibraryDirName>
<_HarfBuzzSharpNativeLibraryRootDir>$(MSBuildThisFileDirectory)..\..\build\$(_HarfBuzzSharpNativeLibraryDirName)\</_HarfBuzzSharpNativeLibraryRootDir>
</PropertyGroup>

<ItemGroup>
<TizenTpkFiles Include="$(_HarfBuzzSharpNativeLibraryRootDir)x86\libHarfBuzzSharp.so">
<Visible>false</Visible>
<TizenTpkSubDir>bin\runtimes\linux-x86\native\</TizenTpkSubDir>
<TizenTpkFileName>libHarfBuzzSharp.so</TizenTpkFileName>
</TizenTpkFiles>
<TizenTpkFiles Include="$(_HarfBuzzSharpNativeLibraryRootDir)arm\libHarfBuzzSharp.so">
<Visible>false</Visible>
<TizenTpkSubDir>bin\runtimes\tizen-armel\native\</TizenTpkSubDir>
<TizenTpkFileName>libHarfBuzzSharp.so</TizenTpkFileName>
</TizenTpkFiles>
</ItemGroup>

</Project>
6 changes: 4 additions & 2 deletions binding/SkiaSharp.Classic/SkiaSharp.Classic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'tizen40'">
<!-- Tizen -->
<None Include="..\..\output\native\tizen\armel\libSkiaSharp.*" Link="nuget\build\$(TargetFramework)\arm\libSkiaSharp.so" />
<None Include="..\..\output\native\tizen\i386\libSkiaSharp.*" Link="nuget\build\$(TargetFramework)\x86\libSkiaSharp.so" />
<None Include="..\..\output\native\tizen\armel\libSkiaSharp.*" Link="nuget\runtimes\tizen-armel\libSkiaSharp.so" />
<None Include="..\..\output\native\tizen\arm64\libSkiaSharp.*" Link="nuget\runtimes\tizen-arm64\libSkiaSharp.so" />
<None Include="..\..\output\native\tizen\i386\libSkiaSharp.*" Link="nuget\runtimes\tizen-x86\libSkiaSharp.so" />
<None Include="..\..\output\native\tizen\i386\libSkiaSharp.*" Link="nuget\runtimes\linux-x86\libSkiaSharp.so" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, don't copy here, just pack twice.

<None Include="..\SkiaSharp\nuget\build\tizen40\SkiaSharp.targets" Link="nuget\build\$(TargetFramework)\SkiaSharp.targets" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('uap10'))">
Expand Down
19 changes: 0 additions & 19 deletions binding/SkiaSharp/nuget/build/tizen40/SkiaSharp.targets
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<_SkiaSharpNativeLibraryCurrPath>$([System.IO.Path]::GetDirectoryName('$(MSBuildThisFileDirectory)'))</_SkiaSharpNativeLibraryCurrPath>
<_SkiaSharpNativeLibraryDirName>$([System.IO.Path]::GetFileName('$(_SkiaSharpNativeLibraryCurrPath)'))</_SkiaSharpNativeLibraryDirName>
<_SkiaSharpNativeLibraryRootDir>$(MSBuildThisFileDirectory)..\..\build\$(_SkiaSharpNativeLibraryDirName)\</_SkiaSharpNativeLibraryRootDir>
</PropertyGroup>

<ItemGroup>
<TizenTpkFiles Include="$(_SkiaSharpNativeLibraryRootDir)x86\libSkiaSharp.so">
<Visible>false</Visible>
<TizenTpkSubDir>bin\runtimes\linux-x86\native\</TizenTpkSubDir>
<TizenTpkFileName>libSkiaSharp.so</TizenTpkFileName>
</TizenTpkFiles>
<TizenTpkFiles Include="$(_SkiaSharpNativeLibraryRootDir)arm\libSkiaSharp.so">
<Visible>false</Visible>
<TizenTpkSubDir>bin\runtimes\tizen-armel\native\</TizenTpkSubDir>
<TizenTpkFileName>libSkiaSharp.so</TizenTpkFileName>
</TizenTpkFiles>
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions cake/native-shared.cake
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ bool Skip(string arch)
case "armv7k":
arch = "arm";
break;
case "arm64":
case "arm64_32":
case "arm64-v8a":
arch = "arm64";
Expand Down
2 changes: 2 additions & 0 deletions native/tizen/build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Task("libSkiaSharp")
.Does(() =>
{
Build("armel", "arm", "mobile-4.0-device.core");
Build("arm64", "arm64", "mobile-4.0-device.core");
Build("i386", "x86", "mobile-4.0-emulator.core");

void Build(string arch, string skiaArch, string rootstrap)
Expand Down Expand Up @@ -54,6 +55,7 @@ Task("libHarfBuzzSharp")
.Does(() =>
{
Build("armel", "arm", "mobile-4.0-device.core");
Build("arm64", "arm64", "mobile-4.0-device.core");
Build("i386", "x86", "mobile-4.0-emulator.core");

void Build(string arch, string cliArch, string rootstrap)
Expand Down
9 changes: 7 additions & 2 deletions nuget/HarfBuzzSharp.NativeAssets.Tizen.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
<dependencies>
<group targetFramework="tizen40">
</group>
<group targetFramework="net6.0-tizen7.0">
</group>
</dependencies>

</metadata>
Expand All @@ -39,11 +41,14 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
<file src="build/tizen40/HarfBuzzSharp.targets" target="buildTransitive/tizen40/HarfBuzzSharp.NativeAssets.Tizen.targets" />

<!-- libHarfBuzzSharp.dll and other native files -->
<file src="build/tizen40/arm/libHarfBuzzSharp.so" />
<file src="build/tizen40/x86/libHarfBuzzSharp.so" />
<file src="runtimes/linux-x86/native/libHarfBuzzSharp.so" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<file src="runtimes/linux-x86/native/libHarfBuzzSharp.so" />
<file src="runtimes/tizen-x86/native/libHarfBuzzSharp.so" target="runtimes/linux-x86/native/libHarfBuzzSharp.so" />

<file src="runtimes/tizen-x86/native/libHarfBuzzSharp.so" />
<file src="runtimes/tizen-armel/native/libHarfBuzzSharp.so" />
<file src="runtimes/tizen-arm64/native/libHarfBuzzSharp.so" />

<!-- placeholders -->
<file src="_._" target="lib/tizen40/_._" />
<file src="_._" target="lib/net6.0-tizen7.0/_._" />

<!-- legal -->
<file src="LICENSE.txt" />
Expand Down
9 changes: 7 additions & 2 deletions nuget/SkiaSharp.NativeAssets.Tizen.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
<dependencies>
<group targetFramework="tizen40">
</group>
<group targetFramework="net6.0-tizen7.0">
</group>
</dependencies>

</metadata>
Expand All @@ -40,11 +42,14 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
<file src="build/tizen40/SkiaSharp.targets" target="buildTransitive/tizen40/SkiaSharp.NativeAssets.Tizen.targets" />

<!-- libSkiaSharp.dll and other native files -->
<file src="build/tizen40/arm/libSkiaSharp.so" />
<file src="build/tizen40/x86/libSkiaSharp.so" />
<file src="runtimes/linux-x86/native/libSkiaSharp.so" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<file src="runtimes/linux-x86/native/libSkiaSharp.so" />
<file src="runtimes/tizen-x86/native/libSkiaSharp.so" target="runtimes/linux-x86/native/libSkiaSharp.so" />

<file src="runtimes/tizen-x86/native/libSkiaSharp.so" />
<file src="runtimes/tizen-armel/native/libSkiaSharp.so" />
<file src="runtimes/tizen-arm64/native/libSkiaSharp.so" />

<!-- placeholders -->
<file src="_._" target="lib/tizen40/_._" />
<file src="_._" target="lib/net6.0-tizen7.0/_._" />

<!-- legal -->
<file src="LICENSE.txt" />
Expand Down