aboutsummaryrefslogtreecommitdiffstatsci
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-10-31 18:26:25 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-10-31 18:26:25 +0100
commit860eec4c0a2dd1642518eefcbec4cdf8a63091c9 (patch)
treebe6efd58cfad240c1247edfbcb21054acc5042be
parent6f2069f51fd45b0bd15a1e6531e8089af921c29c (diff)
add message for windows on dll not found
-rw-r--r--Crow/src/Interface.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Crow/src/Interface.cs b/Crow/src/Interface.cs
index a41d5dae..ac8c73d4 100644
--- a/Crow/src/Interface.cs
+++ b/Crow/src/Interface.cs
@@ -83,7 +83,15 @@ namespace Crow
switch (libraryName)
{
case "cairo":
- return NativeLibrary.Load("cairo-2", assembly, null);
+ IntPtr cairoNative = NativeLibrary.Load("cairo-2", assembly, null);
+ if (cairoNative == IntPtr.Zero && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
+ Console.WriteLine ("[Error] Native dlls required by crow are not found.");
+ Console.WriteLine ("You can download them here:\n\thttps://onedrive.live.com/download?cid=B3181664476E9B48&resid=B3181664476E9B48%21493&authkey=AJCso6KAKMCBfAM");
+ Console.WriteLine ("Then extract them in one of the following directory or in your build target one: ");
+ foreach (string dir in System.AppContext.GetData("NATIVE_DLL_SEARCH_DIRECTORIES").ToString().Split (';'))
+ Console.WriteLine ($"\t- {dir}");
+ }
+ return cairoNative;
/*case "glfw3":
return NativeLibrary.Load("glfw", assembly, null);*/
case "rsvg-2.40":