Fixed "cannot wait for thread termination (invalid handle)" error in Auto4/Lua on wxMSW 2.8.3 by removing threading dependency in Auto4LuaScript::Create. It wasn't needed there anyway.

Also removed absolute dependency on hunspell, Aegisub should just build without spellchecking support now. Finally removed requirement to have built with at least one spellchecker. (That was stupid.)

Originally committed to SVN as r1112.
This commit is contained in:
Niels Martin Hansen 2007-04-22 15:45:29 +00:00
parent 7f6c3a4ba1
commit cf2d2ff5d4
5 changed files with 20 additions and 18 deletions

View File

@ -32,6 +32,12 @@ endif
#AUTO4RUBY= #AUTO4RUBY=
#endif #endif
if HAVE_HUNSPELL
HUNSPELL=spellchecker_hunspell.cpp
else
HUNSPELL=
end
aegisub_SOURCES = \ aegisub_SOURCES = \
aegisublocale.cpp \ aegisublocale.cpp \
ass_attachment.cpp \ ass_attachment.cpp \
@ -115,7 +121,7 @@ aegisub_SOURCES = \
mythes.cxx \ mythes.cxx \
options.cpp \ options.cpp \
spellchecker.cpp \ spellchecker.cpp \
spellchecker_hunspell.cpp \ $(HUNSPELL) \
static_bmp.cpp \ static_bmp.cpp \
string_codec.cpp \ string_codec.cpp \
subs_edit_box.cpp \ subs_edit_box.cpp \

View File

@ -250,16 +250,12 @@ namespace Automation4 {
_stackcheck.check(1); _stackcheck.check(1);
// and execute it // and execute it
// this is where features are registered // this is where features are registered
// this should run really fast so a progress window isn't needed // 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 it infinite-loops, scripter is an idiot and already got his punishment) if (lua_pcall(L, 0, 0, 0)) {
{ // error occurred, assumed to be on top of Lua stack
LuaThreadedCall call(L, 0, 0); wxString *err = new wxString(lua_tostring(L, -1), wxConvUTF8);
if (call.Wait()) { err->Prepend(_T("Error initialising Lua script \"") + GetPrettyFilename() + _T("\":\n\n"));
// error occurred, assumed to be on top of Lua stack throw err->c_str();
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); _stackcheck.check(0);
lua_getglobal(L, "version"); lua_getglobal(L, "version");

View File

@ -108,17 +108,17 @@ bool AegisubApp::OnInit() {
locale.Init(wxLANGUAGE_DEFAULT); locale.Init(wxLANGUAGE_DEFAULT);
#endif #endif
// Set association
#ifndef _DEBUG
RegistryAssociate();
#endif
// Load Automation scripts // Load Automation scripts
global_scripts = new Automation4::AutoloadScriptManager(Options.AsText(_T("Automation Autoload Path"))); global_scripts = new Automation4::AutoloadScriptManager(Options.AsText(_T("Automation Autoload Path")));
// Load export filters // Load export filters
AssExportFilterChain::PrepareFilters(); AssExportFilterChain::PrepareFilters();
// Set association
#ifndef _DEBUG
RegistryAssociate();
#endif
// Get parameter subs // Get parameter subs
wxArrayString subs; wxArrayString subs;
for (int i=1;i<argc;i++) { for (int i=1;i<argc;i++) {

View File

@ -48,7 +48,7 @@ SpellChecker *SpellCheckerFactory::GetSpellChecker() {
wxArrayString list = GetFactoryList(Options.AsText(_T("Spell Checker"))); wxArrayString list = GetFactoryList(Options.AsText(_T("Spell Checker")));
// None available // None available
if (list.Count() == 0) throw _T("No spell checkers are available."); if (list.Count() == 0) return 0; //throw _T("No spell checkers are available.");
// Get provider // Get provider
wxString error; wxString error;

View File

@ -70,7 +70,7 @@ AC_CHECK_LIB([portaudio], [Pa_Initialize],, [with_portaudio=no])
AC_CHECK_FUNCS([Pa_GetStreamTime]) AC_CHECK_FUNCS([Pa_GetStreamTime])
AC_CHECK_LIB([avcodec], [avcodec_init],, [AC_MSG_ERROR([avcodec not found.])]) AC_CHECK_LIB([avcodec], [avcodec_init],, [AC_MSG_ERROR([avcodec not found.])])
AC_CHECK_LIB([avformat], [av_read_frame],, [AC_MSG_ERROR([avformat not found.])]) AC_CHECK_LIB([avformat], [av_read_frame],, [AC_MSG_ERROR([avformat not found.])])
AC_CHECK_LIB([hunspell], [main],, [AC_MSG_ERROR([Hunspell not found.])]) AC_CHECK_LIB([hunspell], [main])
# AC_CHECK_LIB([ruby1.9], [ruby_init],, [with_ruby=no]) # AC_CHECK_LIB([ruby1.9], [ruby_init],, [with_ruby=no])
AC_CHECK_HEADER([wchar.h],,[ AC_CHECK_HEADER([wchar.h],,[