Skip to content

Commit

Permalink
chore: Adjust linux path
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Sep 11, 2024
1 parent 8c6bb1b commit 01f4a26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Resizetizer/src/SkiaSharpTools.Initializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static IntPtr ImportResolver(string libraryName, Assembly assembly, DllImportSea
if (libraryName.Equals("libHarfBuzzSharp", StringComparison.OrdinalIgnoreCase)
|| libraryName.Equals("HarfBuzzSharp", StringComparison.OrdinalIgnoreCase))
{
if (!LinuxTryLoad("libHarfBuzzSharp.dll", out libHandle)
if (!LinuxTryLoad("libHarfBuzzSharp.so", out libHandle)
&& !_tryLoad("libHarfBuzzSharp.dll", typeof(SkiaSharpTools).Assembly, searchFlags, out libHandle))
{
throw new InvalidOperationException($"Failed to load libHarfBuzzSharp");
Expand All @@ -206,7 +206,7 @@ static IntPtr ImportResolver(string libraryName, Assembly assembly, DllImportSea
if (libraryName.Equals("libSkiaSharp", StringComparison.OrdinalIgnoreCase)
|| libraryName.Equals("SkiaSharp", StringComparison.OrdinalIgnoreCase))
{
if (!LinuxTryLoad("libSkiaSharp.dll", out libHandle)
if (!LinuxTryLoad("libSkiaSharp.so", out libHandle)
&& !_tryLoad("libSkiaSharp.dll", typeof(SkiaSharpTools).Assembly, searchFlags, out libHandle))
{
throw new InvalidOperationException($"Failed to load libSkiaSharp");
Expand All @@ -219,7 +219,7 @@ bool LinuxTryLoad(string path, out IntPtr handle)
{
foreach (var runtimePath in GetRuntimesFolder())
{
handle = Linux.dlopen(path);
handle = Linux.dlopen(Path.Combine(runtimePath, path));

if (handle != IntPtr.Zero)
{
Expand Down

0 comments on commit 01f4a26

Please sign in to comment.