Commit Graph

33 Commits

Author SHA1 Message Date
Thomas Goyne a84e463a06 Fix test compilation on windows 2013-12-11 15:03:45 -08:00
Thomas Goyne af96b305bf Switch to VC++ 2013 on Windows
Remove the faux-variadic make_unique since 2013 has real variadic
templates.

Switch to the non-deprecated windows version check functions.

Switch to the develop branch of boost since master doesn't fully support
VS 2013 atm.

Fix some assorted compilation errors.

Hardcode the paths to a bunch of Visual Studio things since it's now
expanding the relevant macros to nothing for whatever reason.
2013-12-11 15:02:35 -08:00
Thomas Goyne 80c9f67ce8 Rewrite the auto-matcher for the karaoke timing copier
Operate on characters rather than bytes in the dialog so that it
actually works with Kanji.

Rewrite the auto-matcher to handle more cases and add unit tests for it.
2013-09-15 14:52:16 -07:00
Thomas Goyne af74371f6d Retry commits of file writes for up to a second to work around AV scanning
Poorly-written antivirus software briefly lock newly written files to
scan them for viruses, which makes the rename from the temp file to
actual file fail. Work around this by retrying the rename up to ten
times.

Closes #1620.
2013-07-02 20:09:01 -07:00
Thomas Goyne 3306ee126d More unique_ptr 2013-06-11 20:54:07 -07:00
Thomas Goyne d81dfc1e73 Use a unique_ptr in agi::io::Save 2013-06-08 19:21:31 -07:00
Thomas Goyne f051e59a61 Return a unique_ptr from agi::io::Open 2013-06-08 19:21:31 -07:00
Thomas Goyne 47c36c9033 Use ICU/boost.locale for case-insensitive searching
Do proper unicode case-folding for case-insensitive searching rather
than converting only ascii characters to lowercase. The Turkish 'i' is
still not handled correctly (since it's the only place where
case-folding is locale-dependent), but that's probably not worth caring
about as long as we don't have a Turkish UI translation.

This affects both the find/replace dialog and the select lines dialog.

Closes #1342.
2013-02-06 13:38:33 -08:00
Thomas Goyne bc5417de4a Give all of the Aegisub-created threads names 2013-02-06 13:22:32 -08:00
Thomas Goyne 69e1744fc7 Make agi::util::time_log less insane 2013-02-06 13:22:16 -08:00
Thomas Goyne 1e0f08c0ed Mostly purge wxWidgets from non-UI stuff
Use boost::filesystem::path for all paths, and std::string for all other
strings, converting to/from wxString as close to the actual uses of wx
as possible.

Where possible, replace the uses of non-UI wxWidgets functionality with
the additions to the standard library in C++11, or the equivalents in
boost.

Move the path token management logic to libaegisub (and rewrite it in
the process).

Add a basic thread pool based on asio and std::thread to libaegisub.

This touches nearly every file in the project and a nontrivial amount of
code had to be rewritten entirely, so there's probably a lot of broken
stuff.
2013-02-06 13:22:15 -08:00
Thomas Goyne e8344ab0c7 Add agi::util::Remove for deleting files 2013-01-03 17:36:50 -08:00
Thomas Goyne cec5f2256c Add agi::util::try_parse 2013-01-03 17:36:50 -08:00
Thomas Goyne 96cf5ea7ed Kill the #ifndef AGI_PRE guards
They don't actually improve compilation performance and make it more
annoying to modify what things are in the precompiled header.
2012-12-02 06:33:29 -08:00
Thomas Goyne ebd56f2163 Include cstdint rather than stdint.h 2012-11-10 18:05:57 -08:00
Thomas Goyne e44c47c863 Remove $Id$ markers since git doesn't support them 2012-10-25 17:39:49 -07:00
Thomas Goyne f774f21903 Explicitly do nothing when an empty container is passed to delete_clear as it's oddly slow otherwise
Originally committed to SVN as r6402.
2012-01-31 00:44:55 +00:00
Thomas Goyne 7dd6cfe37d Derive agi::acs exceptions from agi::FileSystemError and friends rather than having two sets of errors for the same thing
Originally committed to SVN as r6278.
2012-01-12 22:31:54 +00:00
Thomas Goyne 231adad93f Implement agi::util::freespace for Windows
Originally committed to SVN as r5497.
2011-07-26 19:51:07 +00:00
Thomas Goyne 72bc33fda3 Fix compilation errors with precompiled headers disabled
Originally committed to SVN as r5484.
2011-07-16 06:42:55 +00:00
Grigori Goronzy 066ec3014a libaegisub: use statvfs instead of statfs
statvfs is the portable POSIX defined interface and is supported on all
major UNIX platforms.

Originally committed to SVN as r5367.
2011-02-23 00:54:18 +00:00
Amar Takhar 8240d3e6b6 Add util::freespace to check for free space on a path. (with tests)
Originally committed to SVN as r5346.
2011-02-10 23:55:59 +00:00
Amar Takhar bbc0f6f859 Document some utility methods.
Originally committed to SVN as r5345.
2011-02-10 02:47:41 +00:00
Amar Takhar 3522c0b4bd Add a strtoi function. (with unit tests)
Originally committed to SVN as r5340.
2011-02-10 00:41:15 +00:00
Amar Takhar 75e07c7aa7 Add a short method to make an std::string lowercase.
Originally committed to SVN as r5335.
2011-02-09 22:31:44 +00:00
Amar Takhar b47dd1e220 Add mid() template to util namespace.
Originally committed to SVN as r5278.
2011-02-03 15:49:13 +00:00
Amar Takhar 8e912e3ff6 Include <algorithm> to get std::for_each
Originally committed to SVN as r4587.
2010-06-24 01:51:18 +00:00
Thomas Goyne 2b47f34e76 Fix a pile of actual memory leaks
Originally committed to SVN as r4575.
2010-06-24 01:24:09 +00:00
Amar Takhar ea577f8245 Re-work types.h for the second time, this is most likely not the final version, it's difficult to figure out a solution that makes the most sense when most of the code hasn't been written/moved over yet.
Originally committed to SVN as r4468.
2010-06-09 02:07:43 +00:00
Amar Takhar 7e83443c3e Fix the Windows build, there are a couple of things to note:
* I rebroke the stdout logger I'll fix that in unix.
 * There is a new header libaegisub/types.h which is a temp solution until I sort out something more realistic.  It's too early to tell what the proper solution will be.

Originally committed to SVN as r4394.
2010-06-01 08:03:17 +00:00
Amar Takhar badee30d17 Sigh, not diffing before committing bites me again: remove useless deltas that shouldn't have been committed.
Originally committed to SVN as r4392.
2010-06-01 05:14:00 +00:00
Amar Takhar 37b904b75e Create time_log() to return a timeval so I can implement this on windows as well.
Originally committed to SVN as r4391.
2010-06-01 05:11:18 +00:00
Amar Takhar 40e12403d5 Merge all changes from the libaegisub branch into trunk, the effective range is r4175:4330. All options have been re-done and now use Cajun to support a json-backed format.
Initial support for low-level access and file I/O methods are included as well.

Originally committed to SVN as r4331.
2010-05-21 01:13:36 +00:00