Changed how the Perl factory is registered.

Originally committed to SVN as r1999.
This commit is contained in:
Rodrigo Braz Monteiro 2008-03-09 21:33:35 +00:00
parent d7ad931526
commit f8d7c69c15
3 changed files with 7 additions and 1 deletions

View file

@ -510,7 +510,10 @@ namespace Automation4 {
loaded = false; loaded = false;
engine_name = _T("Perl"); engine_name = _T("Perl");
filename_pattern = _T("*") _T(PERL_SCRIPT_EXTENSION); filename_pattern = _T("*") _T(PERL_SCRIPT_EXTENSION);
}
void PerlScriptFactory::RegisterFactory()
{
// On Visual Studio, first check if the dll is available // On Visual Studio, first check if the dll is available
// This needs to be done because it is set to delay loading of this dll // This needs to be done because it is set to delay loading of this dll
#ifdef __VISUALC__ #ifdef __VISUALC__

View file

@ -252,6 +252,8 @@ namespace Automation4 {
PerlScriptFactory(); PerlScriptFactory();
~PerlScriptFactory(); ~PerlScriptFactory();
void RegisterFactory();
Script* Produce(const wxString &filename) const; Script* Produce(const wxString &filename) const;
}; };
}; };

View file

@ -85,7 +85,8 @@ void PluginManager::RegisterBuiltInPlugins() {
new Automation4::LuaScriptFactory(); new Automation4::LuaScriptFactory();
#endif #endif
#ifdef WITH_PERL #ifdef WITH_PERL
new Automation4::PerlScriptFactory(); Automation4::PerlScriptFactory *perl = new Automation4::PerlScriptFactory();
perl->RegisterFactory();
#endif #endif
#ifdef WITH_AUTO3 #ifdef WITH_AUTO3
new Automation4::Auto3ScriptFactory(); new Automation4::Auto3ScriptFactory();