Compare commits

...

19 Commits

Author SHA1 Message Date
Thomas Goyne 373e1ec4b2 Add tarball files 2014-09-14 09:39:18 -07:00
Thomas Goyne 906fcaed88 Bumper version number in portable installer to 3.2.1 2014-09-14 09:24:03 -07:00
Thomas Goyne 58956b3ffc Optimize Extradata handling a bit 2014-09-14 09:18:31 -07:00
Thomas Goyne 4cf7cc819d Fix loading subtitles extradata from matroska files 2014-09-14 09:18:21 -07:00
darealshinji 19dad7c564 fix permissions in INSTALL_FLAGS 2014-09-14 09:18:15 -07:00
torque 63383fddf1 Perform extradata deduplication on add.
Checks all existing extradata keys and values to ensure that the set
that is being added doesn't already exist.
2014-08-30 08:04:21 -07:00
Thomas Goyne 74bad86981 Handle json parsing errors when loading shift times history
Closes #1802.
2014-08-30 08:04:12 -07:00
Thomas Goyne 2345bc4d0e Update wx
Removes the need for the RTL hacks in BaseGrid as the bugs have been
fixed properly in wx.
2014-08-30 08:04:04 -07:00
Thomas Goyne 1874bde9c9 Update boost to 1.56
Closes #1818.
2014-08-30 08:03:59 -07:00
Oleksiy Prytchyn 646942fd89 Add Ukrainian translation. Closes #1809. 2014-08-30 08:03:49 -07:00
Thomas Goyne 5a2d56c4d3 Actually register the SSA subtitle format 2014-08-30 08:03:43 -07:00
Thomas Goyne 6c657455b2 Bump version number in portable installer to 3.2.0 2014-07-28 07:24:06 -07:00
djcj 32178f66c0 update config.guess and config.sub 2014-07-27 16:37:09 -07:00
djcj c4b35dd3a4 add '(Language)' after translated labels as suggested on the forums: http://forum.aegisub.org/viewtopic.php?f=5&t=66925#p91569 2014-07-27 16:37:07 -07:00
Thomas Goyne cdc8dbf637 Fix handling for automation debug formatting errors
One spot was missed when converting stuff over to using error_Tag rather
than lua_error for stack unwinding on errors.
2014-07-27 16:36:57 -07:00
Thomas Goyne 9310350c45 Change filename on Linux to aegisub-3.2 2014-07-23 15:30:37 -07:00
Thomas Goyne 60c51eb9a3 Ensure the lua state gets closed when running tests
This is required for the gc metamethods to actually get run.
2014-07-23 15:30:29 -07:00
Thomas Goyne bf7503fe5c Remove the automation thread priority stuff
It hasn't actually been used for anything for a while, and if a single
normal-priority thread can make your system unresponsive it's time to
upgrade to an OS that's isn't garbage.
2014-07-23 15:30:28 -07:00
Thomas Goyne 8d8ae122ee Use wx events for invoking on the main thread on OS X
Dispatching to the main queue with GCD does not work when there is a
modal dialog active.
2014-07-23 15:30:28 -07:00
58 changed files with 24363 additions and 448 deletions

2
.gitmodules vendored
View File

@ -4,7 +4,7 @@
ignore = dirty
[submodule "wxWidgets"]
path = vendor/wxWidgets
url = git://github.com/wxWidgets/wxWidgets.git
url = git://github.com/Aegisub/wxWidgets.git
ignore = dirty
[submodule "googletest"]
path = vendor/googletest

View File

@ -29,7 +29,7 @@ CPPFLAGS = @CPPFLAGS@
CFLAGS_DEP = -MMD -MP
LIBS = @LIBS@
LDFLAGS = @LDFLAGS@
INSTALL_FLAGS = -m 664
INSTALL_FLAGS = -m 644
LIB_SHARED_LINK = -shared -Wl,-soname -Wl,$(LIB_SHARED_FULL)
LIB_SHARED_LINK_OSX = -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -compatibility_version $(LIB_VERSION) -current_version $(LIB_VERSION) -Wl,-single_module -mmacosx-version-min=10.7 -install_name ${CURDIR}/$(LIB_SHARED_FULL)

196
acconf.h.in Normal file
View File

