std::list<String>::iterator iter;
+ Module::register_default_modules(cb);
+
for(i=0,iter=modules_to_load.begin();iter!=modules_to_load.end();++iter,i++)
{
Module::Register(*iter,cb);
return true;
}
-bool
-register_default_modules()
+void
+Module::register_default_modules(ProgressCallback *callback)
{
- return true;
+ #define REGISTER_MODULE(module) if (!Register(module, callback)) \
+ throw std::runtime_error(strprintf(_("Unable to load module '%s'"), module))
+ REGISTER_MODULE("lyr_freetype");
+ REGISTER_MODULE("mod_geometry");
+ REGISTER_MODULE("mod_gradient");
+ REGISTER_MODULE("mod_particle");
}
Module::Book&
if(callback)callback->task(strprintf(_("Success for \"%s\""),module_name.c_str()));
#endif
- return false;
+ return true;
}
static bool subsys_init(const String &prefix);
static bool subsys_stop();
- static bool register_default_modules();
+ static void register_default_modules(ProgressCallback *cb=NULL);
static void Register(Handle mod);
static bool Register(const String &module_name, ProgressCallback *cb=NULL);