Skip to content

Commit

Permalink
chore: Fix invalid macos path
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Sep 11, 2024
1 parent 01f4a26 commit 520f8d2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Resizetizer/src/SkiaSharpTools.Initializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public static void Initialize()
}
}

/// <remarks>
/// Initializes SkiaSharp in a .NET Framework environment, by loading the native libraries directly
/// without using System.Runtime.InteropServices.NativeLibrary.
/// </remarks>
private static void NetFxInitialize()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Expand Down Expand Up @@ -81,6 +85,10 @@ private static void NetFxInitialize()
}
}

/// <remarks>
/// Initializes SkiaSharp in a netcore environment, where the assemblies are loaded
/// through the System.Runtime.InteropServices.NativeLibrary, but uses the system dll search paths.
/// </remarks>
private static void NetcoreInitializeWindows()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Expand Down Expand Up @@ -125,7 +133,7 @@ private static void NetCoreInitializeMac()
foreach (var runtimePath in GetRuntimesFolder())
{
var libHarfBuzzSharp = Path.Combine(runtimePath, "libHarfBuzzSharp.dylib");
var libSkiaSharp = Path.Combine(runtimePath, "libSkiaSharp..dylib");
var libSkiaSharp = Path.Combine(runtimePath, "libSkiaSharp.dylib");

if (File.Exists(libHarfBuzzSharp)
&& File.Exists(libSkiaSharp))
Expand Down

0 comments on commit 520f8d2

Please sign in to comment.