- Make libpyloader a loadable plugin (warning: won't work
on Window$ unless you change the string "libpyloader" to "pyloader" into main.cc) - Fix Makefile to support module creation and loading - 2DO: - Add a class into backend to load and manage plugins - Install plugins into separate directory - Remove hardcoded paths git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@458 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
38f7b84909
commit
56534edb6c
15 changed files with 187 additions and 215 deletions
|
@ -31,12 +31,20 @@
|
|||
#include "text_simulation.hh"
|
||||
#include "templates/smartp.hh"
|
||||
|
||||
#include <glibmm/module.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
|
||||
int
|
||||
main(int argc, char** argv) {
|
||||
using namespace sgpem;
|
||||
using Glib::Module;
|
||||
|
||||
std::string pyloader_path = Module::build_path(MODDIR, "pyloader");
|
||||
Glib::Module pyloader(pyloader_path);
|
||||
assert(pyloader);
|
||||
|
||||
Glib::thread_init();
|
||||
|
||||
// Create an INITIAL STATE
|
||||
|
@ -62,12 +70,11 @@ main(int argc, char** argv) {
|
|||
initial.add_at_bottom(ss5);
|
||||
initial.add_at_bottom(ss6);
|
||||
History::get_instance().enqueue_slice(initial);
|
||||
|
||||
PythonPolicyManager* ppm = PythonPolicyManager::get_instance();
|
||||
ppm->init();
|
||||
Policy& pol = ppm->get_policy();
|
||||
Scheduler::get_instance().set_policy(&pol);
|
||||
|
||||
Scheduler::get_instance(); // Forces initialization of scheduler.
|
||||
// Cross fingers (depends if PythonPolicyManager
|
||||
// static object has been initialized before?).
|
||||
|
||||
//the textual simulation
|
||||
TextSimulation text_sim;
|
||||
History::get_instance().attach(&text_sim);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue