diff options
author | David Robillard <d@drobilla.net> | 2015-05-14 05:29:50 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-05-14 05:29:50 +0000 |
commit | e0508b6f55e83ab2846f84775dc0861f1ee1aa9c (patch) | |
tree | 5db8da50209423d62ecde94386460152a6da5d19 | |
parent | ef934721918fda573be7de267cbd3b205c84e8c5 (diff) | |
download | suil-e0508b6f55e83ab2846f84775dc0861f1ee1aa9c.tar.gz suil-e0508b6f55e83ab2846f84775dc0861f1ee1aa9c.tar.bz2 suil-e0508b6f55e83ab2846f84775dc0861f1ee1aa9c.zip |
Only report suil_ui_supported() if necessary wrapper is compiled in.
Fixes issue #1045.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@5679 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | NEWS | 16 | ||||
-rw-r--r-- | src/instance.c | 27 | ||||
-rw-r--r-- | wscript | 27 |
3 files changed, 52 insertions, 18 deletions
@@ -4,16 +4,17 @@ suil (0.8.3) unstable; * Add Cocoa in Gtk wrapper (patch from Robin Gareus) * Various Windows fixes (patches from Robin Gareus) * Fix compilation with -Wl,--no-undefined - * Fix a few minor/unlikely memory errors - - -- David Robillard <d@drobilla.net> Fri, 13 Feb 2015 20:34:43 -0500 + * Fix a few minor/unlikely memory errors. + * Only report suil_ui_supported() if necessary wrapper is compiled in + + -- David Robillard <d@drobilla.net> Thu, 14 May 2015 01:26:31 -0400 suil (0.8.2) stable; * Fix embedding several Qt UIs in Gtk * Add configure options to disable all Gtk or Qt support * Upgrade to waf 1.7.16 - + -- David Robillard <d@drobilla.net> Fri, 08 Aug 2014 18:18:00 -0400 suil (0.8.0) stable; @@ -21,7 +22,7 @@ suil (0.8.0) stable; * Add suil_instance_get_handle (patch from Rui Nuno Capela) * Fix compilation errors on some systems * Upgrade to waf 1.7.14 - + -- David Robillard <d@drobilla.net> Sat, 04 Jan 2014 16:06:56 -0500 suil (0.6.16) stable; @@ -55,7 +56,7 @@ suil (0.6.10) stable; package check breakage in waf 1.7.6 -- David Robillard <d@drobilla.net> Sat, 22 Dec 2012 23:08:06 -0500 - + suil (0.6.8) stable; * Fix crash in x11_in_gtk2 when event_filter fires before widget is realized @@ -64,7 +65,7 @@ suil (0.6.8) stable; * Update to waf 1.7.8 and autowaf r90 (install docs to versioned directory) -- David Robillard <d@drobilla.net> Sat, 22 Dec 2012 21:11:23 -0500 - + suil (0.6.6) stable; * Fix embedding Gtk in Qt as a child widget (support reparenting) @@ -119,4 +120,3 @@ suil (0.4.0) stable; * Initial release -- David Robillard <d@drobilla.net> Tue, 24 May 2011 23:00:00 -0400 - diff --git a/src/instance.c b/src/instance.c index 0c27ad7..4ace18c 100644 --- a/src/instance.c +++ b/src/instance.c @@ -70,25 +70,42 @@ open_wrapper(SuilHost* host, } const char* module_name = NULL; +#ifdef SUIL_WITH_GTK2_IN_QT4 if (!strcmp(container_type_uri, QT4_UI_URI) && !strcmp(ui_type_uri, GTK2_UI_URI)) { module_name = "suil_gtk2_in_qt4"; - } else if (!strcmp(container_type_uri, GTK2_UI_URI) + } +#endif +#ifdef SUIL_WITH_QT4_IN_GTK2 + if (!strcmp(container_type_uri, GTK2_UI_URI) && !strcmp(ui_type_uri, QT4_UI_URI)) { module_name = "suil_qt4_in_gtk2"; - } else if (!strcmp(container_type_uri, GTK2_UI_URI) + } +#endif +#ifdef SUIL_WITH_X11_IN_GTK2 + if (!strcmp(container_type_uri, GTK2_UI_URI) && !strcmp(ui_type_uri, X11_UI_URI)) { module_name = "suil_x11_in_gtk2"; - } else if (!strcmp(container_type_uri, GTK2_UI_URI) + } +#endif +#ifdef SUIL_WITH_WIN_IN_GTK2 + if (!strcmp(container_type_uri, GTK2_UI_URI) && !strcmp(ui_type_uri, WIN_UI_URI)) { module_name = "suil_win_in_gtk2"; - } else if (!strcmp(container_type_uri, GTK2_UI_URI) + } +#endif +#ifdef SUIL_WITH_COCOA_IN_GTK2 + if (!strcmp(container_type_uri, GTK2_UI_URI) && !strcmp(ui_type_uri, COCOA_UI_URI)) { module_name = "suil_cocoa_in_gtk2"; - } else if (!strcmp(container_type_uri, QT4_UI_URI) + } +#endif +#ifdef SUIL_WITH_X11_IN_QT4 + if (!strcmp(container_type_uri, QT4_UI_URI) && !strcmp(ui_type_uri, X11_UI_URI)) { module_name = "suil_x11_in_qt4"; } +#endif if (!module_name) { SUIL_ERRORF("Unable to wrap UI type <%s> as type <%s>\n", @@ -89,6 +89,22 @@ def configure(conf): autowaf.define(conf, 'SUIL_DIR_SEP', '/') autowaf.define(conf, 'SUIL_GTK2_LIB_NAME', Options.options.gtk2_lib_name); + if conf.env.HAVE_GTK2 and conf.env.HAVE_QT4: + autowaf.define(conf, 'SUIL_WITH_GTK2_IN_QT4', 1) + autowaf.define(conf, 'SUIL_WITH_QT4_IN_GTK2', 1) + + if conf.env.HAVE_GTK2 and conf.env.HAVE_GTK2_X11: + autowaf.define(conf, 'SUIL_WITH_X11_IN_GTK2', 1) + + if conf.env.HAVE_GTK2 and conf.env.HAVE_GTK2_QUARTZ: + autowaf.define(conf, 'SUIL_WITH_COCOA_IN_GTK2', 1) + + if conf.env.HAVE_GTK2 and conf.env.DEST_OS == 'win32': + autowaf.define(conf, 'SUIL_WITH_WIN_IN_GTK2', 1) + + if conf.env.HAVE_QT4: + autowaf.define(conf, 'SUIL_WITH_X11_IN_QT4', 1) + module_prefix = '' module_ext = '' if conf.env.PARDEBUG: @@ -168,7 +184,7 @@ def build(bld): lib = lib, uselib = 'LV2 LV2_1_6_0') - if bld.env.HAVE_GTK2 and bld.env.HAVE_QT4: + if bld.env.SUIL_WITH_GTK2_IN_QT4: obj = bld(features = 'cxx cxxshlib', source = 'src/gtk2_in_qt4.cpp', target = 'suil_gtk2_in_qt4', @@ -179,6 +195,7 @@ def build(bld): lib = modlib) autowaf.use_lib(bld, obj, 'GTK2 QT4 LV2 LV2_1_6_0') + if bld.env.SUIL_WITH_QT4_IN_GTK2: obj = bld(features = 'cxx cxxshlib', source = 'src/qt4_in_gtk2.cpp', target = 'suil_qt4_in_gtk2', @@ -190,7 +207,7 @@ def build(bld): linkflags = bld.env.NODELETE_FLAGS) autowaf.use_lib(bld, obj, 'GTK2 QT4 LV2 LV2_1_6_0') - if bld.env.HAVE_GTK2 and bld.env.HAVE_GTK2_X11: + if bld.env.SUIL_WITH_X11_IN_GTK2: obj = bld(features = 'c cshlib', source = 'src/x11_in_gtk2.c', target = 'suil_x11_in_gtk2', @@ -202,7 +219,7 @@ def build(bld): linkflags = bld.env.NODELETE_FLAGS) autowaf.use_lib(bld, obj, 'GTK2 GTK2_X11 LV2 LV2_1_6_0') - if bld.env.HAVE_GTK2 and bld.env.HAVE_GTK2_QUARTZ: + if bld.env.SUIL_WITH_COCOA_IN_GTK2: obj = bld(features = 'cxx cshlib', source = 'src/cocoa_in_gtk2.mm', target = 'suil_cocoa_in_gtk2', @@ -214,7 +231,7 @@ def build(bld): linkflags = ['-framework', 'Cocoa']) autowaf.use_lib(bld, obj, 'GTK2 LV2 LV2_1_6_0') - if bld.env.HAVE_GTK2 and bld.env.DEST_OS == 'win32': + if bld.env.SUIL_WITH_WIN_IN_GTK2: obj = bld(features = 'cxx cxxshlib', source = 'src/win_in_gtk2.cpp', target = 'suil_win_in_gtk2', @@ -226,7 +243,7 @@ def build(bld): linkflags = bld.env.NODELETE_FLAGS) autowaf.use_lib(bld, obj, 'GTK2 LV2 LV2_1_6_0') - if bld.env.HAVE_QT4: + if bld.env.SUIL_WITH_X11_IN_QT4: obj = bld(features = 'cxx cxxshlib', source = 'src/x11_in_qt4.cpp', target = 'suil_x11_in_qt4', |