DUMMY Lumiera executable working now.
Lumiera starts, loads a GuiStarterPlugin dummy and finaly performes a clean shutdown
This commit is contained in:
parent
6a3f232036
commit
1c7402b25d
5 changed files with 178 additions and 34 deletions
|
|
@ -323,11 +323,7 @@ def defineBuildTargets(env, artifacts):
|
|||
# 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')
|
||||
objplug = envplug.SharedObject('$SRCDIR/plugin/guistarterplugin-dummy.cpp')
|
||||
guistarterplugin = env.LoadableModule('#$BINDIR/guistart', objplug, SHLIBPREFIX='')
|
||||
|
||||
artifacts['plugins'] = guistarterplugin
|
||||
|
|
|
|||
|
|
@ -42,22 +42,6 @@ namespace gui {
|
|||
using lumiera::Subsys;
|
||||
using lumiera::InstanceHandle;
|
||||
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+"\"");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -117,8 +101,6 @@ 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
|
||||
|
|
|
|||
|
|
@ -48,8 +48,11 @@ lumiera_plugin_load_DYNLIB (const char* name)
|
|||
LUMIERA_ERROR_SET (plugin, PLUGIN_OPEN);
|
||||
|
||||
#ifdef DEBUG
|
||||
const char* problem = dlerror();
|
||||
WARN_IF (problem, plugin, "Problem opening shared object %s : %s", name, problem);
|
||||
if (lumiera_error_peek())
|
||||
{
|
||||
const char* problem = dlerror();
|
||||
WARN_IF (problem, plugin, "Problem opening shared object %s : %s", name, problem);
|
||||
}
|
||||
#endif
|
||||
|
||||
return lumiera_plugin_init (self, handle, plugin);
|
||||
|
|
|
|||
165
src/plugin/guistarterplugin-dummy.cpp
Normal file
165
src/plugin/guistarterplugin-dummy.cpp
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
/*
|
||||
GuiStarterPlugin - entry point for the lumiera GUI loaded as shared module
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2007-2008, Joel Holdsworth <joel@airwebreathe.org.uk>
|
||||
Christian Thaeter <ct@pipapo.org>
|
||||
Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
* *****************************************************/
|
||||
|
||||
/** @file guistarterplugin-dummy.hpp
|
||||
** THIS IS A DUMMY used for an early draft of loading the GUI as shared module.
|
||||
**
|
||||
** The reason for this is: have to figure out how to build it; probably need to
|
||||
** link parts of the core lib dynamically
|
||||
**
|
||||
** @see guistarterplugin.cpp how it is intended to work
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
|
||||
extern "C" {
|
||||
#include "lumiera/interface.h"
|
||||
#include "lumiera/interfacedescriptor.h"
|
||||
}
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
#include <iostream> /////////////TODO
|
||||
using std::cout; //////////////TODO
|
||||
|
||||
|
||||
/* re-declare interface to avoid import */
|
||||
LUMIERA_INTERFACE_DECLARE (lumieraorg_Gui, 1,
|
||||
LUMIERA_INTERFACE_SLOT (bool, kickOff, (void*))
|
||||
);
|
||||
|
||||
|
||||
namespace gui {
|
||||
|
||||
namespace { // implementation details
|
||||
|
||||
bool
|
||||
kickOff_dummy_implementation ()
|
||||
{
|
||||
cout << " *** Ha Ha Ha\n"
|
||||
<< " this is the GuiStarterPlugin speaking!\n"
|
||||
<< " now, the Lumiera GUI should be spawned....\n"
|
||||
<< " but actually nothing happens!!!!!!!!!!!!!!\n\n";
|
||||
|
||||
return true; // hey, lets just pretend we started....
|
||||
}
|
||||
|
||||
} // (End) impl details
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern "C" { /* ================== define an lumieraorg_Gui instance ======================= */
|
||||
|
||||
|
||||
LUMIERA_INTERFACE_INSTANCE (lumieraorg_interfacedescriptor, 0
|
||||
,lumieraorg_GuiStarterPlugin_descriptor
|
||||
, NULL, NULL, NULL
|
||||
, LUMIERA_INTERFACE_INLINE (name, "\126\247\365\337\126\254\173\037\130\310\337\345\200\347\323\136",
|
||||
const char*, (LumieraInterface iface),
|
||||
{ return "GuiStarterPlugin-dummy"; }
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (brief, "\056\346\322\365\344\104\232\232\355\213\367\056\301\144\051\021",
|
||||
const char*, (LumieraInterface iface),
|
||||
{ return "a dummy to simulate starting up the Lumiera GTK GUI loaded from DYNLIB"; }
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (homepage, "\357\056\117\165\320\066\273\130\113\100\367\022\221\350\236\256",
|
||||
const char*, (LumieraInterface iface),
|
||||
{ return "http://www.lumiera.org/develompent.html" ;}
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (version, "\013\117\366\210\070\320\274\076\253\230\032\116\271\161\027\354",
|
||||
const char*, (LumieraInterface iface),
|
||||
{ return "0.1~pre"; }
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (author, "\371\262\024\273\170\105\163\261\351\240\051\003\153\040\256\155",
|
||||
const char*, (LumieraInterface iface),
|
||||
{ return "Joel Holdsworth, Christian Thaeter, Hermann Vosseler"; }
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (email, "\353\242\247\130\056\242\314\145\053\162\003\060\200\357\303\214",
|
||||
const char*, (LumieraInterface iface),
|
||||
{ return "Lumiera@lists.lumiera.org"; }
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (copyright, "\172\325\335\304\015\222\377\372\343\151\255\020\030\103\320\101",
|
||||
const char*, (LumieraInterface iface),
|
||||
{
|
||||
return
|
||||
"Copyright (C) Lumiera.org\n"
|
||||
"2007-2008, Joel Holdsworth <joel@airwebreathe.org.uk>\n"
|
||||
" Christian Thaeter <ct@pipapo.org>\n"
|
||||
" Hermann Vosseler <Ichthyostega@web.de>";
|
||||
}
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (license, "\016\264\202\005\160\305\033\227\037\077\143\363\263\011\167\257",
|
||||
const char*, (LumieraInterface iface),
|
||||
{
|
||||
return
|
||||
"This program is free software; you can redistribute it and/or modify\n"
|
||||
"it under the terms of the GNU General Public License as published by\n"
|
||||
"the Free Software Foundation; either version 2 of the License, or\n"
|
||||
"(at your option) any later version.\n"
|
||||
"\n"
|
||||
"This program is distributed in the hope that it will be useful,\n"
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
|
||||
"GNU General Public License for more details.\n"
|
||||
"\n"
|
||||
"You should have received a copy of the GNU General Public License\n"
|
||||
"along with this program; if not, write to the Free Software\n"
|
||||
"Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA";
|
||||
}
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (state, "\006\070\035\065\267\073\016\107\376\027\355\035\135\176\107\064",
|
||||
int, (LumieraInterface iface),
|
||||
{return LUMIERA_INTERFACE_EXPERIMENTAL; }
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (versioncmp, "\224\077\275\040\357\244\311\244\112\030\042\163\061\166\245\325",
|
||||
int, (const char* a, const char* b),
|
||||
{return 0;} ////////////////////////////////////////////TODO define version ordering
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
LUMIERA_EXPORT( /* ===================== PLUGIN EXPORTS ================================== */
|
||||
|
||||
LUMIERA_INTERFACE_DEFINE (lumieraorg_Gui, 1
|
||||
,lumieraorg_GuiStarterPlugin
|
||||
, LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_GuiStarterPlugin_descriptor)
|
||||
, NULL /* on open */
|
||||
, NULL /* on close */
|
||||
, LUMIERA_INTERFACE_INLINE (kickOff, "\255\142\006\244\057\170\152\312\301\372\220\323\230\026\200\065",
|
||||
bool, (void* termSig),
|
||||
{
|
||||
return gui::kickOff_dummy_implementation(); ////////TODO
|
||||
}
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
} // extern "C"
|
||||
|
|
@ -52,17 +52,15 @@ extern "C" {
|
|||
#include "lumiera/interfacedescriptor.h"
|
||||
}
|
||||
|
||||
//#include <boost/scoped_ptr.hpp>
|
||||
#include <string>
|
||||
|
||||
#include <iostream> /////////////TODO
|
||||
|
||||
|
||||
using std::string;
|
||||
// using boost::scoped_ptr;
|
||||
using lumiera::Subsys;
|
||||
using std::cout; //////////////TODO
|
||||
|
||||
#include <iostream> /////////////TODO
|
||||
using std::cout; //////////////TODO
|
||||
|
||||
|
||||
using lumiera::Subsys;
|
||||
using gui::LUMIERA_INTERFACE_INAME(lumieraorg_Gui, 1);
|
||||
|
||||
|
||||
|
|
@ -113,7 +111,7 @@ extern "C" { /* ================== define an lumieraorg_Gui instance ===========
|
|||
)
|
||||
, LUMIERA_INTERFACE_INLINE (brief, "\056\346\322\365\344\104\232\232\355\213\367\056\301\144\051\021",
|
||||
const char*, (LumieraInterface iface),
|
||||
{ return "entry point to star up the Lumiera GTK GUI contained in this dynamic module"; }
|
||||
{ return "entry point to start up the Lumiera GTK GUI contained in this dynamic module"; }
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (homepage, "\357\056\117\165\320\066\273\130\113\100\367\022\221\350\236\256",
|
||||
const char*, (LumieraInterface iface),
|
||||
|
|
@ -135,7 +133,7 @@ extern "C" { /* ================== define an lumieraorg_Gui instance ===========
|
|||
const char*, (LumieraInterface iface),
|
||||
{
|
||||
return
|
||||
"Copyright (C) Lumiera.org\n"
|
||||
"Copyright (C) Lumiera.org\n"
|
||||
"2007-2008, Joel Holdsworth <joel@airwebreathe.org.uk>\n"
|
||||
" Christian Thaeter <ct@pipapo.org>\n"
|
||||
" Hermann Vosseler <Ichthyostega@web.de>";
|
||||
|
|
|
|||
Loading…
Reference in a new issue