build: Require GLib 2.32 or above
GLib 2.32 has been released in March 2012, so we can now require it a build and run time. This allows us to remove GLib 2.31 conditionals, mark the Thread.Init as obsolete, and remove all references to libgthread. Please note that the API exposed in glib and gio is still from 2.28, but we will have some API additions in the future. First example is the next commit, which brings GBytes, an addition in GLib 2.32.
This commit is contained in:
parent
280087e431
commit
fe0be81892
6 changed files with 2 additions and 38 deletions
|
@ -180,7 +180,7 @@ AC_SUBST(GENERATED_SOURCES_OPTION)
|
||||||
AC_SUBST(ASSEMBLYINFO)
|
AC_SUBST(ASSEMBLYINFO)
|
||||||
|
|
||||||
GTK_REQUIRED_VERSION=3.0.0
|
GTK_REQUIRED_VERSION=3.0.0
|
||||||
GLIB_REQUIRED_VERSION=2.28.0
|
GLIB_REQUIRED_VERSION=2.32.0
|
||||||
|
|
||||||
PKG_CHECK_MODULES(GLIB, gobject-2.0 >= $GLIB_REQUIRED_VERSION)
|
PKG_CHECK_MODULES(GLIB, gobject-2.0 >= $GLIB_REQUIRED_VERSION)
|
||||||
AC_SUBST(GLIB_CFLAGS)
|
AC_SUBST(GLIB_CFLAGS)
|
||||||
|
@ -193,13 +193,6 @@ AC_SUBST(GIO_LIBS)
|
||||||
CSFLAGS="$CSFLAGS $DEBUG_FLAGS $WIN64DEFINES"
|
CSFLAGS="$CSFLAGS $DEBUG_FLAGS $WIN64DEFINES"
|
||||||
AC_SUBST(CSFLAGS)
|
AC_SUBST(CSFLAGS)
|
||||||
|
|
||||||
PKG_CHECK_MODULES(GLIB_2_31,
|
|
||||||
glib-2.0 >= 2.31,
|
|
||||||
HAVE_GLIB_2_31_OR_HIGHER=yes, HAVE_GLIB_2_31_OR_HIGHER=no)
|
|
||||||
if test "x$HAVE_GLIB_2_31_OR_HIGHER" = "xno" ; then
|
|
||||||
CSFLAGS="$CSFLAGS -define:ENABLE_GTHREAD_INIT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES(PANGO, pango)
|
PKG_CHECK_MODULES(PANGO, pango)
|
||||||
AC_SUBST(PANGO_CFLAGS)
|
AC_SUBST(PANGO_CFLAGS)
|
||||||
AC_SUBST(PANGO_LIBS)
|
AC_SUBST(PANGO_LIBS)
|
||||||
|
|
|
@ -2,5 +2,4 @@
|
||||||
<dllmap dll="libgio-2.0-0.dll" target="libgio-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
<dllmap dll="libgio-2.0-0.dll" target="libgio-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||||
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||||
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||||
<dllmap dll="libgthread-2.0-0.dll" target="libgthread-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -110,9 +110,6 @@ namespace GLib {
|
||||||
|
|
||||||
static GType ()
|
static GType ()
|
||||||
{
|
{
|
||||||
if (!GLib.Thread.Supported)
|
|
||||||
GLib.Thread.Init ();
|
|
||||||
|
|
||||||
g_type_init ();
|
g_type_init ();
|
||||||
|
|
||||||
Register (GType.Char, typeof (sbyte));
|
Register (GType.Char, typeof (sbyte));
|
||||||
|
|
|
@ -27,28 +27,8 @@ namespace GLib
|
||||||
public class Thread
|
public class Thread
|
||||||
{
|
{
|
||||||
private Thread () {}
|
private Thread () {}
|
||||||
|
|
||||||
#if ENABLE_GTHREAD_INIT
|
|
||||||
const string GThreadNativeLib = "libgthread-2.0-0.dll";
|
|
||||||
|
|
||||||
[DllImport (GThreadNativeLib, CallingConvention = CallingConvention.Cdecl)]
|
[Obsolete ("This is no longer needed, GLib automatically initializes threads")]
|
||||||
static extern void g_thread_init (IntPtr i);
|
|
||||||
|
|
||||||
public static void Init ()
|
|
||||||
{
|
|
||||||
g_thread_init (IntPtr.Zero);
|
|
||||||
}
|
|
||||||
|
|
||||||
[DllImport (GThreadNativeLib, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
static extern bool g_thread_get_initialized ();
|
|
||||||
|
|
||||||
public static bool Supported
|
|
||||||
{
|
|
||||||
get {
|
|
||||||
return g_thread_get_initialized ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
public static void Init ()
|
public static void Init ()
|
||||||
{
|
{
|
||||||
// GLib automatically inits threads in 2.31 and above
|
// GLib automatically inits threads in 2.31 and above
|
||||||
|
@ -59,7 +39,6 @@ namespace GLib
|
||||||
{
|
{
|
||||||
get { return true; }
|
get { return true; }
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||||
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||||
<dllmap dll="libgthread-2.0-0.dll" target="libgthread-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -1362,9 +1362,6 @@
|
||||||
<Component Id="libgobject_2.0_0.dll" Guid="BDCAFC4C-F092-4244-BD06-2B95DB9229F9">
|
<Component Id="libgobject_2.0_0.dll" Guid="BDCAFC4C-F092-4244-BD06-2B95DB9229F9">
|
||||||
<File Id="libgobject_2.0_0.dll" KeyPath="yes" Source="source\bin\libgobject-2.0-0.dll" />
|
<File Id="libgobject_2.0_0.dll" KeyPath="yes" Source="source\bin\libgobject-2.0-0.dll" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="libgthread_2.0_0.dll" Guid="55431703-86FC-47E8-B754-0960E50B712E">
|
|
||||||
<File Id="libgthread_2.0_0.dll" KeyPath="yes" Source="source\bin\libgthread-2.0-0.dll" />
|
|
||||||
</Component>
|
|
||||||
<Component Id="libgtk_3_0.dll" Guid="14B44C8B-4EF6-43F3-8848-F8499E3885E8">
|
<Component Id="libgtk_3_0.dll" Guid="14B44C8B-4EF6-43F3-8848-F8499E3885E8">
|
||||||
<File Id="libgtk_3_0.dll" KeyPath="yes" Source="source\bin\libgtk-3-0.dll" />
|
<File Id="libgtk_3_0.dll" KeyPath="yes" Source="source\bin\libgtk-3-0.dll" />
|
||||||
</Component>
|
</Component>
|
||||||
|
|
Loading…
Reference in a new issue