Fixed #354 by using the proper initialization

This commit is contained in:
Matthias Koefferlein 2019-09-13 18:54:31 +02:00
parent 4ec4025e10
commit 4c8727182e
2 changed files with 14 additions and 9 deletions

View File

@ -21,9 +21,12 @@
*/
#include "bdInit.h"
#include "dbInit.h"
#include "tlCommandLineParser.h"
#include "tlProgress.h"
#include "version.h"
#include "gsi.h"
#include "gsiExpression.h"
#include <list>
@ -48,8 +51,18 @@ void init ()
license += "\n";
license += prg_about_text;
tl::CommandLineOptions::set_license (license);
}
// initialize db plugins
db::init ();
// initialize the GSI class system (Variant binding, Expression support)
// We have to do this now since plugins may register GSI classes and before the
// ruby interpreter, because it depends on a proper class system.
gsi::initialize ();
// initialize the tl::Expression subsystem with GSI-bound classes
gsi::initialize_expressions ();
}
class ProgressAdaptor
: public tl::ProgressAdaptor

View File

@ -72,14 +72,6 @@ BD_PUBLIC int strmrun (int argc, char *argv[])
cmd.parse (argc, argv);
// initialize the GSI class system (Variant binding, Expression support)
// We have to do this now since plugins may register GSI classes and before the
// ruby interpreter, because it depends on a proper class system.
gsi::initialize ();
// initialize the tl::Expression subsystem with GSI-bound classes
gsi::initialize_expressions ();
// create the ruby and python interpreter instances now.
// Hint: we do this after load_plugin, because that way the plugins can register GSI classes and methods.
// TODO: do this through some auto-registration