diff --git a/aegisub/Makefile.am b/aegisub/Makefile.am index a73bf1024..9317f672e 100644 --- a/aegisub/Makefile.am +++ b/aegisub/Makefile.am @@ -32,6 +32,12 @@ endif #AUTO4RUBY= #endif +if HAVE_HUNSPELL +HUNSPELL=spellchecker_hunspell.cpp +else +HUNSPELL= +end + aegisub_SOURCES = \ aegisublocale.cpp \ ass_attachment.cpp \ @@ -115,7 +121,7 @@ aegisub_SOURCES = \ mythes.cxx \ options.cpp \ spellchecker.cpp \ - spellchecker_hunspell.cpp \ + $(HUNSPELL) \ static_bmp.cpp \ string_codec.cpp \ subs_edit_box.cpp \ diff --git a/aegisub/auto4_lua.cpp b/aegisub/auto4_lua.cpp index 095b896c8..49f44ed3b 100644 --- a/aegisub/auto4_lua.cpp +++ b/aegisub/auto4_lua.cpp @@ -250,16 +250,12 @@ namespace Automation4 { _stackcheck.check(1); // and execute it // this is where features are registered - // this should run really fast so a progress window isn't needed - // (if it infinite-loops, scripter is an idiot and already got his punishment) - { - LuaThreadedCall call(L, 0, 0); - if (call.Wait()) { - // error occurred, assumed to be on top of Lua stack - wxString *err = new wxString(lua_tostring(L, -1), wxConvUTF8); - err->Prepend(_T("Error initialising Lua script \"") + GetPrettyFilename() + _T("\":\n\n")); - throw err->c_str(); - } + // don't thread this, as there's no point in it and it seems to break on wx 2.8.3, for some reason + if (lua_pcall(L, 0, 0, 0)) { + // error occurred, assumed to be on top of Lua stack + wxString *err = new wxString(lua_tostring(L, -1), wxConvUTF8); + err->Prepend(_T("Error initialising Lua script \"") + GetPrettyFilename() + _T("\":\n\n")); + throw err->c_str(); } _stackcheck.check(0); lua_getglobal(L, "version"); diff --git a/aegisub/main.cpp b/aegisub/main.cpp index 6413efbd5..3b56955ce 100644 --- a/aegisub/main.cpp +++ b/aegisub/main.cpp @@ -108,17 +108,17 @@ bool AegisubApp::OnInit() { locale.Init(wxLANGUAGE_DEFAULT); #endif + // Set association +#ifndef _DEBUG + RegistryAssociate(); +#endif + // Load Automation scripts global_scripts = new Automation4::AutoloadScriptManager(Options.AsText(_T("Automation Autoload Path"))); // Load export filters AssExportFilterChain::PrepareFilters(); - // Set association -#ifndef _DEBUG - RegistryAssociate(); -#endif - // Get parameter subs wxArrayString subs; for (int i=1;i