diff --git a/aegisub/auto4_perl.cpp b/aegisub/auto4_perl.cpp index f7b6d6bc3..a5296a57a 100644 --- a/aegisub/auto4_perl.cpp +++ b/aegisub/auto4_perl.cpp @@ -266,6 +266,7 @@ namespace Automation4 { XS(perl_console_register) { wxTRACE_FUNC(Aegisub::PerlConsole::register_console); +#ifdef WITH_PERLCONSOLE dXSARGS; PerlScript *script = PerlScript::GetScript(); @@ -283,6 +284,11 @@ namespace Automation4 { // If there's no registered console script->AddFeature(new PerlConsole(name, desc, script)); } + XSRETURN_YES; +#else + PerlLogWarning(_("Tried to register PerlConsole, but support for it was disabled in this version.")); // Warning or Hint? + XSRETURN_UNDEF; +#endif } XS(perl_console_echo) @@ -299,15 +305,16 @@ namespace Automation4 { buffer << _T(" ") << wxString(SvPV_nolen(ST(i)), pl2wx); } +#ifdef WITH_PERLCONSOLE if(PerlConsole::GetConsole()) { // If there's a console echo to it PerlConsole::Echo(buffer); } - else { + else +#endif // Otherwise print on stdout PerlIO_printf(PerlIO_stdout(), "%s\n", buffer.mb_str(wxConvLocal).data()); // (through perl io system) - } } /* Universal loader */ diff --git a/aegisub/auto4_perl_console.cpp b/aegisub/auto4_perl_console.cpp index 43132abda..ee97ec0e9 100644 --- a/aegisub/auto4_perl_console.cpp +++ b/aegisub/auto4_perl_console.cpp @@ -35,6 +35,7 @@ #ifdef WITH_PERL +#ifdef WITH_PERLCONSOLE #include "auto4_perl.h" @@ -237,4 +238,5 @@ namespace Automation4 { }; +#endif //WITH_PERLCONSOLE #endif //WITH_PERL diff --git a/aegisub/auto4_perl_script.cpp b/aegisub/auto4_perl_script.cpp index d87f0eeba..47e3f8d8c 100644 --- a/aegisub/auto4_perl_script.cpp +++ b/aegisub/auto4_perl_script.cpp @@ -416,6 +416,7 @@ namespace Automation4 { void PerlFeatureMacro::Process(AssFile *subs, std::vector &selected, int active, wxWindow * const progress_parent) { + /* TODO: extend the progress window 'coverage' */ // Convert the AssFile::Line to perl stuff AV *lines = PerlAss::MakeHasshLines(NULL, subs); // Same with the selection array diff --git a/aegisub/win32/config0.h b/aegisub/win32/config0.h index 0ba0fa4cc..90dcbc14c 100644 --- a/aegisub/win32/config0.h +++ b/aegisub/win32/config0.h @@ -106,6 +106,10 @@ // Requires: perl library (ActivePerl comes with one for Visual C++ under lib\core\) //#define WITH_PERL +// Enable PerlConsole (a debug tool for the perl engine) +// You don't want it +//#define WITH_PERLCONSOLE + ///////////// NOT RECOMMENDED ///////////// diff --git a/automation/v4-docs/perl-api.txt b/automation/v4-docs/perl-api.txt index 53e46a13d..4c05a6d72 100644 --- a/automation/v4-docs/perl-api.txt +++ b/automation/v4-docs/perl-api.txt @@ -86,7 +86,8 @@ warn LIST wxlog LEVEL, LIST wxlog LIST - Similar to 'log', with LOG_WX flag implicitely set. + Similar to 'log', but with LOG_WX flag implicitely set. This function is + top-secret. ====================================