From f8d7c69c1589333dd827ea020b7dffe10cb97d6e Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Sun, 9 Mar 2008 21:33:35 +0000 Subject: [PATCH] Changed how the Perl factory is registered. Originally committed to SVN as r1999. --- aegisub/auto4_perl.cpp | 3 +++ aegisub/auto4_perl.h | 2 ++ aegisub/plugin_manager.cpp | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/aegisub/auto4_perl.cpp b/aegisub/auto4_perl.cpp index 5ff892e87..c3ce6bb91 100644 --- a/aegisub/auto4_perl.cpp +++ b/aegisub/auto4_perl.cpp @@ -510,7 +510,10 @@ namespace Automation4 { loaded = false; engine_name = _T("Perl"); filename_pattern = _T("*") _T(PERL_SCRIPT_EXTENSION); + } + void PerlScriptFactory::RegisterFactory() + { // 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 #ifdef __VISUALC__ diff --git a/aegisub/auto4_perl.h b/aegisub/auto4_perl.h index 7fc5cb336..26fe90c95 100644 --- a/aegisub/auto4_perl.h +++ b/aegisub/auto4_perl.h @@ -251,6 +251,8 @@ namespace Automation4 { public: PerlScriptFactory(); ~PerlScriptFactory(); + + void RegisterFactory(); Script* Produce(const wxString &filename) const; }; diff --git a/aegisub/plugin_manager.cpp b/aegisub/plugin_manager.cpp index 32ac76c8b..7eaef4ec4 100644 --- a/aegisub/plugin_manager.cpp +++ b/aegisub/plugin_manager.cpp @@ -85,7 +85,8 @@ void PluginManager::RegisterBuiltInPlugins() { new Automation4::LuaScriptFactory(); #endif #ifdef WITH_PERL - new Automation4::PerlScriptFactory(); + Automation4::PerlScriptFactory *perl = new Automation4::PerlScriptFactory(); + perl->RegisterFactory(); #endif #ifdef WITH_AUTO3 new Automation4::Auto3ScriptFactory();