diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100755 index 3b6641073..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "git.ignoreLimitWarning": true -} \ No newline at end of file diff --git a/CakeScripts/GAssembly.cs b/CakeScripts/GAssembly.cs index 339947072..158aacddb 100755 --- a/CakeScripts/GAssembly.cs +++ b/CakeScripts/GAssembly.cs @@ -3,7 +3,7 @@ using P = System.IO.Path; public class GAssembly { - public static ICakeContext Cake; + private ICakeContext Cake; public bool Init { get; private set; } public string Name { get; private set; } @@ -13,12 +13,13 @@ public class GAssembly public string RawApi { get; private set; } public string Metadata { get; private set; } - public string[] Includes { get; set; } + public string[] Deps { get; set; } public string ExtraArgs { get; set; } public GAssembly(string name) { - Includes = new string[0]; + Cake = Settings.Cake; + Deps = new string[0]; Name = name; Dir = P.Combine("Source", "Libs", name); @@ -32,20 +33,21 @@ public class GAssembly public void Prepare() { + Cake.CreateDirectory(GDir); + // Raw API file found, time to generate some stuff!!! if (Cake.FileExists(RawApi)) { - Cake.DeleteDirectory(GDir, true); - Cake.CreateDirectory(GDir); - // Fixup API file var tempapi = P.Combine(GDir, Name + "-api.xml"); var symfile = P.Combine(Dir, Name + "-symbols.xml"); Cake.CopyFile(RawApi, tempapi); GapiFixup.Run(tempapi, Metadata, Cake.FileExists(symfile) ? symfile : string.Empty); + var extraargs = ExtraArgs + " "; + // Locate APIs to include - foreach(var dep in Includes) + foreach(var dep in Deps) { var ipath = P.Combine("Source", "Libs", dep, dep + "-api.xml"); @@ -53,17 +55,14 @@ public class GAssembly ipath = P.Combine("Source", "Libs", dep, "Generated", dep + "-api.xml"); if (Cake.FileExists(ipath)) - { - ExtraArgs += "--include=" + ipath + " "; - ExtraArgs += "--include=" + ipath + " "; - } + extraargs += " --include=" + ipath + " "; } // Generate code - GAssembly.Cake.DotNetCoreExecute(P.Combine("BuildOutput", "Generator", "GapiCodegen.dll"), + Cake.DotNetCoreExecute("BuildOutput/Generator/GapiCodegen.dll", "--outdir=" + GDir + " " + - "--schema=" + P.Combine("Source", "Libs", "Gapi.xsd") + " " + - ExtraArgs + " " + + "--schema=Source/Libs/Gapi.xsd " + + extraargs + " " + "--assembly-name=" + Name + " " + "--generate=" + tempapi ); @@ -74,6 +73,7 @@ public class GAssembly public void Clean() { - Cake.DeleteDirectory(GDir, true); + if (Cake.DirectoryExists(GDir)) + Cake.DeleteDirectory(GDir, new DeleteDirectorySettings { Recursive = true, Force = true }); } } diff --git a/CakeScripts/Settings.cs b/CakeScripts/Settings.cs new file mode 100755 index 000000000..972436d03 --- /dev/null +++ b/CakeScripts/Settings.cs @@ -0,0 +1,7 @@ + +class Settings +{ + public static ICakeContext Cake { get; set; } + public static string BuildTarget { get; set; } + public static string Assembly { get; set; } +} \ No newline at end of file diff --git a/Source/Libs/AssemblyInfo.cs b/Source/Libs/AssemblyInfo.cs index c18c06f36..08ed57be6 100755 --- a/Source/Libs/AssemblyInfo.cs +++ b/Source/Libs/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; using System.Runtime.CompilerServices; -[assembly:AssemblyVersion("1.0.0.0")] -[assembly:AssemblyDelaySign(false)] +[assembly:AssemblyVersion("3.22.24.0")] diff --git a/Source/Libs/AssemblyInfo.cs.in b/Source/Libs/AssemblyInfo.cs.in deleted file mode 100755 index 37a374aa1..000000000 --- a/Source/Libs/AssemblyInfo.cs.in +++ /dev/null @@ -1,5 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly:AssemblyVersion("@API_VERSION@")] -[assembly:AssemblyDelaySign(false)] diff --git a/Source/Libs/AtkSharp/AtkSharp-api.raw b/Source/Libs/AtkSharp/AtkSharp-api.raw index 4be018fc8..78ab45951 100755 --- a/Source/Libs/AtkSharp/AtkSharp-api.raw +++ b/Source/Libs/AtkSharp/AtkSharp-api.raw @@ -6,7 +6,7 @@ Please DO NOT MODIFY THIS FILE, modify .metadata files instead. --> - + diff --git a/Source/Libs/AtkSharp/AtkSharp.csproj b/Source/Libs/AtkSharp/AtkSharp.csproj index cd6065d0f..fc56a1f8c 100755 --- a/Source/Libs/AtkSharp/AtkSharp.csproj +++ b/Source/Libs/AtkSharp/AtkSharp.csproj @@ -1,5 +1,4 @@ - true netstandard2.0 @@ -16,5 +15,7 @@ GLibSharp - + + + diff --git a/Source/Libs/AtkSharp/Class1.cs b/Source/Libs/AtkSharp/Class1.cs deleted file mode 100755 index d29e2217a..000000000 --- a/Source/Libs/AtkSharp/Class1.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -namespace AtkSharp -{ - public class Class1 - { - } -} diff --git a/Source/Libs/AtkSharp/Global.cs b/Source/Libs/AtkSharp/Global.cs index 0424c87d7..0ea42072a 100755 --- a/Source/Libs/AtkSharp/Global.cs +++ b/Source/Libs/AtkSharp/Global.cs @@ -28,7 +28,7 @@ namespace Atk { public partial class Global { - [DllImport ("libatk-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport ("libatk-1.0-0", CallingConvention = CallingConvention.Cdecl)] static extern uint atk_add_global_event_listener (GLib.Signal.EmissionHookNative hook, IntPtr event_type); public static uint AddGlobalEventListener (GLib.Signal.EmissionHook hook, string event_type) diff --git a/Source/Libs/AtkSharp/linux-x64/libatk-1.0-0.so b/Source/Libs/AtkSharp/linux-x64/libatk-1.0-0.so new file mode 100755 index 000000000..3fcc72a74 Binary files /dev/null and b/Source/Libs/AtkSharp/linux-x64/libatk-1.0-0.so differ diff --git a/Source/Libs/CairoSharp/AssemblyInfo.cs.in b/Source/Libs/CairoSharp/AssemblyInfo.cs.in deleted file mode 100755 index cd085cac2..000000000 --- a/Source/Libs/CairoSharp/AssemblyInfo.cs.in +++ /dev/null @@ -1,5 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly:AssemblyVersion("@CAIRO_API_VERSION@")] -[assembly:AssemblyDelaySign(false)] diff --git a/Source/Libs/CairoSharp/CairoSharp.csproj b/Source/Libs/CairoSharp/CairoSharp.csproj index 4c77bff7b..62f7436b7 100755 --- a/Source/Libs/CairoSharp/CairoSharp.csproj +++ b/Source/Libs/CairoSharp/CairoSharp.csproj @@ -1,5 +1,4 @@ - true netstandard2.0 @@ -11,5 +10,7 @@ ..\..\..\BuildOutput\Release - + + + diff --git a/Source/Libs/CairoSharp/Class1.cs b/Source/Libs/CairoSharp/Class1.cs deleted file mode 100755 index 7cd3f767a..000000000 --- a/Source/Libs/CairoSharp/Class1.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -namespace CairoSharp -{ - public class Class1 - { - } -} diff --git a/Source/Libs/CairoSharp/NativeMethods.cs b/Source/Libs/CairoSharp/NativeMethods.cs index 20fa29998..1037ac589 100755 --- a/Source/Libs/CairoSharp/NativeMethods.cs +++ b/Source/Libs/CairoSharp/NativeMethods.cs @@ -41,7 +41,7 @@ namespace Cairo internal static class NativeMethods { - const string cairo = "libcairo-2.dll"; + const string cairo = "libcairo-2"; [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] internal static extern void cairo_append_path (IntPtr cr, IntPtr path); diff --git a/Source/Libs/CairoSharp/linux-x64/libcairo-2.so b/Source/Libs/CairoSharp/linux-x64/libcairo-2.so new file mode 100755 index 000000000..f828c0df3 Binary files /dev/null and b/Source/Libs/CairoSharp/linux-x64/libcairo-2.so differ diff --git a/Source/Libs/GtkSharp.sln b/Source/Libs/GLibSharp.sln similarity index 100% rename from Source/Libs/GtkSharp.sln rename to Source/Libs/GLibSharp.sln diff --git a/Source/Libs/GLibSharp/Class1.cs b/Source/Libs/GLibSharp/Class1.cs deleted file mode 100755 index b7eb86f3d..000000000 --- a/Source/Libs/GLibSharp/Class1.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -namespace GLibSharp -{ - public class Class1 - { - } -} diff --git a/Source/Libs/GLibSharp/GLibSharp-api.xml b/Source/Libs/GLibSharp/GLibSharp-api.xml index 4aa4bfda8..225788eb3 100755 --- a/Source/Libs/GLibSharp/GLibSharp-api.xml +++ b/Source/Libs/GLibSharp/GLibSharp-api.xml @@ -1,6 +1,6 @@ - + diff --git a/Source/Libs/GLibSharp/GLibSharp.csproj b/Source/Libs/GLibSharp/GLibSharp.csproj index 4c77bff7b..ee7be4555 100755 --- a/Source/Libs/GLibSharp/GLibSharp.csproj +++ b/Source/Libs/GLibSharp/GLibSharp.csproj @@ -1,5 +1,4 @@ - true netstandard2.0 @@ -11,5 +10,9 @@ ..\..\..\BuildOutput\Release - + + + + + diff --git a/Source/Libs/GLibSharp/Global.cs b/Source/Libs/GLibSharp/Global.cs index 46ebeac6e..0e35d776b 100755 --- a/Source/Libs/GLibSharp/Global.cs +++ b/Source/Libs/GLibSharp/Global.cs @@ -31,8 +31,8 @@ namespace GLib { //this is a static class private Global () {} - internal const string GLibNativeDll = "libglib-2.0-0.dll"; - internal const string GObjectNativeDll = "libgobject-2.0-0.dll"; + internal const string GLibNativeDll = "libglib-2.0-0"; + internal const string GObjectNativeDll = "libgobject-2.0-0"; internal static bool IsWindowsPlatform { get { diff --git a/Source/Libs/GLibSharp/linux-x64/libglib-2.0-0.so b/Source/Libs/GLibSharp/linux-x64/libglib-2.0-0.so new file mode 100755 index 000000000..8459d1bd0 Binary files /dev/null and b/Source/Libs/GLibSharp/linux-x64/libglib-2.0-0.so differ diff --git a/Source/Libs/GLibSharp/linux-x64/libgobject-2.0-0.so b/Source/Libs/GLibSharp/linux-x64/libgobject-2.0-0.so new file mode 100755 index 000000000..22eb9c6a3 Binary files /dev/null and b/Source/Libs/GLibSharp/linux-x64/libgobject-2.0-0.so differ diff --git a/Source/Libs/GLibSharp/linux-x64/libgthread-2.0-0.so b/Source/Libs/GLibSharp/linux-x64/libgthread-2.0-0.so new file mode 100755 index 000000000..0245be6fc Binary files /dev/null and b/Source/Libs/GLibSharp/linux-x64/libgthread-2.0-0.so differ diff --git a/Source/Libs/GdkSharp/Class1.cs b/Source/Libs/GdkSharp/Class1.cs deleted file mode 100755 index d3c0869f4..000000000 --- a/Source/Libs/GdkSharp/Class1.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -namespace GdkSharp -{ - public class Class1 - { - } -} diff --git a/Source/Libs/GdkSharp/GdkSharp-api.raw b/Source/Libs/GdkSharp/GdkSharp-api.raw index 4ba1a40d5..c26e90ab7 100755 --- a/Source/Libs/GdkSharp/GdkSharp-api.raw +++ b/Source/Libs/GdkSharp/GdkSharp-api.raw @@ -6,7 +6,7 @@ Please DO NOT MODIFY THIS FILE, modify .metadata files instead. --> - + @@ -5301,7 +5301,7 @@ - + diff --git a/Source/Libs/GdkSharp/GdkSharp.csproj b/Source/Libs/GdkSharp/GdkSharp.csproj index 04bc7a74d..2b6cad7b0 100755 --- a/Source/Libs/GdkSharp/GdkSharp.csproj +++ b/Source/Libs/GdkSharp/GdkSharp.csproj @@ -25,5 +25,9 @@ PangoSharp + + + + diff --git a/Source/Libs/GdkSharp/Global.cs b/Source/Libs/GdkSharp/Global.cs index 357c799c3..f25b8b822 100755 --- a/Source/Libs/GdkSharp/Global.cs +++ b/Source/Libs/GdkSharp/Global.cs @@ -26,7 +26,7 @@ namespace Gdk { public partial class Global { - internal const string GdkNativeDll = "libgdk-3-0.dll"; + internal const string GdkNativeDll = "libgdk-3-0"; [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_list_visuals (); diff --git a/Source/Libs/GdkSharp/PixbufLoader.cs b/Source/Libs/GdkSharp/PixbufLoader.cs index 8ac99fdee..6817bb213 100755 --- a/Source/Libs/GdkSharp/PixbufLoader.cs +++ b/Source/Libs/GdkSharp/PixbufLoader.cs @@ -28,7 +28,7 @@ namespace Gdk { public partial class PixbufLoader { - [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport ("libgobject-2.0-0", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_object_ref (IntPtr handle); internal IntPtr PixbufHandle { diff --git a/Source/Libs/GdkSharp/Pixdata.cs b/Source/Libs/GdkSharp/Pixdata.cs index 266d93651..cb9f31d1b 100755 --- a/Source/Libs/GdkSharp/Pixdata.cs +++ b/Source/Libs/GdkSharp/Pixdata.cs @@ -23,7 +23,7 @@ namespace Gdk { public partial struct Pixdata { - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport ("libgdk_pixbuf-2.0-0", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixdata_serialize (ref Gdk.Pixdata raw, out uint len); public byte [] Serialize () { diff --git a/Source/Libs/GdkSharp/Window.cs b/Source/Libs/GdkSharp/Window.cs index 22898d52a..5c5c772ad 100755 --- a/Source/Libs/GdkSharp/Window.cs +++ b/Source/Libs/GdkSharp/Window.cs @@ -77,7 +77,7 @@ namespace Gdk { } } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport ("libgobject-2.0-0", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_object_ref (IntPtr raw); [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] diff --git a/Source/Libs/GdkSharp/linux-x64/libgdk-3-0.so b/Source/Libs/GdkSharp/linux-x64/libgdk-3-0.so new file mode 100755 index 000000000..e3476e74d Binary files /dev/null and b/Source/Libs/GdkSharp/linux-x64/libgdk-3-0.so differ diff --git a/Source/Libs/GdkSharp/linux-x64/libgdk_pixbuf-2.0-0.so b/Source/Libs/GdkSharp/linux-x64/libgdk_pixbuf-2.0-0.so new file mode 100755 index 000000000..a9ee0d021 Binary files /dev/null and b/Source/Libs/GdkSharp/linux-x64/libgdk_pixbuf-2.0-0.so differ diff --git a/Source/Libs/GioSharp/Class1.cs b/Source/Libs/GioSharp/Class1.cs deleted file mode 100755 index d80dafbd9..000000000 --- a/Source/Libs/GioSharp/Class1.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -namespace GioSharp -{ - public class Class1 - { - } -} diff --git a/Source/Libs/GioSharp/GioGlobal.cs b/Source/Libs/GioSharp/GioGlobal.cs index c01489ce0..059f60564 100755 --- a/Source/Libs/GioSharp/GioGlobal.cs +++ b/Source/Libs/GioSharp/GioGlobal.cs @@ -24,6 +24,6 @@ namespace GLib { public partial class GioGlobal { - internal const string GioNativeDll = "libgio-2.0-0.dll"; + internal const string GioNativeDll = "libgio-2.0-0"; } } diff --git a/Source/Libs/GioSharp/GioSharp-api.raw b/Source/Libs/GioSharp/GioSharp-api.raw index 27891c837..3520fab97 100755 --- a/Source/Libs/GioSharp/GioSharp-api.raw +++ b/Source/Libs/GioSharp/GioSharp-api.raw @@ -6,7 +6,7 @@ Please DO NOT MODIFY THIS FILE, modify .metadata files instead. --> - + diff --git a/Source/Libs/GioSharp/GioSharp.csproj b/Source/Libs/GioSharp/GioSharp.csproj index cd6065d0f..b7fb87199 100755 --- a/Source/Libs/GioSharp/GioSharp.csproj +++ b/Source/Libs/GioSharp/GioSharp.csproj @@ -16,5 +16,8 @@ GLibSharp + + + diff --git a/Source/Libs/GioSharp/linux-x64/libgio-2.0-0.so b/Source/Libs/GioSharp/linux-x64/libgio-2.0-0.so new file mode 100755 index 000000000..15aac75fb Binary files /dev/null and b/Source/Libs/GioSharp/linux-x64/libgio-2.0-0.so differ diff --git a/Source/Libs/GtkSharp/Class1.cs b/Source/Libs/GtkSharp/Class1.cs deleted file mode 100755 index 1367c0c30..000000000 --- a/Source/Libs/GtkSharp/Class1.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -namespace GtkSharp -{ - public class Class1 - { - } -} diff --git a/Source/Libs/GtkSharp/Global.cs b/Source/Libs/GtkSharp/Global.cs index b5ae6c364..9cd528f89 100755 --- a/Source/Libs/GtkSharp/Global.cs +++ b/Source/Libs/GtkSharp/Global.cs @@ -20,7 +20,7 @@ namespace Gtk { public partial class Global { - internal const string GtkNativeDll = "libgtk-3-0.dll"; + internal const string GtkNativeDll = "libgtk-3-0"; public static bool ShowUri (string uri) { diff --git a/Source/Libs/GtkSharp/GtkSharp-api.raw b/Source/Libs/GtkSharp/GtkSharp-api.raw index 56ae9d1a5..e47061d17 100755 --- a/Source/Libs/GtkSharp/GtkSharp-api.raw +++ b/Source/Libs/GtkSharp/GtkSharp-api.raw @@ -6,7 +6,7 @@ Please DO NOT MODIFY THIS FILE, modify .metadata files instead. --> - + diff --git a/Source/Libs/GtkSharp/GtkSharp.csproj b/Source/Libs/GtkSharp/GtkSharp.csproj index 930ade95a..fa5f9fe40 100755 --- a/Source/Libs/GtkSharp/GtkSharp.csproj +++ b/Source/Libs/GtkSharp/GtkSharp.csproj @@ -31,5 +31,7 @@ PangoSharp - - + + + + \ No newline at end of file diff --git a/Source/Libs/GtkSharp/linux-x64/libgtk-3-0.so b/Source/Libs/GtkSharp/linux-x64/libgtk-3-0.so new file mode 100755 index 000000000..cde1f5254 Binary files /dev/null and b/Source/Libs/GtkSharp/linux-x64/libgtk-3-0.so differ diff --git a/Source/Libs/PangoSharp/AttrBackground.cs b/Source/Libs/PangoSharp/AttrBackground.cs index d0538afdd..c7ff77e5a 100755 --- a/Source/Libs/PangoSharp/AttrBackground.cs +++ b/Source/Libs/PangoSharp/AttrBackground.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrBackground : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_background_new (ushort red, ushort green, ushort blue); public AttrBackground (ushort red, ushort green, ushort blue) : this (pango_attr_background_new (red, green, blue)) {} diff --git a/Source/Libs/PangoSharp/AttrFallback.cs b/Source/Libs/PangoSharp/AttrFallback.cs index 9f23fef77..c9c34aace 100755 --- a/Source/Libs/PangoSharp/AttrFallback.cs +++ b/Source/Libs/PangoSharp/AttrFallback.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrFallback : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_fallback_new (bool fallback); public AttrFallback (bool fallback) : this (pango_attr_fallback_new (fallback)) {} diff --git a/Source/Libs/PangoSharp/AttrFamily.cs b/Source/Libs/PangoSharp/AttrFamily.cs index aa2a856bf..2e588cacf 100755 --- a/Source/Libs/PangoSharp/AttrFamily.cs +++ b/Source/Libs/PangoSharp/AttrFamily.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrFamily : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_family_new (IntPtr family); public AttrFamily (string family) : base (NewAttrFamily (family)) {} diff --git a/Source/Libs/PangoSharp/AttrFontDesc.cs b/Source/Libs/PangoSharp/AttrFontDesc.cs index 0fe49374e..c7ebafaa3 100755 --- a/Source/Libs/PangoSharp/AttrFontDesc.cs +++ b/Source/Libs/PangoSharp/AttrFontDesc.cs @@ -23,10 +23,10 @@ namespace Pango { public class AttrFontDesc : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_font_desc_new (IntPtr font_desc); - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_font_description_copy(IntPtr raw); public AttrFontDesc (Pango.FontDescription font_desc) : this (pango_attr_font_desc_new (pango_font_description_copy (font_desc.Handle))) {} diff --git a/Source/Libs/PangoSharp/AttrForeground.cs b/Source/Libs/PangoSharp/AttrForeground.cs index b02f641fe..b9259d8e6 100755 --- a/Source/Libs/PangoSharp/AttrForeground.cs +++ b/Source/Libs/PangoSharp/AttrForeground.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrForeground : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_foreground_new (ushort red, ushort green, ushort blue); public AttrForeground (ushort red, ushort green, ushort blue) : this (pango_attr_foreground_new (red, green, blue)) {} diff --git a/Source/Libs/PangoSharp/AttrGravity.cs b/Source/Libs/PangoSharp/AttrGravity.cs index dc1c3fdca..1db9caf12 100755 --- a/Source/Libs/PangoSharp/AttrGravity.cs +++ b/Source/Libs/PangoSharp/AttrGravity.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrGravity : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_gravity_new (int gravity); public AttrGravity (Gravity gravity) : this (pango_attr_gravity_new ((int) gravity)) {} diff --git a/Source/Libs/PangoSharp/AttrGravityHint.cs b/Source/Libs/PangoSharp/AttrGravityHint.cs index f37e11306..804aeef16 100755 --- a/Source/Libs/PangoSharp/AttrGravityHint.cs +++ b/Source/Libs/PangoSharp/AttrGravityHint.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrGravityHint : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_gravity_hint_new (int hint); public AttrGravityHint (GravityHint hint) : this (pango_attr_gravity_hint_new ((int) hint)) {} diff --git a/Source/Libs/PangoSharp/AttrIterator.cs b/Source/Libs/PangoSharp/AttrIterator.cs index 416bfb347..c371ca948 100755 --- a/Source/Libs/PangoSharp/AttrIterator.cs +++ b/Source/Libs/PangoSharp/AttrIterator.cs @@ -25,7 +25,7 @@ namespace Pango { public partial class AttrIterator { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_attr_iterator_get_font(IntPtr raw, IntPtr desc, out IntPtr language, out IntPtr extra_attrs); public void GetFont (out Pango.FontDescription desc, out Pango.Language language, out Pango.Attribute[] extra_attrs) @@ -46,7 +46,7 @@ namespace Pango { extra_attrs [i++] = Pango.Attribute.GetAttribute (raw_attr); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_iterator_get_attrs (IntPtr raw); public Pango.Attribute[] Attrs { diff --git a/Source/Libs/PangoSharp/AttrLanguage.cs b/Source/Libs/PangoSharp/AttrLanguage.cs index 49b5f3482..11ba85bed 100755 --- a/Source/Libs/PangoSharp/AttrLanguage.cs +++ b/Source/Libs/PangoSharp/AttrLanguage.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrLanguage : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_language_new (IntPtr language); public AttrLanguage (Pango.Language language) : this (pango_attr_language_new (language.Handle)) {} diff --git a/Source/Libs/PangoSharp/AttrLetterSpacing.cs b/Source/Libs/PangoSharp/AttrLetterSpacing.cs index 34e23f2c0..63b99c730 100755 --- a/Source/Libs/PangoSharp/AttrLetterSpacing.cs +++ b/Source/Libs/PangoSharp/AttrLetterSpacing.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrLetterSpacing : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_letter_spacing_new (int letter_spacing); public AttrLetterSpacing (int letter_spacing) : this (pango_attr_letter_spacing_new (letter_spacing)) {} diff --git a/Source/Libs/PangoSharp/AttrList.cs b/Source/Libs/PangoSharp/AttrList.cs index f9870ba54..b9eb15844 100755 --- a/Source/Libs/PangoSharp/AttrList.cs +++ b/Source/Libs/PangoSharp/AttrList.cs @@ -25,10 +25,10 @@ namespace Pango { public partial class AttrList { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attribute_copy (IntPtr raw); - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_attr_list_insert (IntPtr raw, IntPtr attr); public void Insert (Pango.Attribute attr) @@ -36,7 +36,7 @@ namespace Pango { pango_attr_list_insert (Handle, pango_attribute_copy (attr.Handle)); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_attr_list_insert_before (IntPtr raw, IntPtr attr); public void InsertBefore (Pango.Attribute attr) diff --git a/Source/Libs/PangoSharp/AttrRise.cs b/Source/Libs/PangoSharp/AttrRise.cs index 55eb732f4..f6291aeb7 100755 --- a/Source/Libs/PangoSharp/AttrRise.cs +++ b/Source/Libs/PangoSharp/AttrRise.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrRise : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_rise_new (int rise); public AttrRise (int rise) : this (pango_attr_rise_new (rise)) {} diff --git a/Source/Libs/PangoSharp/AttrScale.cs b/Source/Libs/PangoSharp/AttrScale.cs index 8055c7982..e429ceca6 100755 --- a/Source/Libs/PangoSharp/AttrScale.cs +++ b/Source/Libs/PangoSharp/AttrScale.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrScale : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_scale_new (double scale); public AttrScale (double scale) : this (pango_attr_scale_new (scale)) {} diff --git a/Source/Libs/PangoSharp/AttrShape.cs b/Source/Libs/PangoSharp/AttrShape.cs index 090afb674..13291aee9 100755 --- a/Source/Libs/PangoSharp/AttrShape.cs +++ b/Source/Libs/PangoSharp/AttrShape.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrShape : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_shape_new (ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect); public AttrShape (Pango.Rectangle ink_rect, Pango.Rectangle logical_rect) : this (pango_attr_shape_new (ref ink_rect, ref logical_rect)) {} diff --git a/Source/Libs/PangoSharp/AttrSize.cs b/Source/Libs/PangoSharp/AttrSize.cs index f21bae40c..e4ccbfce8 100755 --- a/Source/Libs/PangoSharp/AttrSize.cs +++ b/Source/Libs/PangoSharp/AttrSize.cs @@ -23,10 +23,10 @@ namespace Pango { public class AttrSize : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_size_new (int size); - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_size_new_absolute (int size); public AttrSize (int size) : this (pango_attr_size_new (size)) {} diff --git a/Source/Libs/PangoSharp/AttrStretch.cs b/Source/Libs/PangoSharp/AttrStretch.cs index ec39997aa..c8d4b2469 100755 --- a/Source/Libs/PangoSharp/AttrStretch.cs +++ b/Source/Libs/PangoSharp/AttrStretch.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrStretch : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_stretch_new (Pango.Stretch stretch); public AttrStretch (Pango.Stretch stretch) : this (pango_attr_stretch_new (stretch)) {} diff --git a/Source/Libs/PangoSharp/AttrStrikethrough.cs b/Source/Libs/PangoSharp/AttrStrikethrough.cs index 46b2b4301..c66006904 100755 --- a/Source/Libs/PangoSharp/AttrStrikethrough.cs +++ b/Source/Libs/PangoSharp/AttrStrikethrough.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrStrikethrough : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_strikethrough_new (bool strikethrough); public AttrStrikethrough (bool strikethrough) : this (pango_attr_strikethrough_new (strikethrough)) {} diff --git a/Source/Libs/PangoSharp/AttrStrikethroughColor.cs b/Source/Libs/PangoSharp/AttrStrikethroughColor.cs index 3add21fcd..da6df9a28 100755 --- a/Source/Libs/PangoSharp/AttrStrikethroughColor.cs +++ b/Source/Libs/PangoSharp/AttrStrikethroughColor.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrStrikethroughColor : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_strikethrough_color_new (ushort red, ushort green, ushort blue); public AttrStrikethroughColor (ushort red, ushort green, ushort blue) : this (pango_attr_strikethrough_color_new (red, green, blue)) {} diff --git a/Source/Libs/PangoSharp/AttrStyle.cs b/Source/Libs/PangoSharp/AttrStyle.cs index eeaa9fa0b..a60b77958 100755 --- a/Source/Libs/PangoSharp/AttrStyle.cs +++ b/Source/Libs/PangoSharp/AttrStyle.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrStyle : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_style_new (Pango.Style style); public AttrStyle (Pango.Style style) : this (pango_attr_style_new (style)) {} diff --git a/Source/Libs/PangoSharp/AttrUnderline.cs b/Source/Libs/PangoSharp/AttrUnderline.cs index aaaf71c98..d2b3a846c 100755 --- a/Source/Libs/PangoSharp/AttrUnderline.cs +++ b/Source/Libs/PangoSharp/AttrUnderline.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrUnderline : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_underline_new (Pango.Underline underline); public AttrUnderline (Pango.Underline underline) : this (pango_attr_underline_new (underline)) {} diff --git a/Source/Libs/PangoSharp/AttrUnderlineColor.cs b/Source/Libs/PangoSharp/AttrUnderlineColor.cs index a9ccf8d19..0840b23ea 100755 --- a/Source/Libs/PangoSharp/AttrUnderlineColor.cs +++ b/Source/Libs/PangoSharp/AttrUnderlineColor.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrUnderlineColor : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_underline_color_new (ushort red, ushort green, ushort blue); public AttrUnderlineColor (ushort red, ushort green, ushort blue) : this (pango_attr_underline_color_new (red, green, blue)) {} diff --git a/Source/Libs/PangoSharp/AttrVariant.cs b/Source/Libs/PangoSharp/AttrVariant.cs index dfd769aa1..53aca0fc1 100755 --- a/Source/Libs/PangoSharp/AttrVariant.cs +++ b/Source/Libs/PangoSharp/AttrVariant.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrVariant : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_variant_new (Pango.Variant variant); public AttrVariant (Pango.Variant variant) : this (pango_attr_variant_new (variant)) {} diff --git a/Source/Libs/PangoSharp/AttrWeight.cs b/Source/Libs/PangoSharp/AttrWeight.cs index 26420d8ef..9d7a416c2 100755 --- a/Source/Libs/PangoSharp/AttrWeight.cs +++ b/Source/Libs/PangoSharp/AttrWeight.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrWeight : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_weight_new (Pango.Weight weight); public AttrWeight (Pango.Weight weight) : this (pango_attr_weight_new (weight)) {} diff --git a/Source/Libs/PangoSharp/Attribute.cs b/Source/Libs/PangoSharp/Attribute.cs index 39a4c62fe..3f6114ff6 100755 --- a/Source/Libs/PangoSharp/Attribute.cs +++ b/Source/Libs/PangoSharp/Attribute.cs @@ -93,7 +93,7 @@ namespace Pango { Dispose (); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_attribute_destroy (IntPtr raw); public void Dispose () @@ -149,14 +149,14 @@ namespace Pango { } } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attribute_copy (IntPtr raw); public Pango.Attribute Copy () { return GetAttribute (pango_attribute_copy (raw)); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern bool pango_attribute_equal (IntPtr raw1, IntPtr raw2); public bool Equal (Pango.Attribute attr2) { diff --git a/Source/Libs/PangoSharp/Class1.cs b/Source/Libs/PangoSharp/Class1.cs deleted file mode 100755 index 953c14733..000000000 --- a/Source/Libs/PangoSharp/Class1.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -namespace PangoSharp -{ - public class Class1 - { - } -} diff --git a/Source/Libs/PangoSharp/Context.cs b/Source/Libs/PangoSharp/Context.cs index 5a978d64f..a3c79cc14 100755 --- a/Source/Libs/PangoSharp/Context.cs +++ b/Source/Libs/PangoSharp/Context.cs @@ -25,7 +25,7 @@ namespace Pango { public partial class Context { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_context_list_families(IntPtr raw, out IntPtr families, out int n_families); public FontFamily [] Families { @@ -46,7 +46,7 @@ namespace Pango { } } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_context_list_families(IntPtr raw, IntPtr families, out int n_families); [Obsolete] diff --git a/Source/Libs/PangoSharp/Coverage.cs b/Source/Libs/PangoSharp/Coverage.cs index e9008e932..b37189a2d 100755 --- a/Source/Libs/PangoSharp/Coverage.cs +++ b/Source/Libs/PangoSharp/Coverage.cs @@ -25,7 +25,7 @@ namespace Pango { public partial class Coverage { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_coverage_to_bytes (IntPtr raw, out IntPtr bytes, out int n_bytes); public void ToBytes(out byte[] bytes) diff --git a/Source/Libs/PangoSharp/FontFamily.cs b/Source/Libs/PangoSharp/FontFamily.cs index 77fd79ba3..2b46a317b 100755 --- a/Source/Libs/PangoSharp/FontFamily.cs +++ b/Source/Libs/PangoSharp/FontFamily.cs @@ -25,7 +25,7 @@ namespace Pango { public partial class FontFamily { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_font_family_list_faces(IntPtr raw, out IntPtr faces, out int n_faces); public FontFace [] Faces { @@ -46,7 +46,7 @@ namespace Pango { } } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_font_family_list_faces(IntPtr raw, IntPtr faces, out int n_faces); [Obsolete] diff --git a/Source/Libs/PangoSharp/FontMap.cs b/Source/Libs/PangoSharp/FontMap.cs index 311ccfd74..eb6a754b8 100755 --- a/Source/Libs/PangoSharp/FontMap.cs +++ b/Source/Libs/PangoSharp/FontMap.cs @@ -25,7 +25,7 @@ namespace Pango { public partial class FontMap { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_font_map_list_families(IntPtr raw, out IntPtr families, out int n_families); public FontFamily [] Families { @@ -46,7 +46,7 @@ namespace Pango { } } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_font_map_list_families(IntPtr raw, IntPtr families, out int n_families); [Obsolete] diff --git a/Source/Libs/PangoSharp/Global.cs b/Source/Libs/PangoSharp/Global.cs index bc5bfc49f..0be2a1439 100755 --- a/Source/Libs/PangoSharp/Global.cs +++ b/Source/Libs/PangoSharp/Global.cs @@ -25,7 +25,9 @@ namespace Pango { public partial class Global { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + public static string PangoNativeDll = "libpango-1.0-0"; + + [DllImport (PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern bool pango_scan_int(IntPtr pos, out int out_param); [Obsolete] @@ -37,7 +39,7 @@ namespace Pango { return ret; } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern bool pango_parse_markup (IntPtr markup, int length, uint accel_marker, out IntPtr attr_list_handle, out IntPtr text, out uint accel_char, IntPtr err); public static bool ParseMarkup (string markup, char accel_marker, out Pango.AttrList attrs, out string text, out char accel_char) diff --git a/Source/Libs/PangoSharp/GlyphItem.cs b/Source/Libs/PangoSharp/GlyphItem.cs index 1b7e1468d..b21202e95 100755 --- a/Source/Libs/PangoSharp/GlyphItem.cs +++ b/Source/Libs/PangoSharp/GlyphItem.cs @@ -25,7 +25,7 @@ namespace Pango { public partial struct GlyphItem { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_glyph_item_apply_attrs(ref Pango.GlyphItem raw, IntPtr text, IntPtr list); public GlyphItem[] ApplyAttrs (string text, Pango.AttrList list) diff --git a/Source/Libs/PangoSharp/Layout.cs b/Source/Libs/PangoSharp/Layout.cs index abbcc0628..4c7a28083 100755 --- a/Source/Libs/PangoSharp/Layout.cs +++ b/Source/Libs/PangoSharp/Layout.cs @@ -26,7 +26,7 @@ namespace Pango { public partial class Layout { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_layout_get_lines(IntPtr raw); public LayoutLine[] Lines { @@ -43,7 +43,7 @@ namespace Pango { } } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_layout_set_markup_with_accel (IntPtr raw, IntPtr markup, int length, uint accel_marker, out uint accel_char); public void SetMarkupWithAccel (string markup, char accel_marker, out char accel_char) @@ -55,7 +55,7 @@ namespace Pango { accel_char = GLib.Marshaller.GUnicharToChar (ucs4_accel_char); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_layout_get_log_attrs (IntPtr raw, out IntPtr attrs, out int n_attrs); public LogAttr [] LogAttrs { @@ -76,7 +76,7 @@ namespace Pango { } } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_layout_set_text (IntPtr raw, IntPtr text, int length); public void SetText (string text) @@ -86,7 +86,7 @@ namespace Pango { GLib.Marshaller.Free (native_text); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_layout_set_markup (IntPtr raw, IntPtr markup, int length); public void SetMarkup (string markup) diff --git a/Source/Libs/PangoSharp/LayoutLine.cs b/Source/Libs/PangoSharp/LayoutLine.cs index 89c2e551c..fb984411b 100755 --- a/Source/Libs/PangoSharp/LayoutLine.cs +++ b/Source/Libs/PangoSharp/LayoutLine.cs @@ -26,7 +26,7 @@ namespace Pango { public partial class LayoutLine { #if NOT_BROKEN - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_layout_line_get_x_ranges(IntPtr raw, int start_index, int end_index, out IntPtr ranges_handle, out int n_ranges); #endif diff --git a/Source/Libs/PangoSharp/PangoSharp-api.raw b/Source/Libs/PangoSharp/PangoSharp-api.raw index 872ad00ee..c7cca1b38 100755 --- a/Source/Libs/PangoSharp/PangoSharp-api.raw +++ b/Source/Libs/PangoSharp/PangoSharp-api.raw @@ -6,7 +6,7 @@ Please DO NOT MODIFY THIS FILE, modify .metadata files instead. --> - + diff --git a/Source/Libs/PangoSharp/PangoSharp.csproj b/Source/Libs/PangoSharp/PangoSharp.csproj index 748494fed..541b0cfd9 100755 --- a/Source/Libs/PangoSharp/PangoSharp.csproj +++ b/Source/Libs/PangoSharp/PangoSharp.csproj @@ -1,5 +1,4 @@ - true netstandard2.0 @@ -19,5 +18,7 @@ CairoSharp - + + + diff --git a/Source/Libs/PangoSharp/PangoSharp.metadata b/Source/Libs/PangoSharp/PangoSharp.metadata index 60c4f2e03..1db221d1b 100755 --- a/Source/Libs/PangoSharp/PangoSharp.metadata +++ b/Source/Libs/PangoSharp/PangoSharp.metadata @@ -36,7 +36,7 @@ VersionString 1 CairoHelper - libpangocairo-1.0-0.dll + libpangocairo-1.0-0 1 1 ref diff --git a/Source/Libs/PangoSharp/ScriptIter.cs b/Source/Libs/PangoSharp/ScriptIter.cs index e44502b2b..ada5780fd 100755 --- a/Source/Libs/PangoSharp/ScriptIter.cs +++ b/Source/Libs/PangoSharp/ScriptIter.cs @@ -27,7 +27,7 @@ namespace Pango { public ScriptIter(IntPtr raw) : base(raw) {} - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_script_iter_new(IntPtr text, int length); public ScriptIter (string text) @@ -36,7 +36,7 @@ namespace Pango { Raw = pango_script_iter_new (native_text, -1); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_script_iter_free (IntPtr raw); ~ScriptIter () @@ -46,10 +46,10 @@ namespace Pango { Raw = IntPtr.Zero; } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_script_iter_get_range (IntPtr raw, out IntPtr start, out IntPtr end, out Pango.Script script); - [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport ("libglib-2.0-0", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_utf8_pointer_to_offset (IntPtr str, IntPtr pos); public void GetRange (out int start, out int len, out Pango.Script script) @@ -62,7 +62,7 @@ namespace Pango { len = (int)g_utf8_pointer_to_offset (start_ptr, end_ptr); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern bool pango_script_iter_next (IntPtr raw); public bool Next () diff --git a/Source/Libs/PangoSharp/TabArray.cs b/Source/Libs/PangoSharp/TabArray.cs index 069f6047d..0d33d8283 100755 --- a/Source/Libs/PangoSharp/TabArray.cs +++ b/Source/Libs/PangoSharp/TabArray.cs @@ -25,7 +25,7 @@ namespace Pango { public partial class TabArray { - [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void pango_tab_array_get_tabs (IntPtr raw, out IntPtr alignments, out IntPtr locations); public void GetTabs (out TabAlign[] alignments, out int[] locations) diff --git a/Source/Libs/PangoSharp/linux-x64/libpango-1.0-0.so b/Source/Libs/PangoSharp/linux-x64/libpango-1.0-0.so new file mode 100755 index 000000000..f4114fc9c Binary files /dev/null and b/Source/Libs/PangoSharp/linux-x64/libpango-1.0-0.so differ diff --git a/Source/OldStuff/generate.sh b/Source/OldStuff/generate.sh new file mode 100755 index 000000000..883fa3e0b --- /dev/null +++ b/Source/OldStuff/generate.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -e +cd "$(dirname "$0")" + +genstub () +{ + DLLNAME=$1 + TARGET=$2 + + rm -f empty.c + touch empty.c + gcc -shared -o ${TARGET} empty.c + gcc -Wl,--no-as-needed -shared -o ${DLLNAME}.so -fPIC -L. -l:${TARGET} + rm -f ${TARGET} + rm -f empty.c + + echo "Mapped ${DLLNAME}.dll ==> ${TARGET}" +} + +#genstub libglib-2.0-0 libglib-2.0.so.0 +#genstub libgobject-2.0-0 libgobject-2.0.so.0 +#genstub libgthread-2.0-0 libgthread-2.0.so.0 +#genstub libgio-2.0-0 libgio-2.0.so.0 +#genstub libatk-1.0-0 libatk-1.0.so.0 +#genstub libcairo-2 libcairo.so.2 +#genstub libgtk-3-0 libgtk-3.so.0 +#genstub libgdk-3-0 libgdk-3.so.0 +#genstub libgdk_pixbuf-2.0-0 libgdk_pixbuf-2.0.so.0 +#genstub libgtk-3-0 libgtk-3.so.0 +genstub libpango-1.0-0 libpango-1.0.so.0 diff --git a/build.cake b/build.cake index 1735e28e3..23efd8aa5 100755 --- a/build.cake +++ b/build.cake @@ -1,73 +1,130 @@ #load CakeScripts\GAssembly.cs #load CakeScripts\GapiFixup.cs +#load CakeScripts\Settings.cs #addin "Cake.FileHelpers" +#addin "Cake.Incubator" // VARS -GAssembly.Cake = Context; +Settings.Cake = Context; +Settings.BuildTarget = Argument("BuildTarget", "Default"); +Settings.Assembly = Argument("Assembly", ""); -var target = Argument("Target", "Default"); var configuration = Argument("Configuration", "Release"); +var list = new List(); var glist = new List() { new GAssembly("GLibSharp"), new GAssembly("GioSharp") { - Includes = new[] { "GLibSharp" } + Deps = new[] { "GLibSharp" } }, new GAssembly("AtkSharp") { - Includes = new[] { "GLibSharp" }, + Deps = new[] { "GLibSharp" }, ExtraArgs = "--abi-cs-usings=Atk,GLib" }, new GAssembly("CairoSharp"), new GAssembly("PangoSharp") { - Includes = new[] { "GLibSharp", "CairoSharp" } + Deps = new[] { "GLibSharp", "CairoSharp" } }, new GAssembly("GdkSharp") { - Includes = new[] { "GLibSharp", "GioSharp", "CairoSharp", "PangoSharp" } + Deps = new[] { "GLibSharp", "GioSharp", "CairoSharp", "PangoSharp" } }, new GAssembly("GtkSharp") { - Includes = new[] { "GLibSharp", "GioSharp", "AtkSharp", "CairoSharp", "PangoSharp", "GdkSharp" }, + Deps = new[] { "GLibSharp", "GioSharp", "AtkSharp", "CairoSharp", "PangoSharp", "GdkSharp" }, ExtraArgs = "--abi-cs-usings=Gtk,GLib" } }; // TASKS -Task("Prepare") +Task("Init") .Does(() => { + // Add stuff to list + foreach(var gassembly in glist) + if(string.IsNullOrEmpty(Settings.Assembly) || Settings.Assembly == gassembly.Name) + list.Add(gassembly); +}); + +Task("Prepare") + .IsDependentOn("Clean") + .Does(() => +{ + // Build Tools + DotNetCoreRestore("Source/Tools/GapiCodegen/GapiCodegen.csproj"); MSBuild("Source/Tools/GapiCodegen/GapiCodegen.csproj", new MSBuildSettings { Verbosity = Verbosity.Minimal, Configuration = "Release", }); - foreach(var gassembly in glist) + // Generate code and prepare libs projects + foreach(var gassembly in list) gassembly.Prepare(); + DotNetCoreRestore("Source/Libs/GLibSharp.sln"); +}); + +Task("Test") + .Does(() => +{ + }); Task("Clean") + .IsDependentOn("Init") .Does(() => { - foreach(var gassembly in glist) + foreach(var gassembly in list) gassembly.Clean(); }); +Task("FullClean") + .IsDependentOn("Clean") + .Does(() => +{ + DeleteDirectory("BuildOutput", true); +}); + Task("Build") .IsDependentOn("Prepare") .Does(() => { - foreach(var gassembly in glist) + if (list.Count == glist.Count) { - MSBuild(gassembly.Csproj, new MSBuildSettings { + MSBuild("Source/Libs/GLibSharp.sln", new MSBuildSettings { Verbosity = Verbosity.Minimal, Configuration = "Release", }); } + else + { + foreach(var gassembly in list) + { + MSBuild(gassembly.Csproj, new MSBuildSettings { + Verbosity = Verbosity.Minimal, + Configuration = "Release", + }); + } + } +}); + +Task("PackageNuGet") + .IsDependentOn("Build") + .Does(() => +{ + var settings = new DotNetCorePackSettings + { + Configuration = "Release", + OutputDirectory = "BuildOutput/NugetPackages", + NoBuild = true + }; + + foreach(var gassembly in list) + DotNetCorePack(gassembly.Csproj, settings); }); // TASK TARGETS @@ -77,4 +134,4 @@ Task("Default") // EXECUTION -RunTarget(target); +RunTarget(Settings.BuildTarget);