WIP trying to get the guistarter shared module loaded
This commit is contained in:
parent
45f18379b4
commit
57c3559f74
3 changed files with 30 additions and 4 deletions
15
SConstruct
15
SConstruct
|
|
@ -313,15 +313,24 @@ def defineBuildTargets(env, artifacts):
|
|||
+ srcSubtree(env,'$SRCDIR/common')
|
||||
+ srcSubtree(env,'$SRCDIR/lib')
|
||||
)
|
||||
objplug = srcSubtree(env,'$SRCDIR/plugin', isShared=True)
|
||||
core = ( env.StaticLibrary('$BINDIR/lumiback.la', objback)
|
||||
+ env.StaticLibrary('$BINDIR/lumiproc.la', objproc)
|
||||
+ env.StaticLibrary('$BINDIR/lumiera.la', objlib)
|
||||
)
|
||||
|
||||
|
||||
artifacts['lumiera'] = env.Program('$BINDIR/lumiera', ['$SRCDIR/lumiera/main.cpp']+ core )
|
||||
artifacts['plugins'] = env.LoadableModule('$BINDIR/lumiera-plugin', objplug)
|
||||
|
||||
# temporary solution to build the GuiStarterPlugin (TODO: implement plugin building as discussed on November meeting)
|
||||
envplug = env.Clone()
|
||||
envplug.Append(CPPPATH='$SRCDIR/plugin', CPPDEFINES='LUMIERA_PLUGIN')
|
||||
|
||||
# objplug = srcSubtree(envplug,'$SRCDIR/plugin', isShared=True)
|
||||
# guistarterplugin = envplug.LoadableModule('$BINDIR/guistart', objplug, SHLIBPREFIX='')
|
||||
|
||||
objplug = envplug.SharedObject('$SRCDIR/plugin/guistarterplugin.cpp')
|
||||
guistarterplugin = env.LoadableModule('#$BINDIR/guistart', objplug, SHLIBPREFIX='')
|
||||
|
||||
artifacts['plugins'] = guistarterplugin
|
||||
|
||||
# the Lumiera GTK GUI
|
||||
envgtk = env.Clone().mergeConf(['gtkmm-2.4','cairomm-1.0','gdl-1.0','librsvg-2.0','xv','xext','sm'])
|
||||
|
|
|
|||
|
|
@ -44,6 +44,21 @@ namespace gui {
|
|||
using util::dispatchSequenced;
|
||||
|
||||
|
||||
/** path to the dynamic module to load the GUI from
|
||||
* @todo we need an actual solution. Either find it in the same directory,
|
||||
* or the lib dir or otherwise retrieve the path from the config system */
|
||||
const string LUMIERA_GuiStarterPlugin_path ("liblumiera-plugin.so");
|
||||
|
||||
inline void
|
||||
discover_GuiStarterPlugin ()
|
||||
{
|
||||
LumieraPlugin GuiP = lumiera_plugin_lookup (LUMIERA_GuiStarterPlugin_path.c_str());
|
||||
if (!GuiP || lumiera_error_peek())
|
||||
throw lumiera::error::Config("unable to load the GUI module from \""
|
||||
+LUMIERA_GuiStarterPlugin_path+"\"");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
struct GuiRunner
|
||||
|
|
@ -102,6 +117,8 @@ namespace gui {
|
|||
//Lock guard (*this);
|
||||
if (facade) return false; // already started
|
||||
|
||||
discover_GuiStarterPlugin(); ////TODO temporary solution
|
||||
|
||||
facade.reset (
|
||||
new GuiRunner ( // trigger loading load the GuiStarterPlugin...
|
||||
dispatchSequenced( closeOnTermination_ // on termination call this->closeGuiModule(*) first
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ env.Append(CPPPATH='#/.') # add Rootdir to Includepath, so test/test.h is found
|
|||
|
||||
def testExecutable(env,tree, exeName=None, obj=None):
|
||||
""" declare all targets needed to create a standalone
|
||||
Test executalbe of the given Sub-tree. Note that
|
||||
Test executable of the given Sub-tree. Note that
|
||||
each subdir is built in its own Environment.
|
||||
"""
|
||||
env = env.Clone()
|
||||
|
|
|
|||
Loading…
Reference in a new issue