Add multiple version support, everything is now suffixed with MAJOR.MINOR, this
will allow users on unix to install and operate different versions of aegisub a$ the same time. Note: auto3 linking is broken it will be fixed in the next commit as it's unrelated to these changes. Originally committed to SVN as r2659.
This commit is contained in:
parent
eba8f8fa3c
commit
675c4caa09
6 changed files with 54 additions and 11 deletions
|
@ -115,7 +115,7 @@ endif
|
||||||
|
|
||||||
if HAVE_AUTO3_LUA
|
if HAVE_AUTO3_LUA
|
||||||
AUTO3_LUA = auto4_auto3.cpp
|
AUTO3_LUA = auto4_auto3.cpp
|
||||||
aegisub_LDADD += -L$(srcdir)/../auto3 -laegisub-auto3
|
aegisub_LDADD += -L$(srcdir)/../auto3 -laegisub-auto3-2.1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if HAVE_HUNSPELL
|
if HAVE_HUNSPELL
|
||||||
|
|
|
@ -66,10 +66,14 @@ void AegisubLocale::Init(int language) {
|
||||||
if (locale) delete locale;
|
if (locale) delete locale;
|
||||||
curCode = language;
|
curCode = language;
|
||||||
locale = new wxLocale(language);
|
locale = new wxLocale(language);
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
locale->AddCatalogLookupPathPrefix(StandardPaths::DecodePath(_T("?data/locale/")));
|
locale->AddCatalogLookupPathPrefix(StandardPaths::DecodePath(_T("?data/locale/")));
|
||||||
#endif
|
|
||||||
locale->AddCatalog(_T("aegisub"));
|
locale->AddCatalog(_T("aegisub"));
|
||||||
|
#else
|
||||||
|
locale->AddCatalog(_T(GETTEXT_PACKAGE));
|
||||||
|
#endif
|
||||||
|
|
||||||
locale->AddCatalog(_T("wxstd"));
|
locale->AddCatalog(_T("wxstd"));
|
||||||
setlocale(LC_NUMERIC, "C");
|
setlocale(LC_NUMERIC, "C");
|
||||||
setlocale(LC_CTYPE, "C");
|
setlocale(LC_CTYPE, "C");
|
||||||
|
|
|
@ -64,7 +64,12 @@ StandardPaths::StandardPaths() {
|
||||||
|
|
||||||
// Get paths
|
// Get paths
|
||||||
wxString dataDir = paths.GetDataDir();
|
wxString dataDir = paths.GetDataDir();
|
||||||
|
#ifdef __WINDOWS__
|
||||||
wxString userDir = paths.GetUserDataDir();
|
wxString userDir = paths.GetUserDataDir();
|
||||||
|
#else
|
||||||
|
wxString userDir = paths.GetUserDataDir() + _T("-") + _T(AEGISUB_VERSION_DATA);
|
||||||
|
// wxString userDir = wxString::Format(_T("%s-%s"), paths.GetUserDataDir(), AEGISUB_VERSION_DATA);
|
||||||
|
#endif
|
||||||
wxString tempDir = paths.GetTempDir();
|
wxString tempDir = paths.GetTempDir();
|
||||||
|
|
||||||
// Set paths
|
// Set paths
|
||||||
|
|
|
@ -3,8 +3,8 @@ if HAVE_AUTO3_LUA
|
||||||
AM_CFLAGS = -DAUTO3LIB @LUA50_CFLAGS@
|
AM_CFLAGS = -DAUTO3LIB @LUA50_CFLAGS@
|
||||||
AM_LDFLAGS = @LUA50_LDFLAGS@
|
AM_LDFLAGS = @LUA50_LDFLAGS@
|
||||||
|
|
||||||
lib_LTLIBRARIES = libaegisub-auto3.la
|
lib_LTLIBRARIES = libaegisub-auto3-2.1.la
|
||||||
libaegisub_auto3_la_SOURCES = auto3.c
|
libaegisub_auto3_2_1_la_SOURCES = auto3.c
|
||||||
noinst_HEADERS = auto3.h
|
noinst_HEADERS = auto3.h
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
automationdir = $(aegisubdatadir)/automation
|
automationdir = $(aegisubdatadir)/automation
|
||||||
share_docdir = $(docdir)
|
share_docdir = $(aegisubdocdir)
|
||||||
|
|
||||||
# share/
|
# share/
|
||||||
data_general= \
|
data_general= \
|
||||||
|
|
46
configure.in
46
configure.in
|
@ -7,7 +7,7 @@ m4_define([aegisub_version_major], [2])
|
||||||
m4_define([aegisub_version_minor], [1])
|
m4_define([aegisub_version_minor], [1])
|
||||||
m4_define([aegisub_version_revision], [6])
|
m4_define([aegisub_version_revision], [6])
|
||||||
m4_define([aegisub_version], [aegisub_version_major.aegisub_version_minor.aegisub_version_revision-dev])
|
m4_define([aegisub_version], [aegisub_version_major.aegisub_version_minor.aegisub_version_revision-dev])
|
||||||
|
m4_define([aegisub_version_data], [aegisub_version_major.aegisub_version_minor])
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# Required packages
|
# Required packages
|
||||||
|
@ -83,18 +83,51 @@ AC_C_BIGENDIAN(
|
||||||
########################
|
########################
|
||||||
# Configurable variables
|
# Configurable variables
|
||||||
########################
|
########################
|
||||||
aegisubdatadir="$datadir/aegisub"
|
m4_define([aegisub_version_major], [2])
|
||||||
AC_SUBST(aegisubdatadir)
|
m4_define([aegisub_version_minor], [1])
|
||||||
|
m4_define([aegisub_version_revision], [6])
|
||||||
|
m4_define([aegisub_version], [aegisub_version_major.aegisub_version_minor.aegisub_version_revision-dev])
|
||||||
|
m4_define([aegisub_version_data], [aegisub_version_major.aegisub_version_minor])
|
||||||
|
|
||||||
|
AEGISUB_VERSION_MAJOR=aegisub_version_major
|
||||||
|
AEGISUB_VERSION_MINOR=aegisub_version_minor
|
||||||
|
AEGISUB_VERSION=aegisub_version
|
||||||
|
AEGISUB_VERSION_DATA=aegisub_version_data
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED(AEGISUB_VERSION_DATA, ["$AEGISUB_VERSION_DATA"], [Data path suffix.])
|
||||||
|
|
||||||
|
|
||||||
|
aegisubdatadir="$datadir/$PACKAGE/aegisub_version_data"
|
||||||
|
aegisubdocdir="$datadir/doc/$PACKAGE/aegisub_version_data"
|
||||||
|
AEGISUB_COMMAND="aegisub-aegisub_version_data"
|
||||||
|
|
||||||
|
AC_SUBST(aegisubdatadir)
|
||||||
|
AC_SUBST(aegisubdocdir)
|
||||||
|
AC_SUBST(AEGISUB_COMMAND)
|
||||||
|
|
||||||
|
|
||||||
|
AC_ARG_WITH(desktop-dir, [ --with-desktop-dir=PATH desktop file locations (default: PREFIX/share)])
|
||||||
|
if test -z "$with_desktop_dir" ; then
|
||||||
|
DESKTOP_DATADIR=$with_desktop_dir
|
||||||
|
else
|
||||||
|
DESKTOP_DATADIR="$datadir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(DESKTOP_DATADIR, test "$with_desktop_dir" != "no")
|
||||||
|
AC_SUBST(DESKTOP_DATADIR)
|
||||||
|
|
||||||
|
|
||||||
|
# If a user doesn't supply --prefix then it is set to NONE so we
|
||||||
|
# set it to $ac_default_prefix if it hasn't been supplied.
|
||||||
if test "$prefix" = "NONE"; then
|
if test "$prefix" = "NONE"; then
|
||||||
prefix="$ac_default_prefix"
|
prefix="$ac_default_prefix"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Install prefix used by wxStandardPaths::SetInstallPrefix.
|
# Install prefix used by wxStandardPaths::SetInstallPrefix.
|
||||||
AC_DEFINE_UNQUOTED([INSTALL_PREFIX], ["$prefix"], [Default install prefix, or --prefix.])
|
AC_DEFINE_UNQUOTED([INSTALL_PREFIX], ["$prefix"], [Default install prefix, or --prefix.])
|
||||||
|
|
||||||
AC_ARG_WITH(build-credit, [ --with-build-credit=NAME Build credit shown in the program title.], [use_build_credit="yes"])
|
AC_ARG_WITH(build-credit, [ --with-build-credit=NAME Build credit shown in the program title.], [use_build_credit="yes"])
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether BUILD_CREDIT has been set])
|
AC_MSG_CHECKING([whether BUILD_CREDIT has been set])
|
||||||
if test "$use_build_credit" = "yes"; then
|
if test "$use_build_credit" = "yes"; then
|
||||||
if test "$with_build_credit" = "yes" || test -z "$with_build_credit"; then
|
if test "$with_build_credit" = "yes" || test -z "$with_build_credit"; then
|
||||||
|
@ -949,10 +982,11 @@ fi
|
||||||
AC_PROG_INTLTOOL
|
AC_PROG_INTLTOOL
|
||||||
AM_GLIB_GNU_GETTEXT
|
AM_GLIB_GNU_GETTEXT
|
||||||
|
|
||||||
GETTEXT_PACKAGE=aegisub
|
GETTEXT_PACKAGE="aegisub${AEGISUB_VERSION_MAJOR}${AEGISUB_VERSION_MINOR}"
|
||||||
|
|
||||||
AC_SUBST(GETTEXT_PACKAGE)
|
AC_SUBST(GETTEXT_PACKAGE)
|
||||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
||||||
[The prefix for our gettext translation domains.])
|
[The basename for our gettext translation domains.])
|
||||||
|
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
|
|
Loading…
Reference in a new issue