aboutsummaryrefslogtreecommitdiffstats
path: root/make-feed.lua
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2023-02-16 23:33:54 +0000
committergarret <garret@airmail.cc>2023-02-16 23:33:54 +0000
commit15c17d97328fcc50c40a5551341403919d1687f1 (patch)
tree403f79285c63dc373d8a60fef6fdb686e2bc15dc /make-feed.lua
parent4749fc16932b6076f0a5c01180db9705d2582608 (diff)
downloaddepctrl-feedmaker-15c17d97328fcc50c40a5551341403919d1687f1.tar.gz
depctrl-feedmaker-15c17d97328fcc50c40a5551341403919d1687f1.tar.bz2
depctrl-feedmaker-15c17d97328fcc50c40a5551341403919d1687f1.zip
add fake aegisub
Diffstat (limited to 'make-feed.lua')
-rwxr-xr-xmake-feed.lua40
1 files changed, 40 insertions, 0 deletions
diff --git a/make-feed.lua b/make-feed.lua
index be4cde7..bf286d2 100755
--- a/make-feed.lua
+++ b/make-feed.lua
@@ -148,7 +148,10 @@ local function deepcopy(orig, copies) -- copied and pasted from https://lua-user
return copy
end
+-- fake libraries so scripts don't throw a fit about not having stuff
+
local noop = function() end
+local return_input = function(i) return i end
local function fake_depctrl(i)
__feedmaker_version = i
@@ -175,6 +178,43 @@ local function fake_depctrl(i)
}
end
+local function fake_aegisub()
+ local aegisub = {}
+
+ aegisub.register_macro = noop
+ aegisub.register_filter = noop
+
+ aegisub.progress = {}
+ aegisub.progress.set = noop
+ aegisub.progress.task = noop
+ aegisub.progress.title = noop
+ aegisub.progress.is_cancelled = noop
+
+ aegisub.debug = {}
+
+ aegisub.debug.out = noop
+ aegisub.log = noop
+
+ aegisub.dialog = {}
+
+ aegisub.dialog.display = noop
+ aegisub.dialog.open = noop
+ aegisub.dialog.save = noop
+
+ aegisub.cancel = noop
+ aegisub.text_extents = noop
+ aegisub.gettext = return_input
+
+ aegisub.frame_from_ms = noop
+ aegisub.ms_from_frame = noop
+ aegisub.video_size = noop
+ aegisub.keyframes = noop
+ aegisub.decode_path = noop
+ aegisub.project_properties = noop
+
+ return aegisub
+end
+
local function sandbox_require(obj)
if obj == "l0.DependencyControl" then
return fake_depctrl