#include "module.h"
#include "general.h"
-#include <ltdl.h>
#include <ETL/stringf>
+
+#ifndef USE_CF_BUNDLES
+#include <ltdl.h>
+#endif
+
#endif
/* === M A C R O S ========================================================= */
bool
Module::subsys_init(const String &prefix)
{
+#ifndef USE_CF_BUNDLES
#ifndef SYNFIG_LTDL_NO_STATIC
//LTDL_SET_PRELOADED_SYMBOLS();
#endif
#endif
lt_dladdsearchdir("/usr/local/lib/synfig/modules");
lt_dladdsearchdir(".");
-
+#endif
book_=new Book;
return true;
}
{
delete book_;
+#ifndef USE_CF_BUNDLES
lt_dlexit();
+#endif
return true;
}
bool
synfig::Module::Register(const String &module_name, ProgressCallback *callback)
{
+#ifndef USE_CF_BUNDLES
lt_dlhandle module;
if(callback)callback->task(strprintf(_("Attempting to register \"%s\""),module_name.c_str()));
if(!module)
{
- if(callback)callback->error(strprintf(_("Unable to find module \"%s\" (%s)"),module_name.c_str(),lt_dlerror()));
+ if(callback)callback->warning(strprintf(_("Unable to find module \"%s\" (%s)"),module_name.c_str(),lt_dlerror()));
return false;
}
if(callback)callback->task(strprintf(_("Success for \"%s\""),module_name.c_str()));
+#endif
return false;
}