@ -0,0 +1,196 @@
/* acconf.h.in. Generated from configure.ac by autoheader. */
/* Name of the Aegisub gettext catalog */
#undef AEGISUB_CATALOG
/* Name of the Aegisub executable */
#undef AEGISUB_COMMAND
/* Enable if iconv expects the in argument to be const */
#undef AGI_ICONV_CONST
/* Build credit supplied in application title using --with-build-credit= */
#undef BUILD_CREDIT
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
/* Define to 1 if you have the <boost/spirit/home/phoenix/version.hpp> header
file. */
#undef HAVE_BOOST_SPIRIT_HOME_PHOENIX_VERSION_HPP
/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#undef HAVE_DCGETTEXT
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Define to 1 if you have the <GL/gl.h> header file. */
#undef HAVE_GL_GL_H
/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <OpenGL/gl.h> header file. */
#undef HAVE_OPENGL_GL_H
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
/* Have PTHREAD_PRIO_INHERIT. */
#undef HAVE_PTHREAD_PRIO_INHERIT
/* Define to 1 if you have the <soundcard.h> header file. */
#undef HAVE_SOUNDCARD_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/soundcard.h> header file. */
#undef HAVE_SYS_SOUNDCARD_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the <windows.h> header file. */
#undef HAVE_WINDOWS_H
/* Default install prefix, or --prefix. */
#undef INSTALL_PREFIX
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
#undef PTHREAD_CREATE_JOINABLE
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Base path for the update checker */
#undef UPDATE_CHECKER_BASE_URL
/* Server for the update checker */
#undef UPDATE_CHECKER_SERVER
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Enable ALSA Support */
#undef WITH_ALSA
/* Enable exception handling in debug mode. (--enable-debug) This is always
enabled when debug mode is off. */
#undef WITH_EXCEPTIONS
/* Enable FFMS2 support */
#undef WITH_FFMS2
/* Enable fftw support */
#undef WITH_FFTW3
/* Enable Hunspell support */
#undef WITH_HUNSPELL
/* Enable PulseAudio support */
#undef WITH_LIBPULSE
/* Enable OpenAL support */
#undef WITH_OPENAL
/* Enable OSS support */
#undef WITH_OSS
/* Enable PortAudio v19 support */
#undef WITH_PORTAUDIO
/* Whether to enable the update checker */
#undef WITH_UPDATE_CHECKER
/* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE

2707
aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -33,6 +33,12 @@ void check(lua_State *L, int status) {
exit(status);
}
}
int close_and_exit(lua_State *L) {
int status = lua_tointeger(L, 1);
lua_close(L);
exit(status);
}
}
int main(int argc, char **argv) {
@ -54,6 +60,13 @@ int main(int argc, char **argv) {
preload_modules(L);
Install(L, {"include"});
// Patch os.exit to close the lua state first since busted calls it when
// it's done
lua_getglobal(L, "os");
lua_pushcfunction(L, close_and_exit);
lua_setfield(L, -2, "exit");
lua_pop(L, 1);
// Build arg table for scripts
lua_createtable(L, argc - 1, 0);
for (int i = 1; i < argc; ++i) {
@ -76,5 +89,6 @@ int main(int argc, char **argv) {
int base = lua_gettop(L) - argc + 1;
check(L, lua_pcall(L, argc - 2, LUA_MULTRET, base));
lua_close(L);
}

3
build/git_version.h Normal file
View File

@ -0,0 +1,3 @@
#define BUILD_GIT_VERSION_NUMBER 8622
#define BUILD_GIT_VERSION_STRING "3.2.1"
#define TAGGED_RELEASE 1

331
config.guess vendored
View File

@ -1,14 +1,12 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
# Copyright 1992-2014 Free Software Foundation, Inc.
timestamp='2012-08-14'
timestamp='2014-03-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@ -22,19 +20,17 @@ timestamp='2012-08-14'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Per Bothner. Please send patches (context
# diff format) to <config-patches@gnu.org> and include a ChangeLog
# entry.
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
#
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
me=`echo "$0" | sed -e 's,.*/,,'`
@ -54,9 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_SYSTEM}" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
eval $set_cc_for_build
cat <<-EOF > $dummy.c
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
#elif defined(__dietlibc__)
LIBC=dietlibc
#else
LIBC=gnu
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
;;
esac
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@ -306,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
arm:riscos:*:*|arm:RISCOS:*:*)
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@ -811,7 +826,7 @@ EOF
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:MSYS*:*)
*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
@ -859,21 +874,21 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@ -886,59 +901,54 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-gnu
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-gnu
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
LIBC=gnu
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@ -957,54 +967,63 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
or32:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
openrisc*:Linux:*:*)
echo or1k-unknown-linux-${LIBC}
exit ;;
or32:Linux:*:* | or1k*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-gnu ;;
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
*) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64le:Linux:*:*)
echo powerpc64le-unknown-linux-${LIBC}
exit ;;
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@ -1237,19 +1256,31 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
i386)
eval $set_cc_for_build
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
UNAME_PROCESSOR="x86_64"
fi
fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
eval $set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
# that puts up a graphical alert prompting to install
# developer tools. Any system running Mac OS X 10.7 or
# later (Darwin 11 and later) is required to have a 64-bit
# processor. This is not true of the ARM version of Darwin
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
@ -1340,154 +1371,6 @@ EOF
exit ;;
esac
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
#endif
main ()
{
#if defined (sony)
#if defined (MIPSEB)
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
I don't know.... */
printf ("mips-sony-bsd\n"); exit (0);
#else
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
#else
""
#endif
); exit (0);
#endif
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
printf ("arm-acorn-riscix\n"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
printf ("m68k-hp-bsd\n"); exit (0);
#endif
#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
if (version < 4)
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
else
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
#if defined (MULTIMAX) || defined (n16)
#if defined (UMAXV)
printf ("ns32k-encore-sysv\n"); exit (0);
#else
#if defined (CMU)
printf ("ns32k-encore-mach\n"); exit (0);
#else
printf ("ns32k-encore-bsd\n"); exit (0);
#endif
#endif
#endif
#if defined (__386BSD__)
printf ("i386-pc-bsd\n"); exit (0);
#endif
#if defined (sequent)
#if defined (i386)
printf ("i386-sequent-dynix\n"); exit (0);
#endif
#if defined (ns32000)
printf ("ns32k-sequent-dynix\n"); exit (0);
#endif
#endif
#if defined (_SEQUENT_)
struct utsname un;
uname(&un);
if (strncmp(un.version, "V2", 2) == 0) {
printf ("i386-sequent-ptx2\n"); exit (0);
}
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
printf ("i386-sequent-ptx1\n"); exit (0);
}
printf ("i386-sequent-ptx\n"); exit (0);
#endif
#if defined (vax)
# if !defined (ultrix)
# include <sys/param.h>
# if defined (BSD)
# if BSD == 43
printf ("vax-dec-bsd4.3\n"); exit (0);
# else
# if BSD == 199006
printf ("vax-dec-bsd4.3reno\n"); exit (0);
# else
printf ("vax-dec-bsd\n"); exit (0);
# endif
# endif
# else
printf ("vax-dec-bsd\n"); exit (0);
# endif
# else
printf ("vax-dec-ultrix\n"); exit (0);
# endif
#endif
#if defined (alliant) && defined (i860)
printf ("i860-alliant-bsd\n"); exit (0);
#endif
exit (1);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
{ echo "$SYSTEM_NAME"; exit; }
# Apollos put the system type in the environment.
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
# Convex versions that predate uname can use getsysinfo(1)
if [ -x /usr/convex/getsysinfo ]
then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
exit ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
c34*)
echo c34-convex-bsd
exit ;;
c38*)
echo c38-convex-bsd
exit ;;
c4*)
echo c4-convex-bsd
exit ;;
esac
fi
cat >&2 <<EOF
$0: unable to guess system type

94
config.sub vendored
View File

@ -1,24 +1,18 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
# Copyright 1992-2014 Free Software Foundation, Inc.
timestamp='2012-08-18'
timestamp='2014-05-01'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
@ -26,11 +20,12 @@ timestamp='2012-08-18'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted GNU ChangeLog entry.
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@ -73,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -156,7 +149,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray | -microblaze)
-apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
@ -259,10 +252,12 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| be32 | be64 \
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | clipper \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
@ -270,10 +265,11 @@ case $basic_machine in
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@ -287,20 +283,22 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 \
| or32 \
| open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
@ -328,7 +326,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@ -370,13 +368,13 @@ case $basic_machine in
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@ -385,11 +383,13 @@ case $basic_machine in
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@ -403,18 +403,22 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
@ -788,7 +792,7 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
microblaze)
microblaze*)
basic_machine=microblaze-xilinx
;;
mingw64)
@ -796,7 +800,7 @@ case $basic_machine in
os=-mingw64
;;
mingw32)
basic_machine=i386-pc
basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@ -832,7 +836,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i386-pc
basic_machine=i686-pc
os=-msys
;;
mvs)
@ -1023,7 +1027,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
rdos | rdos64)
basic_machine=x86_64-pc
os=-rdos
;;
rdos32)
basic_machine=i386-pc
os=-rdos
;;
@ -1350,7 +1358,7 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@ -1372,7 +1380,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1496,9 +1504,6 @@ case $os in
-aros*)
os=-aros
;;
-kaos*)
os=-kaos
;;
-zvmoe)
os=-zvmoe
;;
@ -1547,6 +1552,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
c8051-*)
os=-elf
;;
hexagon-*)
os=-elf
;;

