diff --git a/aegisub/Makefile.inc.in b/aegisub/Makefile.inc.in index 9795658ec..fda7f53cd 100644 --- a/aegisub/Makefile.inc.in +++ b/aegisub/Makefile.inc.in @@ -3,7 +3,6 @@ ######################### HAVE_ALSA = @with_alsa@ HAVE_AUTO4_LUA = @with_auto4_lua@ -HAVE_AUTOMATION = @with_automation@ HAVE_HUNSPELL = @with_hunspell@ HAVE_OPENAL = @with_openal@ HAVE_OPENMP = @with_openmp@ diff --git a/aegisub/build/msbuild/Aegisub/Aegisub.targets b/aegisub/build/msbuild/Aegisub/Aegisub.targets index 1860f39ec..ef6ce18f2 100644 --- a/aegisub/build/msbuild/Aegisub/Aegisub.targets +++ b/aegisub/build/msbuild/Aegisub/Aegisub.targets @@ -134,7 +134,7 @@ - WITH_AUTOMATION;WITH_AUTO4_LUA;%(PreprocessorDefinitions) + WITH_AUTO4_LUA;%(PreprocessorDefinitions) $(AegisubContribBase)lua51\src;%(AdditionalIncludeDirectories) @@ -294,4 +294,4 @@ - \ No newline at end of file + diff --git a/aegisub/configure.in b/aegisub/configure.in index b9757243a..0354fd004 100644 --- a/aegisub/configure.in +++ b/aegisub/configure.in @@ -760,11 +760,9 @@ fi LIBS="$aegisub_save_LIBS" if test "$agi_cv_with_lua" = "yes"; then - with_automation="yes" with_auto4_lua="yes" AC_DEFINE(WITH_AUTO4_LUA, 1, [Enable Automation (auto4), requires lua]) else - with_automation="no" with_auto4_lua="no" fi @@ -772,14 +770,6 @@ AC_SUBST(with_auto4_lua) AC_SUBST(LUA_CFLAGS) AC_SUBST(LUA_LDFLAGS) -# Automation setup -if test "$with_automation" = "yes"; then - AC_DEFINE(WITH_AUTOMATION, 1, [Enable Automation support, requires any automation language.]) -fi -AC_SUBST(with_automation) - - - ################ # Widget support ################ diff --git a/aegisub/src/auto4_base.cpp b/aegisub/src/auto4_base.cpp index 993c395ab..2b0d9b587 100644 --- a/aegisub/src/auto4_base.cpp +++ b/aegisub/src/auto4_base.cpp @@ -36,8 +36,6 @@ #include "config.h" -#ifdef WITH_AUTOMATION - #ifndef AGI_PRE #ifdef __WINDOWS__ #include @@ -1059,7 +1057,3 @@ namespace Automation4 { } }; - -#endif // WITH_AUTOMATION - - diff --git a/aegisub/src/command/automation.cpp b/aegisub/src/command/automation.cpp index d2deaf5c8..d54b23cae 100644 --- a/aegisub/src/command/automation.cpp +++ b/aegisub/src/command/automation.cpp @@ -64,7 +64,6 @@ struct am_manager : public Command { STR_HELP("Open automation manager.") void operator()(agi::Context *c) { -#ifdef WITH_AUTOMATION #ifdef __APPLE__ if (wxGetMouseState().CmdDown()) { #else @@ -94,7 +93,6 @@ struct am_manager : public Command { c->videoController->Stop(); DialogAutomation(c->parent, c->local_scripts).ShowModal(); } -#endif } }; diff --git a/aegisub/src/config/config_windows0.h b/aegisub/src/config/config_windows0.h index 86994de0a..54017a2e4 100644 --- a/aegisub/src/config/config_windows0.h +++ b/aegisub/src/config/config_windows0.h @@ -51,11 +51,6 @@ ////////////// HIGH PRIORITY ///////////// -// Enable Automation -// Requires: Nothing -#define WITH_AUTOMATION - - // Enable Automation 4 Lua // Requires: Lua 5.1 (in repository) #define WITH_AUTO4_LUA diff --git a/aegisub/src/dialog_automation.cpp b/aegisub/src/dialog_automation.cpp index e4a402b69..6fdaf24ad 100644 --- a/aegisub/src/dialog_automation.cpp +++ b/aegisub/src/dialog_automation.cpp @@ -37,8 +37,6 @@ #include "config.h" -#ifdef WITH_AUTOMATION - #ifndef AGI_PRE #include #include @@ -371,7 +369,3 @@ void DialogAutomation::OnSelectionChange(wxListEvent &evt) { UpdateDisplay(); } - -#endif // WITH_AUTOMATION - - diff --git a/aegisub/src/frame_main.cpp b/aegisub/src/frame_main.cpp index c270d51b5..01f46c630 100644 --- a/aegisub/src/frame_main.cpp +++ b/aegisub/src/frame_main.cpp @@ -58,9 +58,7 @@ #include "ass_file.h" #include "audio_controller.h" #include "audio_box.h" -#ifdef WITH_AUTOMATION #include "auto4_base.h" -#endif #include "compat.h" #include "command/command.h" #include "dialog_search_replace.h" @@ -124,9 +122,7 @@ FrameMain::FrameMain (wxArrayString args) context->ass->AddFileOpenListener(&FrameMain::OnSubtitlesOpen, this); context->ass->AddFileSaveListener(&FrameMain::UpdateTitle, this); -#ifdef WITH_AUTOMATION context->local_scripts = new Automation4::ScriptManager(); -#endif StartupLog("Initializing context controls"); context->audioController = new AudioController; @@ -232,9 +228,7 @@ FrameMain::~FrameMain () { delete context->ass; HelpButton::ClearPages(); delete context->audioController; -#ifdef WITH_AUTOMATION delete context->local_scripts; -#endif SubsGrid->Destroy(); } @@ -684,9 +678,7 @@ void FrameMain::OnSubtitlesOpen() { curSubsVFR != context->videoController->GetTimecodesName() || curSubsVideo != context->videoController->videoName || curSubsKeyframes != context->videoController->GetKeyFramesName() -#ifdef WITH_AUTOMATION || !AutoScriptString.IsEmpty() || context->local_scripts->GetScripts().size() > 0 -#endif ) { if (autoLoadMode == 1) { @@ -734,7 +726,6 @@ void FrameMain::OnSubtitlesOpen() { } // Automation scripts -#ifdef WITH_AUTOMATION context->local_scripts->RemoveAll(); wxStringTokenizer tok(AutoScriptString, "|", wxTOKEN_STRTOK); wxFileName assfn(context->ass->filename); @@ -765,7 +756,6 @@ void FrameMain::OnSubtitlesOpen() { sfnamel, sfnames, basepath, sfname.GetFullPath()); } } -#endif } // Display @@ -781,7 +771,6 @@ void FrameMain::OnSubtitlesSave() { // 2. Otherwise try making it relative to the ass filename // 3. If step 2 failed, or absolute path is shorter than path relative to ass, use absolute path ("/") // 4. Otherwise, use path relative to ass ("~") -#ifdef WITH_AUTOMATION wxString scripts_string; wxString autobasefn(lagi_wxString(OPT_GET("Path/Automation/Base")->GetString())); @@ -808,7 +797,6 @@ void FrameMain::OnSubtitlesSave() { scripts_string += scriptfn; } context->ass->SetScriptInfo("Automation Scripts", scripts_string); -#endif } void FrameMain::OnKeyDown(wxKeyEvent &event) { diff --git a/aegisub/src/main.cpp b/aegisub/src/main.cpp index 711d86b22..7d2380f8b 100644 --- a/aegisub/src/main.cpp +++ b/aegisub/src/main.cpp @@ -61,9 +61,7 @@ #include "ass_file.h" #include "ass_time.h" #include "audio_box.h" -#ifdef WITH_AUTOMATION #include "auto4_base.h" -#endif #include "charset_conv.h" #include "compat.h" #include "export_clean_info.h" @@ -276,10 +274,8 @@ bool AegisubApp::OnInit() { plugins->RegisterBuiltInPlugins(); // Load Automation scripts -#ifdef WITH_AUTOMATION StartupLog("Load global Automation scripts"); global_scripts = new Automation4::AutoloadScriptManager(lagi_wxString(OPT_GET("Path/Automation/Autoload")->GetString())); -#endif // Load export filters StartupLog("Register export filters"); @@ -335,9 +331,7 @@ int AegisubApp::OnExit() { delete config::path; cmd::clear(); -#ifdef WITH_AUTOMATION delete global_scripts; -#endif AssExportFilterChain::Clear(); diff --git a/aegisub/src/main.h b/aegisub/src/main.h index dba24f4db..da9f6d096 100644 --- a/aegisub/src/main.h +++ b/aegisub/src/main.h @@ -116,10 +116,8 @@ public: /// DOCME FrameMain *frame; -#ifdef WITH_AUTOMATION /// DOCME Automation4::AutoloadScriptManager *global_scripts; -#endif /// @brief DOCME diff --git a/aegisub/src/menu.cpp b/aegisub/src/menu.cpp index 7ecbcfd60..23a39ffe1 100644 --- a/aegisub/src/menu.cpp +++ b/aegisub/src/menu.cpp @@ -281,10 +281,8 @@ void process_menu_item(wxMenu *parent, agi::Context *c, json::Object const& ele, } if (special == "automation") { -#ifdef WITH_AUTOMATION /// @todo Actually implement this parent->Append(-1, _("No Automation macros loaded"))->Enable(false); -#endif return; }