diff --git a/Source/Libs/GtkSharp/GtkSharp.csproj b/Source/Libs/GtkSharp/GtkSharp.csproj index 7e809048d..bcb3f4097 100644 --- a/Source/Libs/GtkSharp/GtkSharp.csproj +++ b/Source/Libs/GtkSharp/GtkSharp.csproj @@ -10,12 +10,15 @@ GtkSharp is a C# wrapper for the Gtk library. gtk;gtksharp;gtk-sharp;wrapper + ..\..\..\BuildOutput\Debug + ..\..\..\BuildOutput\Release + GLibSharp @@ -36,173 +39,15 @@ PangoSharp + %(RecursiveDir)%(Filename)%(Extension) + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - - - runtimes\win-x64\native - PreserveNewest - + + diff --git a/Source/Libs/GtkSharp/GtkSharp.targets b/Source/Libs/GtkSharp/GtkSharp.targets new file mode 100644 index 000000000..c2b39d9c0 --- /dev/null +++ b/Source/Libs/GtkSharp/GtkSharp.targets @@ -0,0 +1,16 @@ + + + + https://github.com/GtkSharp/Dependencies/raw/master/gtk-3.24.zip + $(LOCALAPPDATA)\Gtk\3.24 + + + + + + + + + + + \ No newline at end of file diff --git a/Source/Libs/GtkSharp/windows-x64/atk-1.dll b/Source/Libs/GtkSharp/windows-x64/atk-1.dll deleted file mode 100644 index d842a3f2d..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/atk-1.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/bz2.dll b/Source/Libs/GtkSharp/windows-x64/bz2.dll deleted file mode 100644 index bdcb36502..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/bz2.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/cairo-gobject.dll b/Source/Libs/GtkSharp/windows-x64/cairo-gobject.dll deleted file mode 100644 index 8bd18b780..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/cairo-gobject.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/cairo.dll b/Source/Libs/GtkSharp/windows-x64/cairo.dll deleted file mode 100644 index 79678c8d4..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/cairo.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/epoxy-0.dll b/Source/Libs/GtkSharp/windows-x64/epoxy-0.dll deleted file mode 100644 index 2db5d7eda..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/epoxy-0.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/expat.dll b/Source/Libs/GtkSharp/windows-x64/expat.dll deleted file mode 100644 index 9d18183da..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/expat.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/fontconfig.dll b/Source/Libs/GtkSharp/windows-x64/fontconfig.dll deleted file mode 100644 index 8c3aba760..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/fontconfig.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/freetype.dll b/Source/Libs/GtkSharp/windows-x64/freetype.dll deleted file mode 100644 index 9b189a1d8..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/freetype.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/gailutil-3.dll b/Source/Libs/GtkSharp/windows-x64/gailutil-3.dll deleted file mode 100644 index 37b2714e1..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/gailutil-3.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/gdk-3.dll b/Source/Libs/GtkSharp/windows-x64/gdk-3.dll deleted file mode 100644 index 05a8bed85..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/gdk-3.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/gdk_pixbuf-2.dll b/Source/Libs/GtkSharp/windows-x64/gdk_pixbuf-2.dll deleted file mode 100644 index 4ac739f56..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/gdk_pixbuf-2.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/gio-2.dll b/Source/Libs/GtkSharp/windows-x64/gio-2.dll deleted file mode 100644 index ea13ad901..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/gio-2.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/glib-2.dll b/Source/Libs/GtkSharp/windows-x64/glib-2.dll deleted file mode 100644 index bb6c0de17..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/glib-2.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/gmodule-2.dll b/Source/Libs/GtkSharp/windows-x64/gmodule-2.dll deleted file mode 100644 index afd394d33..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/gmodule-2.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/gobject-2.dll b/Source/Libs/GtkSharp/windows-x64/gobject-2.dll deleted file mode 100644 index 158be66de..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/gobject-2.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/gthread-2.dll b/Source/Libs/GtkSharp/windows-x64/gthread-2.dll deleted file mode 100644 index b58dbdbdd..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/gthread-2.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/gtk-3.dll b/Source/Libs/GtkSharp/windows-x64/gtk-3.dll deleted file mode 100644 index a4a7a67fc..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/gtk-3.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/harfbuzz.dll b/Source/Libs/GtkSharp/windows-x64/harfbuzz.dll deleted file mode 100644 index 8ccd63e42..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/harfbuzz.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/libcharset.dll b/Source/Libs/GtkSharp/windows-x64/libcharset.dll deleted file mode 100644 index e4dccc2a6..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/libcharset.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/libiconv.dll b/Source/Libs/GtkSharp/windows-x64/libiconv.dll deleted file mode 100644 index 640bb2ccb..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/libiconv.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/libintl.dll b/Source/Libs/GtkSharp/windows-x64/libintl.dll deleted file mode 100644 index 149141eb5..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/libintl.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/libpng16.dll b/Source/Libs/GtkSharp/windows-x64/libpng16.dll deleted file mode 100644 index a7d4dc15f..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/libpng16.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/pango-1.dll b/Source/Libs/GtkSharp/windows-x64/pango-1.dll deleted file mode 100644 index fab8d0d74..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/pango-1.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/pangocairo-1.dll b/Source/Libs/GtkSharp/windows-x64/pangocairo-1.dll deleted file mode 100644 index 0c48077c9..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/pangocairo-1.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/pangoft2-1.dll b/Source/Libs/GtkSharp/windows-x64/pangoft2-1.dll deleted file mode 100644 index a3e78d7d1..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/pangoft2-1.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/pangowin32-1.dll b/Source/Libs/GtkSharp/windows-x64/pangowin32-1.dll deleted file mode 100644 index f97fc5050..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/pangowin32-1.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/pcre.dll b/Source/Libs/GtkSharp/windows-x64/pcre.dll deleted file mode 100644 index b22b6379e..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/pcre.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/pcre16.dll b/Source/Libs/GtkSharp/windows-x64/pcre16.dll deleted file mode 100644 index 1eb3b32fa..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/pcre16.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/pcre32.dll b/Source/Libs/GtkSharp/windows-x64/pcre32.dll deleted file mode 100644 index befefc28e..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/pcre32.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/pcrecpp.dll b/Source/Libs/GtkSharp/windows-x64/pcrecpp.dll deleted file mode 100644 index a7d0eeb31..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/pcrecpp.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/pcreposix.dll b/Source/Libs/GtkSharp/windows-x64/pcreposix.dll deleted file mode 100644 index 770d31a11..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/pcreposix.dll and /dev/null differ diff --git a/Source/Libs/GtkSharp/windows-x64/zlib1.dll b/Source/Libs/GtkSharp/windows-x64/zlib1.dll deleted file mode 100644 index 5dd74ccd8..000000000 Binary files a/Source/Libs/GtkSharp/windows-x64/zlib1.dll and /dev/null differ diff --git a/Source/Libs/Shared/GLibrary.cs b/Source/Libs/Shared/GLibrary.cs index 6db996b32..8dc9615ca 100644 --- a/Source/Libs/Shared/GLibrary.cs +++ b/Source/Libs/Shared/GLibrary.cs @@ -36,17 +36,25 @@ class GLibrary return ret; if (FuncLoader.IsWindows) - ret = LoadLibrary(_libraryDefinitions[library][0]); + { + ret = FuncLoader.LoadLibrary(_libraryDefinitions[library][0]); + + if (ret == IntPtr.Zero) + { + SetDllDirectory(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Gtk", "3.24")); + ret = FuncLoader.LoadLibrary(_libraryDefinitions[library][0]); + } + } else if (FuncLoader.IsOSX) - ret = LoadLibrary(_libraryDefinitions[library][2]); + ret = FuncLoader.LoadLibrary(_libraryDefinitions[library][2]); else - ret = LoadLibrary(_libraryDefinitions[library][1]); + ret = FuncLoader.LoadLibrary(_libraryDefinitions[library][1]); if (ret == IntPtr.Zero) { for (int i = 0; i < _libraryDefinitions[library].Length; i++) { - ret = LoadLibrary(_libraryDefinitions[library][i]); + ret = FuncLoader.LoadLibrary(_libraryDefinitions[library][i]); if (ret != IntPtr.Zero) break; @@ -62,27 +70,4 @@ class GLibrary _libraries[library] = ret; return ret; } - - private static IntPtr LoadLibrary(string libname) - { - var ret = FuncLoader.LoadLibrary(libname); - if (ret != IntPtr.Zero) - return ret; - - // Hacky solution to load libraries on Windows - if (FuncLoader.IsWindows) - { - var assemblyLocation = Path.GetDirectoryName(typeof(GLibrary).Assembly.Location); - var assemblyVersionDir = Path.GetDirectoryName(Path.GetDirectoryName(assemblyLocation)); - var version = Path.GetFileName(assemblyVersionDir); - var gtkdir = Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(assemblyVersionDir)), "gtksharp"); - var nativeLibDir = Path.Combine(gtkdir, version, "runtimes", "win-x64", "native"); - - SetDllDirectory(nativeLibDir); - - ret = FuncLoader.LoadLibrary(Path.Combine(nativeLibDir, libname)); - } - - return ret; - } } \ No newline at end of file