14555
configure vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -50,7 +50,7 @@ AC_SUBST(build_darwin)
# On OS X everything goes in an app bundle so no point in versioning the executable
AS_IF([test x$build_darwin = xyes],
[AEGISUB_COMMAND="aegisub"],
[AEGISUB_COMMAND="aegisub-3.1"])
[AEGISUB_COMMAND="aegisub-3.2"])
AC_SUBST(AEGISUB_COMMAND)
AC_DEFINE_UNQUOTED([AEGISUB_COMMAND], ["${AEGISUB_COMMAND}"], [Name of the Aegisub executable])
@ -58,7 +58,7 @@ AC_DEFINE_UNQUOTED([AEGISUB_COMMAND], ["${AEGISUB_COMMAND}"], [Name of the Aegis
# On OS X everything goes in an app bundle so no point in versioning the executable
AS_IF([test x$build_darwin = xyes],
[AEGISUB_CATALOG="aegisub"],
[AEGISUB_CATALOG="aegisub-31"])
[AEGISUB_CATALOG="aegisub-32"])
AC_SUBST(AEGISUB_CATALOG)
AC_DEFINE_UNQUOTED([AEGISUB_CATALOG], ["${AEGISUB_CATALOG}"], [Name of the Aegisub gettext catalog])

View File

@ -68,13 +68,12 @@ namespace agi {
/// @brief Run a function on a background thread
/// @param task Function to run
/// @param priority Thread priority or -1 for default
/// @throws agi::UserCancelException on cancel
///
/// Blocks the calling thread until the task completes or is canceled.
/// Progress updates sent to the progress sink passed to the task should
/// be displayed to the user in some way, along with some way for the
/// user to cancel the task.
virtual void Run(std::function<void(ProgressSink *)> task, int priority=-1)=0;
virtual void Run(std::function<void(ProgressSink *)> task)=0;
};
}

View File

