Commit Graph

7273 Commits

Author SHA1 Message Date
Thomas Goyne 606e3f4882 Fix crash on script load errors 2014-04-28 13:36:56 -07:00
Thomas Goyne e3fa270345 Process any pending log text when a progress dialog completes 2014-04-28 11:01:57 -07:00
Thomas Goyne e5f935678e Build LuaJIT in Lua 5.2 mode on Windows as well 2014-04-28 10:58:55 -07:00
Thomas Goyne a5a6d5da86 Restore the BOM-skipping logic to the Lua script reader
And add BOM to one of the test files to verify it works.
2014-04-28 10:21:54 -07:00
Thomas Goyne 8aa3c8761c Unswap the actor and effect columns in the grid 2014-04-28 10:10:33 -07:00
Thomas Goyne 5be69dc7e8 Fix compilation of LuaJIT on x64 Windows 2014-04-28 09:13:09 -07:00
Thomas Goyne aa850688f4 Don't try to open compressed subtitle tracks
Actually supporting them would be even better of course, but at least
don't crash on them.
2014-04-28 08:43:25 -07:00
Thomas Goyne c74045cf20 Use spin controls for numeric fields in the style editor
Closes #1741.
2014-04-28 07:38:33 -07:00
Thomas Goyne 63f4bf1beb Switch from regular Lua to LuaJIT 2014-04-28 07:38:30 -07:00
Thomas Goyne ec4a8c9a26 Fix read from before beginning of stack 2014-04-27 21:23:53 -07:00
Thomas Goyne b4de0b9b82 Fix crash on zero-length lua files 2014-04-27 21:23:52 -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 5cde33c8d5 Reimplement the useful parts of lfs
It doesn't support Unicode on Windows, so replace it with a
reimplementation using boost.filesystem that does, but skip all the
useless junk.
2014-04-26 08:16:39 -07:00
Thomas Goyne 50e27d8247 Shut up warning 2014-04-26 08:16:38 -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 15ae2b0ccc Eliminate a bunch of explicit constructors/destructors
Use explicitly defaulted destructors for base cases when possible,
eliminate aggregate initialization constructors where possible, and push
some more stuff to NSDMIs.
2014-04-25 14:53:24 -07:00
Thomas Goyne a5fdc6795c Fix compilation of automation tests 2014-04-25 14:52:53 -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
Thomas Goyne e7734e642d Use nullptr 2014-04-25 08:59:43 -07:00
Thomas Goyne d0603fde88 Don't check for used extradata ids if there are none 2014-04-25 08:59:43 -07:00
Thomas Goyne 882afc5111 Update out-of-date tests 2014-04-25 08:59:42 -07:00
Thomas Goyne b9509289aa Fix test compilation 2014-04-25 08:59:42 -07:00
Thomas Goyne 2de5396f7a Remove luabins project from MinDep and Test targets 2014-04-25 08:59:42 -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 5a930cfee3 Forgot to add the luabins project to MSVS solution file 2014-04-25 17:19:39 +02:00
Thomas Goyne d4fbe3040d Preserve the insertion point (but not selection) when switching between lines 2014-04-25 08:00:45 -07:00
Niels Martin Hansen f278c35f3f Dynamically use either inline_string escaping or uuencoding for extradata
Since luabins generates binary data which grows up to 3x by escaping,
it's more efficient to uuencode that instead.
A marker is placed as the first character of the value field, either
'e' for inline_string escaped text, or 'u' for uuencoded binary data.
The key is always inline_string escaped, as it will typically be
human readable.
2014-04-25 16:04:08 +02:00
Niels Martin Hansen bcd41bd986 Windows build system for luabins (untested) 2014-04-25 15:08:54 +02:00
Thomas Goyne 6ee1b8ca52 Update the start sample between blocks in the ram audio provider correctly 2014-04-24 19:08:05 -07:00
Thomas Goyne cef07785d7 Remove a pointless ++ and make stuff const 2014-04-24 18:51:54 -07:00
Niels Martin Hansen 7839e8c983 Fix bug in extradata id list reading 2014-04-25 00:05:32 +02:00
Niels Martin Hansen b2768b7abd Work around boost::format bug
See https://svn.boost.org/trac/boost/ticket/9360
It seems that the %X specifier is ignored if the input value is a char type
and the char is instead output verbatim and not in its integer value.
Casting it to an int works around this.
2014-04-24 23:54:42 +02:00
Niels Martin Hansen 3f08b1d057 Use lua_pushlstring() so strings with embedded NULs also work 2014-04-24 23:49:36 +02:00
Niels Martin Hansen 18f55eaebf Load luabins library into Auto4 Lua environment 2014-04-24 23:01:27 +02:00
Niels Martin Hansen 057a223b38 Integrate luabins into Aegisub's build system
Make it build as C++ so it links properly against the C++-built version
of Lua used in Aegisub too.
2014-04-24 23:01:27 +02:00
Niels Martin Hansen b4801ef1bb Import luabins 831869cdc8c5e7579804e6472a2dc6cbe0b2672b 2014-04-24 23:00:41 +02:00
Thomas Goyne 7161ce167c Use lambdas rather than std::bind(std::ref(Signal)) for signal forwarding 2014-04-23 15:48:39 -07:00
Thomas Goyne 7f289551ae Remove -Wno-variadic-macros from CXXFLAGS
It's no longer nonstandard in C++11.
2014-04-23 15:29:23 -07: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 cf81e91383 Perform extradata garbage collection on save 2014-04-23 22:54:01 +02:00
Niels Martin Hansen 159dfcde39 Add extradata reading/writing to Auto4 Lua 2014-04-23 22:54:01 +02:00
Niels Martin Hansen 040b467090 Add undo support for extradata 2014-04-23 22:54:01 +02:00
Niels Martin Hansen 8076fb2791 Basic storage and loading/saving for extradata 2014-04-23 22:54:01 +02:00
Thomas Goyne c248dc56da Make the visual tool drag handles a little smaller 2014-04-23 07:15:28 -07:00
Thomas Goyne 7b0b74fbb0 Fix off-by-one error in the bounds check for restoring the active line 2014-04-23 06:22:18 -07:00
Thomas Goyne ec6f14eef4 Make double-click in the edit box smarter
Use the syntax highlighting's word splitting to decide what to select so
that double-clicking on \Nword only selects 'word'.
2014-04-22 17:01:22 -07:00
Thomas Goyne b4284efb38 Trigger the audio selection change logic when switching timing controllers
Results in the display seeking to the active line when audio is opened
(if seeking to active line is enabled), and initializes the scrollbar
properly.

Updates #1732.
2014-04-22 16:42:47 -07:00