Thomas Goyne
652a250189
Add an error message for when creating the Lua state fails
2015-11-29 20:11:14 -08:00
Thomas Goyne
ba9f5a78d4
Include the stack trace for errors in automation validation functions
2015-05-09 13:58:32 -07:00
Thomas Goyne
ff874fadf9
Reduce nesting
2015-05-09 13:58:23 -07:00
Thomas Goyne
5cedf16edd
Use the custom lua error handler during macro load
2015-02-15 08:19:23 -08:00
Thomas Goyne
79fb5cb3fe
Fix crash when deleting the last dialogue line from automation
2015-01-26 19:22:59 -08:00
Thomas Goyne
5201773a3b
Slightly optimize returning strings to lua from ffi functions
2014-12-28 16:46:37 -08:00
Thomas Goyne
76afcdafa1
Eliminate uses of dynamic_cast on everything but GUI widgets
2014-12-28 12:29:54 -08:00
Thomas Goyne
84bd682e2e
Make it harder for automation script to leave no lines selected
2014-12-24 16:12:21 -08:00
Thomas Goyne
5b47758539
Convert the clipboard module to the ffi
2014-07-28 15:52:37 -07:00
Thomas Goyne
4dc38447dc
Check the return value from lua_open()
...
It always fails when running under valgrind because valgrind does not
implement mmap functionality that LuaJIT requires.
2014-07-11 09:26:58 -07:00
Thomas Goyne
b43788fa7f
Replace boost::format with agi::format
...
boost::format is slow to compile, slow to run, and has an unpleasant
interface.
2014-05-30 08:30:31 -07:00
Thomas Goyne
9d3067ae75
Return absolute paths for files in project_properties()
2014-05-23 07:28:26 -07:00
Thomas Goyne
09e325a1c3
Clean up unused includes
2014-05-23 07:28:24 -07:00
Thomas Goyne
aa21b3d77d
Add aegisub.project_properties()
...
Returns a table with all of the project metadata junk that used to be in
the script info section of the file.
Closes #1747 .
2014-05-22 09:29:16 -07:00
Thomas Goyne
19e8f19e52
Redesign project file handling
...
Add a new Project class which is responsible for everything related to
opening and closing audio, video, subtitles, timecodes and keyframes.
This pulls almost everything not directly related to playing audio/video
out of the audio and video controllers, pulls more crap out of
FrameMain, and happens to make things a little simpler in the process.
2014-05-22 09:29:12 -07:00
Thomas Goyne
1eba2f035c
Add a separate SSA subtitle format and move all of the SSA writing stuff there
2014-04-30 06:29:37 -07:00
Thomas Goyne
431b096f51
Fix loading modules with UTF-8 BOMs
...
Ensure MoonScript gets loaded before we install our package loader to
avoid having its package loader used over ours.
2014-04-28 14:19:16 -07:00
Thomas Goyne
606e3f4882
Fix crash on script load errors
2014-04-28 13:36:56 -07:00
Thomas Goyne
63f4bf1beb
Switch from regular Lua to LuaJIT
2014-04-28 07:38:30 -07:00
Thomas Goyne
9492192b73
Switch back to building Lua as C
...
In preparation for switching to LuaJIT, which doesn't support PUC Lua's
thing of using C++ exceptions for lua_error.
Requires replacing all uses of lua_error (and things calling lua_error)
with custom versions that throw an exception instead and adding an
exception -> lua error wrapper at all C++ -> Lua boundaries.
2014-04-27 10:37:23 -07:00
Thomas Goyne
e3eb28ffd1
Extract some duplicated table pushing code
2014-04-27 09:15:35 -07:00
Thomas Goyne
689c16deb3
Use lua_createtable where applicable
2014-04-27 09:15:35 -07:00
Thomas Goyne
2adcc76cf6
Switch automation tests to busted
...
This requires shuffling a bunch of stuff around to get a CLI lua
executable that uses an automation-like environment, but that's
something that'll be nice to have in the future anyway.
Busted indirectly depends on lfs and we currently can't use external
binary modules, so add a copy of lfs to the repo and build it with
Aegisub.
2014-04-26 08:16:38 -07:00
Thomas Goyne
b8af29da0d
Move some of the automation machinery to libaegisub
2014-04-25 15:03:18 -07:00
Thomas Goyne
4cd92ee532
Move stuff only ever used in auto4_lua.cpp to an anonymous namespace there
2014-04-25 09:27:27 -07:00
Niels Martin Hansen
d53c36e67f
Merge branch 'extradata'
...
Conflicts:
src/ass_parser.cpp
2014-04-25 17:22:15 +02:00
Niels Martin Hansen
18f55eaebf
Load luabins library into Auto4 Lua environment
2014-04-24 23:01:27 +02:00
Thomas Goyne
6fc4c8da14
Move make_unique to its own header file
...
Rebuilding the entire project after touching util.h gets old fast.
2014-04-23 15:29:23 -07:00
Niels Martin Hansen
159dfcde39
Add extradata reading/writing to Auto4 Lua
2014-04-23 22:54:01 +02:00
Thomas Goyne
feec511227
Use more make_unique
2014-04-22 16:37:12 -07:00
Thomas Goyne
d07cba4875
Keep the old active line when an automation script changes the selection but not active line
2014-04-16 08:11:38 -07:00
Thomas Goyne
1d5292fdee
Kill config.h and just force-include acconf.h in non-pch builds
2014-04-16 08:11:37 -07:00
Thomas Goyne
fcd0df2e96
Preserve the old selection when an automation script doesn't return a new one
2014-03-31 08:11:43 -07:00
Thomas Goyne
35301df5f7
Remove the (unimplemented) machinery for automation subtitle formats
2014-03-26 11:17:38 -07:00
Thomas Goyne
aa46c49403
Pull some of the context (de)init out of FrameMain
...
And actually do deinitialize more of the stuff in the context.
2014-03-25 20:04:48 -07:00
Thomas Goyne
523d858374
Extract SelectionController from BaseGrid
2014-03-25 17:06:47 -07:00
Thomas Goyne
ea96c6e2ad
Make everything final that can be
...
Apparently gcc does use final for devirtualization.
2014-03-12 19:07:30 -07:00
Thomas Goyne
26c92453b8
Slather on some std::moves when setting the selection
2014-03-12 15:20:37 -07:00
Thomas Goyne
843e71331f
Add in-repo copy of Lua and use it rather than the system copy
...
Aegisub needs Lua built as C++ (for stack unwinding on errors). No one
packages it like that, so at the moment we can't actually use systme
packages for Lua.
Fixes a bunch of memory leaks on Automation errors.
2014-03-11 12:15:01 -07:00
Thomas Goyne
33a4a056a4
Move everything up a level since the root dir no longer has stuff
2014-03-11 12:14:57 -07:00