@ -16,21 +16,27 @@
#include <libaegisub/fs.h>
#include <boost/exception/detail/attribute_noreturn.hpp>
#include <lua.hpp>
#include <string>
#include <vector>
#include <type_traits>
#include <boost/config.hpp>
#ifndef BOOST_NORETURN
#include <boost/exception/detail/attribute_noreturn.hpp>
#define BOOST_NORETURN BOOST_ATTRIBUTE_NORETURN
#endif
namespace agi { namespace lua {
// Exception type for errors where the error details are on the lua stack
struct error_tag {};
// Below are functionally equivalent to the luaL_ functions, but using a C++
// exception for stack unwinding
int BOOST_ATTRIBUTE_NORETURN error(lua_State *L, const char *fmt, ...);
int BOOST_ATTRIBUTE_NORETURN argerror(lua_State *L, int narg, const char *extramsg);
int BOOST_ATTRIBUTE_NORETURN typerror(lua_State *L, int narg, const char *tname);
int BOOST_NORETURN error(lua_State *L, const char *fmt, ...);
int BOOST_NORETURN argerror(lua_State *L, int narg, const char *extramsg);
int BOOST_NORETURN typerror(lua_State *L, int narg, const char *tname);
void argcheck(lua_State *L, bool cond, int narg, const char *msg);
inline void push_value(lua_State *L, bool value) { lua_pushboolean(L, value); }

View File

@ -181,7 +181,7 @@ int add_stack_trace(lua_State *L) {
return 1;
}
int BOOST_ATTRIBUTE_NORETURN error(lua_State *L, const char *fmt, ...) {
int BOOST_NORETURN error(lua_State *L, const char *fmt, ...) {
va_list argp;
va_start(argp, fmt);
luaL_where(L, 1);
@ -191,7 +191,7 @@ int BOOST_ATTRIBUTE_NORETURN error(lua_State *L, const char *fmt, ...) {
throw error_tag();
}
int BOOST_ATTRIBUTE_NORETURN argerror(lua_State *L, int narg, const char *extramsg) {
int BOOST_NORETURN argerror(lua_State *L, int narg, const char *extramsg) {
lua_Debug ar;
if (!lua_getstack(L, 0, &ar))
error(L, "bad argument #%d (%s)", narg, extramsg);
@ -203,7 +203,7 @@ int BOOST_ATTRIBUTE_NORETURN argerror(lua_State *L, int narg, const char *extram
narg, ar.name, extramsg);
}
int BOOST_ATTRIBUTE_NORETURN typerror(lua_State *L, int narg, const char *tname) {
int BOOST_NORETURN typerror(lua_State *L, int narg, const char *tname) {
const char *msg = lua_pushfstring(L, "%s expected, got %s",
tname, luaL_typename(L, narg));
argerror(L, narg, msg);

View File

@ -17,19 +17,71 @@
#include "libaegisub/dispatch.h"
#include <dispatch/dispatch.h>
#include <mutex>
namespace {
std::function<void (agi::dispatch::Thunk)> invoke_main;
using namespace agi::dispatch;
std::function<void (Thunk)> invoke_main;
struct GCDQueue : agi::dispatch::Queue {
dispatch_queue_t queue;
GCDQueue(dispatch_queue_t queue) : queue(queue) { }
void DoInvoke(agi::dispatch::Thunk) override final { }
struct OSXQueue : Queue {
virtual void DoSync(Thunk thunk)=0;
};
struct OwningQueue final : GCDQueue {
using GCDQueue::GCDQueue;
~OwningQueue() { dispatch_release(queue); }
struct MainQueue final : OSXQueue {
void DoInvoke(Thunk thunk) override { invoke_main(thunk); }
void DoSync(Thunk thunk) {
std::mutex m;
std::condition_variable cv;
std::unique_lock<std::mutex> l(m);
std::exception_ptr e;
bool done = false;
invoke_main([&]{
std::unique_lock<std::mutex> l(m);
try {
thunk();
}
catch (...) {
e = std::current_exception();
}
done = true;
cv.notify_all();
});
cv.wait(l, [&]{ return done; });
if (e) std::rethrow_exception(e);
}
};
struct GCDQueue final : OSXQueue {
dispatch_queue_t queue;
GCDQueue(dispatch_queue_t queue) : queue(queue) { }
~GCDQueue() { dispatch_release(queue); }
void DoInvoke(Thunk thunk) override {
dispatch_async(queue, ^{
try {
thunk();
}
catch (...) {
auto e = std::current_exception();
invoke_main([=] { std::rethrow_exception(e); });
}
});
}
void DoSync(Thunk thunk) override {
std::exception_ptr e;
std::exception_ptr *e_ptr = &e;
dispatch_sync(queue, ^{
try {
thunk();
}
catch (...) {
*e_ptr = std::current_exception();
}
});
if (e) std::rethrow_exception(e);
}
};
}
@ -38,34 +90,11 @@ void Init(std::function<void (Thunk)> invoke_main) {
::invoke_main = std::move(invoke_main);
}
void Queue::Async(Thunk thunk) {
dispatch_async(static_cast<GCDQueue *>(this)->queue, ^{
try {
thunk();
}
catch (...) {
auto e = std::current_exception();
invoke_main([=] { std::rethrow_exception(e); });
}
});
}
void Queue::Sync(Thunk thunk) {
std::exception_ptr e;
std::exception_ptr *e_ptr = &e;
dispatch_sync(static_cast<GCDQueue *>(this)->queue, ^{
try {
thunk();
}
catch (...) {
*e_ptr = std::current_exception();
}
});
if (e) std::rethrow_exception(e);
}
void Queue::Async(Thunk thunk) { DoInvoke(std::move(thunk)); }
void Queue::Sync(Thunk thunk) { static_cast<OSXQueue *>(this)->DoSync(std::move(thunk)); }
Queue& Main() {
static GCDQueue q(dispatch_get_main_queue());
static MainQueue q;
return q;
}
@ -75,7 +104,7 @@ Queue& Background() {
}
std::unique_ptr<Queue> Create() {
return std::unique_ptr<Queue>(new OwningQueue(dispatch_queue_create("Aegisub worker queue",
DISPATCH_QUEUE_SERIAL)));
return std::unique_ptr<Queue>(new GCDQueue(dispatch_queue_create("Aegisub worker queue",
DISPATCH_QUEUE_SERIAL)));
}
} }

View File

@ -90,6 +90,7 @@ Name: "pt_PT"; MessagesFile: "compiler:Languages\Portuguese.isl"
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "sr_RS"; MessagesFile: "compiler:Languages\SerbianCyrillic.isl"
Name: "sr_RS_latin"; MessagesFile: "compiler:Languages\SerbianLatin.isl"
Name: "uk_UA"; MessagesFile: "compiler:Languages\Ukrainian.isl"
Name: "zh_CN"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
Name: "zh_TW"; MessagesFile: "compiler:Languages\ChineseTraditional.isl"

View File

@ -1,29 +1,44 @@
[CustomMessages]
InstallRuntime=Installing runtime libraries...
el.InstallRuntime=Εγκατάσταση βιβλιοθηκών...
eu.InstallRuntime=Runtime liburutegiak ezartzen...
id.InstallRuntime=Memasang runtime libraries...
pt_PT.InstallRuntime=A instalar livrarias de runtime...
uk_UA.InstallRuntime=Встановлюю бібліотеки реального часу...
zh_CN.InstallRuntime=正在安装运行库……
zh_TW.InstallRuntime=正在安裝運行庫……
StartMenuIcon=Create a start menu icon
el.StartMenuIcon=Δημιουργία εικονιδίου στο μενού έναρξης
eu.StartMenuIcon=Sortu hasiera menuko ikur bat
id.StartMenuIcon=Buat ikon di menu awal
pt_PT.StartMenuIcon=Criar ícone no menu iniciar
uk_UA.StartMenuIcon=Створити піктограму в меню Запустити
zh_CN.StartMenuIcon=创建开始菜单图标
zh_TW.StartMenuIcon=創建開始功能表圖示
CheckForUpdates=Automatically check for new versions of Aegisub
el.CheckForUpdates=Αυτόματος έλεγχος για καινούριες εκδόσεις του Aegisub
eu.CheckForUpdates=Berezgaitasunez egiaztatu Aegisub-ren bertsio berririk dagoen
id.CheckForUpdates=Otomatis cek versi terbaru Aegisub
pt_PT.CheckForUpdates=Verifica automaticamente a existência de novas versões do Aegisub
uk_UA.CheckForUpdates=Автоматично перевіряти Aegisub на нові версії
zh_CN.CheckForUpdates=自动检查Aegisub的新版本
zh_TW.CheckForUpdates=更新檢查器:
zh_TW.CheckForUpdates=自動檢查Aegisub的新版本
UpdatesGroup=Update Checker:
el.UpdatesGroup=Έλεγχος Ενημερώσεων:
eu.UpdatesGroup=Eguneraketa Egiaztatzailea:
id.UpdatesGroup=Pemeriksa Pembaharuan
pt_PT.UpdatesGroup=Verificar Actualizações:
zh_CN.UpdatesGroup=更新检查器:
zh_TW.UpdatesGroup=自動檢查Aegisub的新版本
uk_UA.UpdatesGroup=Модуль Перевірки на Оновлення:
zh_CN.UpdatesGroup=自动更新:
zh_TW.UpdatesGroup=自動更新:
; Replacement for License page, no need to bother the user with legal mumbo-jumbo
[Messages]
WelcomeLabel2=This will install Aegisub {#BUILD_GIT_VERSION_STRING} on your computer.%n%nAegisub is covered by the GNU General Public License version 2. This means you may use the application for any purpose without charge, but that no warranties of any kind are given either.%n%nSee the Aegisub website for information on obtaining the source code.
el.WelcomeLabel2=Αυτό θα εγκαταστήσει το Aegisub {#BUILD_GIT_VERSION_STRING} στον υπολογιστή σας.%n%nΤο Aegisub καλύπτεται από τον άδεια GNU General Public License version 2. Αυτό σημαίνει ότι μπορείτε να χρησιμοποιήσετε την εφαρμογή για κάθε σκοπό χωρίς χρέωση, αλλά δεν υπάρχουν εγγυήσεις καμίας φύσης.%n%nΔείτε την ιστοσελίδα του Aegisub για πληροφορίες σχετικά με την απόκτηση του πηγαίου κώδικα.
eu.WelcomeLabel2=Honek Aegisub {#BUILD_GIT_VERSION_STRING} ezarriko du zure ordenagailuan.%n%nAegisub GNU Baimen Publiko Orokorra 2. bertsioa Baimenak estalia dago. Honek esanahi du aplikazio hau edozein asmotarako erabili dezakezula ordaindu behar izan gabe, baina ez da inolako berme motarik ematen.%n%nIkusi Aegisub webgunea iturburu kodea lortzeko argibideetarako.
id.WelcomeLabel2=Ini akan memasang Aegisub {#BUILD_GIT_VERSION_STRING} di komputer Anda.%n%nAegisub dilindungi oleh Lisensi Publik Umum GNU versi 2. Artinya Anda bisa menggunakan aplikasi ini untuk tujuan apa pun tanpad dipungut biaya, tapi tidak ada jaminan yang bisa diberikan.%n%nLihat laman situs Aegisub untuk memperoleh informasi sumber kode.
pt_PT.WelcomeLabel2=Irá ser instalado no seu computador a versão {#BUILD_GIT_VERSION_STRING} do Aegisub.%n%nO Aegisub está protegido sob a Licença Pública Geral GNU (GPL version 2). O que significa que poderá fazer uso da aplicação para qualquer propósito, sem que seja cobrado, mas não serão dadas quaisquer tipos de garantias.%n%nVeja a página do Aegisub para mais informações sobre como obter o código-fonte.
uk_UA.WelcomeLabel2=Зараз буде встанвлено Aegisub {#BUILD_GIT_VERSION_STRING} на ваш комп'ютер.%n%nAegisub захищено універсальною громадською ліцензією GNU, версія 2. Це означає, що ви можете використосувати цю програму для будь яких цілей безкоштовно, але, в будь-якому випадку, ми не даємо жодних гарантій.%n%nДивіться сайт Aegisub для інформації щодо отримання вихідного коду.
zh_CN.WelcomeLabel2=将会在您的电脑上安装Aegisub {#BUILD_GIT_VERSION_STRING} 。%n%n Aegisub适用于GNU通用公共许可证第二版(GPLv2),这意味着您可以将该应用程序用于任何目的而不需要支付费用,但同时也不会得到任何形式的担保。%n%n您可以到Aegisub官网获取源代码信息。
zh_TW.WelcomeLabel2=將會在您的電腦上安裝Aegisub {#BUILD_GIT_VERSION_STRING} 。%n%n Aegisub適用於GNU通用公共許可證第二版(GPLv2),這意味著您可以將該應用程式用於任何目的而不需要支付費用,但同時也不會得到任何形式的擔保。%n%n您可以到Aegisub官網獲取原始程式碼資訊。

View File

@ -87,6 +87,8 @@ Source: src\mo\wxstd-ru.mo; DestDir: {app}\locale\ru; DestName: wxstd.mo
Source: ..\..\po\sr_RS.mo; DestDir: {app}\locale\sr_RS; DestName: aegisub.mo; Flags: ignoreversion
Source: ..\..\po\sr_RS@latin.mo; DestDir: {app}\locale\sr_RS@latin; DestName: aegisub.mo; Flags: ignoreversion
; Missing wxstd for Serbian
Source: ..\..\po\uk_UA.mo; DestDir: {app}\locale\uk_UA; DestName: aegisub.mo; Flags: ignoreversion
Source: src\mo\wxstd-uk_UA.mo; DestDir: {app}\locale\uk_UA; DestName: wxstd.mo; Flags: ignoreversion
Source: ..\..\po\vi.mo; DestDir: {app}\locale\vi; DestName: aegisub.mo; Flags: ignoreversion
Source: src\mo\wxstd-vi.mo; DestDir: {app}\locale\vi; DestName: wxstd.mo; Flags: ignoreversion
Source: ..\..\po\zh_CN.mo; DestDir: {app}\locale\zh_CN; DestName: aegisub.mo; Flags: ignoreversion

View File

@ -1,8 +1,8 @@
Path=.\Aegisub portable
Title=Aegisub 3.1.0 Portable
Title=Aegisub 3.2.1 Portable
Text
{
<h1 style="font-family: Tahoma; font-size: 20px; text-align: center;">Aegisub 3.1.0 Portable</h1>
<h1 style="font-family: Tahoma; font-size: 20px; text-align: center;">Aegisub 3.2.1 Portable</h1>
<p style="font-family: Tahoma; font-size: 12px;">This archive contains a
"portable" version of Aegisub, suitable for running from USB pen drives or on
machines which you cannot install software on. To reduce the size several

View File

@ -2107,7 +2107,7 @@ msgstr "ينهي التطبيق"
#: ../src/command/app.cpp:182
msgid "&Language..."
msgstr "الل&غة..."
msgstr "الل&غة... (Language)"
#: ../src/command/app.cpp:183
msgid "Language"

View File

@ -2289,7 +2289,7 @@ msgstr "Изход от приложението"
#: ../src/command/app.cpp:159
msgid "&Language..."
msgstr "&Езици"
msgstr "&Езици (Language)"
#: ../src/command/app.cpp:160
msgid "Language"

View File

@ -2050,7 +2050,7 @@ msgstr "Ukončí aplikaci"
#: ../src/command/app.cpp:182
msgid "&Language..."
msgstr "Jazyk..."
msgstr "Jazyk... (Language)"
#: ../src/command/app.cpp:183
msgid "Language"

View File

@ -1137,7 +1137,7 @@ msgstr "Beendet Aegisub"
#: ../src/command/app.cpp:180
msgid "&Language..."
msgstr "&Sprache..."
msgstr "&Sprache... (Language)"
#: ../src/command/app.cpp:181
msgid "Language"

View File

@ -2273,7 +2273,7 @@ msgstr "Έξοδος από την εφαρμογή"
#: ../src/command/app.cpp:160
msgid "&Language..."
msgstr "&Γλώσσα..."
msgstr "&Γλώσσα... (Language)"
#: ../src/command/app.cpp:161
msgid "Language"

View File

@ -2316,7 +2316,7 @@ msgstr "Cierra la aplicación"
#: ../src/command/app.cpp:159
msgid "&Language..."
msgstr "&Idioma..."
msgstr "&Idioma... (Language)"
#: ../src/command/app.cpp:160
msgid "Language"

View File

@ -2253,7 +2253,7 @@ msgstr "Irten aplikaziotik"
#: ../src/command/app.cpp:157
msgid "&Language..."
msgstr "&Hizkuntza..."
msgstr "&Hizkuntza... (Language)"
#: ../src/command/app.cpp:158
msgid "Language"

View File

@ -2413,7 +2413,7 @@ msgstr "Lopettaa ohjelman"
#: ../src/command/app.cpp:159
msgid "&Language..."
msgstr "&Kieli…"
msgstr "&Kieli… (Language)"
#: ../src/command/app.cpp:160
msgid "Language"

View File

@ -2015,7 +2015,7 @@ msgstr "Quitter l'application"
#: ../src/command/app.cpp:182
msgid "&Language..."
msgstr "&Langue..."
msgstr "&Langue... (Language)"
#: ../src/command/app.cpp:183
msgid "Language"

View File

@ -2016,7 +2016,7 @@ msgstr "Saír do programa"
#: ../src/command/app.cpp:182
msgid "&Language..."
msgstr "&Lingua..."
msgstr "&Lingua... (Language)"
#: ../src/command/app.cpp:183
msgid "Language"

View File

@ -2279,7 +2279,7 @@ msgstr "Kilép a programból."
#: ../src/command/app.cpp:159
msgid "&Language..."
msgstr "N&yelv..."
msgstr "N&yelv... (Language)"
#: ../src/command/app.cpp:160
msgid "Language"

View File

@ -2246,7 +2246,7 @@ msgstr "Keluar dari aplikasi"
#: ../src/command/app.cpp:157
msgid "&Language..."
msgstr "&Bahasa..."
msgstr "&Bahasa... (Language)"
#: ../src/command/app.cpp:158
msgid "Language"

View File

@ -2047,7 +2047,7 @@ msgstr "Chiude l'applicazione"
#: ../src/command/app.cpp:182
msgid "&Language..."
msgstr "&Lingua..."
msgstr "&Lingua... (Language)"
#: ../src/command/app.cpp:183
msgid "Language"

View File

@ -2029,7 +2029,7 @@ msgstr "De toepassing afsluiten"
#: ../src/command/app.cpp:182
msgid "&Language..."
msgstr "Taal..."
msgstr "Taal... (Language)"
#: ../src/command/app.cpp:183
msgid "Language"

View File

@ -2247,7 +2247,7 @@ msgstr "Fecha o programa"
#: ../src/command/app.cpp:160
msgid "&Language..."
msgstr "&Idioma..."
msgstr "&Idioma... (Language)"
#: ../src/command/app.cpp:161
msgid "Language"

View File

@ -2000,7 +2000,7 @@ msgstr "Выход из приложения"
#: ../src/command/app.cpp:182
msgid "&Language..."
msgstr "&Язык"
msgstr "&Язык (Language)"
#: ../src/command/app.cpp:183
msgid "Language"

View File

@ -1996,7 +1996,7 @@ msgstr "Изађите из програма."
#: ../src/command/app.cpp:182
msgid "&Language..."
msgstr "&Језик…"
msgstr "&Језик… (Language)"
#: ../src/command/app.cpp:183
msgid "Language"

View File

@ -1996,7 +1996,7 @@ msgstr "Izađite iz programa."
#: ../src/command/app.cpp:182
msgid "&Language..."
msgstr "&Jezik…"
msgstr "&Jezik… (Language)"
#: ../src/command/app.cpp:183
msgid "Language"

6504
po/uk_UA.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2190,7 +2190,7 @@ msgstr "退出程序"
#: ../src/command/app.cpp:157
msgid "&Language..."
msgstr "语言(&L)…"
msgstr "语言(&L)… (Language)"
#: ../src/command/app.cpp:158
msgid "Language"

View File

@ -2196,7 +2196,7 @@ msgstr "退出程式"
#: ../src/command/app.cpp:157
msgid "&Language..."
msgstr "語言(&L)…"
msgstr "語言(&L)… (Language)"
#: ../src/command/app.cpp:158
msgid "Language"

View File

@ -28,6 +28,8 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem/path.hpp>
#include <cassert>
#include <unordered_map>
#include <unordered_set>
AssFile::AssFile() { }
@ -229,56 +231,82 @@ void AssFile::Sort(EntryList<AssDialogue> &lst, CompFunc comp, std::set<AssDialo
}
}
uint32_t AssFile::AddExtradata(std::string const& key, std::string const& value) {
// next_extradata_id must not exist
assert(Extradata.find(next_extradata_id) == Extradata.end());
Extradata[next_extradata_id] = {key, value};
for (auto const& data : Extradata) {
// perform brute-force deduplication by simple key and value comparison
if (key == data.key && value == data.value) {
return data.id;
}
}
Extradata.push_back(ExtradataEntry{next_extradata_id, key, value});
return next_extradata_id++; // return old value, then post-increment
}
std::map<std::string, std::string> AssFile::GetExtradata(std::vector<uint32_t> const& id_list) const {
// If multiple IDs have the same key name, the last ID wins
std::map<std::string, std::string> result;
for (auto id : id_list) {
auto it = Extradata.find(id);
if (it != Extradata.end())
result[it->second.first] = it->second.second;
namespace {
struct extradata_id_cmp {
bool operator()(ExtradataEntry const& e, uint32_t id) {
return e.id < id;
}
bool operator()(uint32_t id, ExtradataEntry const& e) {
return id < e.id;
}
};
template<typename ExtradataType, typename Func>
void enumerate_extradata(ExtradataType&& extradata, std::vector<uint32_t> const& id_list, Func&& f) {
auto begin = extradata.begin(), end = extradata.end();
for (auto id : id_list) {
auto it = lower_bound(begin, end, id, extradata_id_cmp{});
if (it != end) {
f(*it);
begin = it;
}
}
}
template<typename K, typename V>
using reference_map = std::unordered_map<std::reference_wrapper<const K>, V, std::hash<K>, std::equal_to<K>>;
}
std::vector<ExtradataEntry> AssFile::GetExtradata(std::vector<uint32_t> const& id_list) const {
std::vector<ExtradataEntry> result;
enumerate_extradata(Extradata, id_list, [&](ExtradataEntry const& e) {
result.push_back(e);
});
return result;
}
void AssFile::CleanExtradata() {
// Collect all IDs existing in the database
// Then remove all IDs found to be in use from this list
// Remaining is then all garbage IDs
std::vector<uint32_t> ids;
for (auto& it : Extradata)
ids.push_back(it.first);
if (ids.empty()) return;
if (Extradata.empty()) return;
// For each line, find which IDs it actually uses and remove them from the unused-list
std::unordered_set<uint32_t> ids_used;
for (auto& line : Events) {
if (line.ExtradataIds.get().empty()) continue;
// Find the ID for each unique key in the line
std::map<std::string, uint32_t> key_ids;
for (auto id : line.ExtradataIds.get()) {
auto ed_it = Extradata.find(id);
if (ed_it == Extradata.end())
continue;
key_ids[ed_it->second.first] = id;
reference_map<std::string, uint32_t> keys_used;
enumerate_extradata(Extradata, line.ExtradataIds.get(), [&](ExtradataEntry const& e) {
keys_used[e.key] = e.id;
});
for (auto const& used : keys_used)
ids_used.insert(used.second);
// If any keys were duplicated or missing, update the id list
if (keys_used.size() != line.ExtradataIds.get().size()) {
std::vector<uint32_t> ids;
ids.reserve(keys_used.size());
for (auto const& used : keys_used)
ids.push_back(used.second);
std::sort(begin(ids), end(ids));
line.ExtradataIds = std::move(ids);
}
// Update the line's ID list to only contain the actual ID for any duplicate keys
// Also mark found IDs as used in the cleaning list
std::vector<uint32_t> new_ids;
for (auto& keyid : key_ids) {
new_ids.push_back(keyid.second);
ids.erase(remove(begin(ids), end(ids), keyid.second), end(ids));
}
line.ExtradataIds = new_ids;
}
// The ids list should contain only unused IDs now
for (auto id : ids) {
Extradata.erase(id);
if (ids_used.size() != Extradata.size()) {
// Erase all no-longer-used extradata entries
Extradata.erase(std::remove_if(begin(Extradata), end(Extradata), [&](ExtradataEntry const& e) {
return !ids_used.count(e.id);
}), end(Extradata));
}
}

View File

@ -33,6 +33,7 @@
#include <libaegisub/signal.h>
#include <boost/intrusive/list.hpp>
#include <map>
#include <set>
#include <vector>
@ -45,7 +46,11 @@ class wxString;
template<typename T>
using EntryList = typename boost::intrusive::make_list<T, boost::intrusive::constant_time_size<false>, boost::intrusive::base_hook<AssEntryListHook>>::type;
using AegisubExtradataMap = std::map<uint32_t, std::pair<std::string, std::string>>;
struct ExtradataEntry {
uint32_t id;
std::string key;
std::string value;
};
struct AssFileCommit {
wxString const& message;
@ -83,7 +88,7 @@ public:
EntryList<AssStyle> Styles;
EntryList<AssDialogue> Events;
std::vector<AssAttachment> Attachments;
AegisubExtradataMap Extradata;
std::vector<ExtradataEntry> Extradata;
ProjectProperties Properties;
uint32_t next_extradata_id = 0;
@ -127,7 +132,7 @@ public:
/// @return ID of the created entry
uint32_t AddExtradata(std::string const& key, std::string const& value);
/// Fetch all extradata entries from a list of IDs
std::map<std::string, std::string> GetExtradata(std::vector<uint32_t> const& id_list) const;
std::vector<ExtradataEntry> GetExtradata(std::vector<uint32_t> const& id_list) const;
/// Remove unreferenced extradata entries
void CleanExtradata();
@ -199,4 +204,3 @@ public:
/// @param limit If non-empty, only lines in this set are sorted
static void Sort(EntryList<AssDialogue>& lst, CompFunc comp = CompStart, std::set<AssDialogue*> const& limit = std::set<AssDialogue*>());
};

View File

@ -219,7 +219,7 @@ void AssParser::ParseExtradataLine(std::string const &data) {
// ensure next_extradata_id is always at least 1 more than the largest existing id
target->next_extradata_id = std::max(id+1, target->next_extradata_id);
target->Extradata[id] = {key, value};
target->Extradata.push_back(ExtradataEntry{id, std::move(key), std::move(value)});
}
}

View File

@ -239,16 +239,10 @@ namespace Automation4 {
void BackgroundScriptRunner::Run(std::function<void (ProgressSink*)> task)
{
int prio = OPT_GET("Automation/Thread Priority")->GetInt();
if (prio == 0) prio = 50; // normal
else if (prio == 1) prio = 30; // below normal
else if (prio == 2) prio = 10; // lowest
else prio = 50; // fallback normal
impl->Run([&](agi::ProgressSink *ps) {
ProgressSink aps(ps, this);
task(&aps);
}, prio);
});
}
wxWindow *BackgroundScriptRunner::GetParentWindow() const

View File

@ -179,8 +179,8 @@ namespace Automation4 {
// create extradata table
lua_newtable(L);
for (auto const& ed : ass->GetExtradata(dia->ExtradataIds)) {
push_value(L, ed.first);
push_value(L, ed.second);
push_value(L, ed.key);
push_value(L, ed.value);
lua_settable(L, -3);
}
lua_setfield(L, -2, "extra");
@ -309,7 +309,8 @@ namespace Automation4 {
get_string_or_default(L, -2),
get_string_or_default(L, -1)));
});
dia->ExtradataIds = new_ids;
std::sort(begin(new_ids), end(new_ids));
dia->ExtradataIds = std::move(new_ids);
}
else {
error(L, "Found line with unknown class: %s", lclass.c_str());

View File

@ -175,7 +175,7 @@ namespace Automation4 {
luaL_where(L, 1);
lua_insert(L, 1);
lua_concat(L, 2);
lua_error(L);
throw error_tag{};
}
}

View File

@ -54,39 +54,6 @@
#include <wx/scrolbar.h>
#include <wx/sizer.h>
namespace {
#ifdef __WXMSW__
class PaintDC : public wxBufferedDC {
wxPaintDC dc;
public:
PaintDC(wxWindow *window) : dc(window) {
dc.SetLayoutDirection(wxLayout_LeftToRight);
Init(&dc, window->GetClientSize(), 0);
if (window->GetLayoutDirection() == wxLayout_RightToLeft) {
SetLayoutDirection(wxLayout_RightToLeft);
SetLogicalOrigin(GetSize().GetWidth(), 0);
}
}
~PaintDC() {
SetLayoutDirection(wxLayout_LeftToRight);
SetLogicalOrigin(0, 0);
UnMask();
}
void Clear() {
auto origin = GetLogicalOrigin();
SetLogicalOrigin(0, 0);
wxBufferedDC::Clear();
SetLogicalOrigin(origin.x, origin.y);
}
};
#else
typedef wxAutoBufferedPaintDC PaintDC;
#endif
}
enum {
GRID_SCROLLBAR = 1730,
MENU_SHOW_COL = 1250 // Needs 15 IDs after this
@ -319,7 +286,7 @@ void BaseGrid::OnPaint(wxPaintEvent &) {
GetClientSize(&w,&h);
w -= scrollBar->GetSize().GetWidth();
PaintDC dc(this);
wxAutoBufferedPaintDC dc(this);
dc.SetFont(font);
dc.SetBackground(row_colors.Default);

View File

@ -143,7 +143,7 @@ DialogProgress::DialogProgress(wxWindow *parent, wxString const& title_text, wxS
Bind(wxEVT_TIMER, [=](wxTimerEvent&) { gauge->Pulse(); });
}
void DialogProgress::Run(std::function<void(agi::ProgressSink*)> task, int priority) {
void DialogProgress::Run(std::function<void(agi::ProgressSink*)> task) {
DialogProgressSink ps(this);
this->ps = &ps;

View File

@ -64,5 +64,5 @@ public:
DialogProgress(wxWindow *parent, wxString const& title="", wxString const& message="");
/// BackgroundWorker implementation
void Run(std::function<void(agi::ProgressSink *)> task, int priority=-1) override;
void Run(std::function<void(agi::ProgressSink *)> task) override;
};

View File

@ -344,6 +344,9 @@ void DialogShiftTimes::LoadHistory() {
catch (agi::fs::FileSystemError const& e) {
LOG_D("dialog_shift_times/load_history") << "Cannot load shift times history: " << e.GetMessage();
}
catch (json::Exception const& e) {
LOG_D("dialog_shift_times/load_history") << "Cannot load shift times history: " << e.what();
}
catch (...) {
history_box->Thaw();
throw;

View File

@ -94,7 +94,6 @@
"Automation" : {
"Autoreload Mode" : 1,
"Thread Priority" : 1,
"Trace Level" : 3
},

View File

@ -94,7 +94,6 @@
"Automation" : {
"Autoreload Mode" : 1,
"Thread Priority" : 1,
"Trace Level" : 3
},

View File

@ -237,10 +237,10 @@ void MatroskaWrapper::GetSubtitles(agi::fs::path const& filename, AssFile *targe
parser.AddLine(cur);
}
// Load default if it's SRT
else {
else
target->LoadDefault(false, OPT_GET("Subtitle Format/SRT/Default Style Catalog")->GetString());
parser.AddLine("[Events]");
}
parser.AddLine("[Events]");
// Read timecode scale
auto segInfo = mkv_GetFileInfo(file);

View File

@ -324,10 +324,6 @@ void Automation(wxTreebook *book, Preferences *parent) {
wxArrayString tl_choice(6, tl_arr);
p->OptionChoice(general, _("Trace level"), tl_choice, "Automation/Trace Level");
const wxString tp_arr[3] = { _("Normal"), _("Below Normal (recommended)"), _("Lowest") };
wxArrayString tp_choice(3, tp_arr);
p->OptionChoice(general, _("Thread priority"), tp_choice, "Automation/Thread Priority");
const wxString ar_arr[4] = { _("No scripts"), _("Subtitle-local scripts"), _("Global autoload scripts"), _("All scripts") };
wxArrayString ar_choice(4, ar_arr);
p->OptionChoice(general, _("Autoreload on Export"), ar_choice, "Automation/Autoreload Mode");

View File

@ -57,7 +57,7 @@ struct SubsController::UndoInfo {
std::vector<AssStyle> styles;
std::vector<AssDialogueBase> events;
std::vector<AssAttachment> attachments;
AegisubExtradataMap extradata;
std::vector<ExtradataEntry> extradata;
mutable std::vector<int> selection;
int active_line_id = 0;

View File

@ -44,6 +44,7 @@
#include "subtitle_format_microdvd.h"
#include "subtitle_format_mkv.h"
#include "subtitle_format_srt.h"
#include "subtitle_format_ssa.h"
#include "subtitle_format_transtation.h"
#include "subtitle_format_ttxt.h"
#include "subtitle_format_txt.h"
@ -267,6 +268,7 @@ void SubtitleFormat::LoadFormats() {
formats.emplace_back(agi::make_unique<MKVSubtitleFormat>());
formats.emplace_back(agi::make_unique<MicroDVDSubtitleFormat>());
formats.emplace_back(agi::make_unique<SRTSubtitleFormat>());
formats.emplace_back(agi::make_unique<SsaSubtitleFormat>());
formats.emplace_back(agi::make_unique<TTXTSubtitleFormat>());
formats.emplace_back(agi::make_unique<TXTSubtitleFormat>());
formats.emplace_back(agi::make_unique<TranStationSubtitleFormat>());

View File

@ -122,8 +122,8 @@ struct Writer {
file.WriteLineToFile(key + std::to_string(n));
}
void WriteExtradata(AegisubExtradataMap const& extradata) {
if (extradata.size() == 0)
void WriteExtradata(std::vector<ExtradataEntry> const& extradata) {
if (extradata.empty())
return;
group = AssEntryGroup::EXTRADATA;
@ -131,16 +131,16 @@ struct Writer {
file.WriteLineToFile("[Aegisub Extradata]");
for (auto const& edi : extradata) {
std::string line = "Data: ";
line += std::to_string(edi.first);
line += std::to_string(edi.id);
line += ",";
line += inline_string_encode(edi.second.first);
line += inline_string_encode(edi.key);
line += ",";
std::string encoded_data = inline_string_encode(edi.second.second);
if (4*edi.second.second.size() < 3*encoded_data.size()) {
std::string encoded_data = inline_string_encode(edi.value);
if (4*edi.value.size() < 3*encoded_data.size()) {
// the inline_string encoding grew the data by more than uuencoding would
// so base64 encode it instead
line += "u"; // marker for uuencoding
line += agi::ass::UUEncode(edi.second.second, false);
line += agi::ass::UUEncode(edi.value, false);
} else {
line += "e"; // marker for inline_string encoding (escaping)
line += encoded_data;

2
vendor/boost vendored

@ -1 +1 @@
Subproject commit 614aac8fef2a0551610f72e5c4a61085c8c06e35
Subproject commit c038171a340eac748b2d14882f6f79e803d292f4

2
vendor/wxWidgets vendored

@ -1 +1 @@
Subproject commit be35fb7a15e8817ecd898ae9558e222ed63e572b
Subproject commit 7df5d5a901abb0f34e226d2c9acee94c378f634a