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:
Amar Takhar 2009-01-06 10:44:49 +00:00
parent eba8f8fa3c
commit 675c4caa09
6 changed files with 54 additions and 11 deletions

View File

@ -115,7 +115,7 @@ endif
if HAVE_AUTO3_LUA
AUTO3_LUA = auto4_auto3.cpp
aegisub_LDADD += -L$(srcdir)/../auto3 -laegisub-auto3
aegisub_LDADD += -L$(srcdir)/../auto3 -laegisub-auto3-2.1
endif
if HAVE_HUNSPELL

View File

@ -66,10 +66,14 @@ void AegisubLocale::Init(int language) {
if (locale) delete locale;
curCode = language;
locale = new wxLocale(language);
#ifdef __WINDOWS__
locale->AddCatalogLookupPathPrefix(StandardPaths::DecodePath(_T("?data/locale/")));
#endif
locale->AddCatalog(_T("aegisub"));
#else
locale->AddCatalog(_T(GETTEXT_PACKAGE));
#endif
locale->AddCatalog(_T("wxstd"));
setlocale(LC_NUMERIC, "C");
setlocale(LC_CTYPE, "C");

View File

@ -64,7 +64,12 @@ StandardPaths::StandardPaths() {
// Get paths
wxString dataDir = paths.GetDataDir();
#ifdef __WINDOWS__
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();
// Set paths

View File

@ -3,8 +3,8 @@ if HAVE_AUTO3_LUA
AM_CFLAGS = -DAUTO3LIB @LUA50_CFLAGS@
AM_LDFLAGS = @LUA50_LDFLAGS@
lib_LTLIBRARIES = libaegisub-auto3.la
libaegisub_auto3_la_SOURCES = auto3.c
lib_LTLIBRARIES = libaegisub-auto3-2.1.la
libaegisub_auto3_2_1_la_SOURCES = auto3.c
noinst_HEADERS = auto3.h
endif

View File

@ -1,5 +1,5 @@
automationdir = $(aegisubdatadir)/automation
share_docdir = $(docdir)
share_docdir = $(aegisubdocdir)
# share/
data_general= \

View File

@ -7,7 +7,7 @@ m4_define([aegisub_version_major], [2])
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])
###################
# Required packages
@ -83,18 +83,51 @@ AC_C_BIGENDIAN(
########################
# Configurable variables
########################
aegisubdatadir="$datadir/aegisub"
AC_SUBST(aegisubdatadir)
m4_define([aegisub_version_major], [2])
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
prefix="$ac_default_prefix"
fi
# Install prefix used by wxStandardPaths::SetInstallPrefix.
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_MSG_CHECKING([whether BUILD_CREDIT has been set])
if test "$use_build_credit" = "yes"; then
if test "$with_build_credit" = "yes" || test -z "$with_build_credit"; then
@ -949,10 +982,11 @@ fi
AC_PROG_INTLTOOL
AM_GLIB_GNU_GETTEXT
GETTEXT_PACKAGE=aegisub
GETTEXT_PACKAGE="aegisub${AEGISUB_VERSION_MAJOR}${AEGISUB_VERSION_MINOR}"
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The prefix for our gettext translation domains.])
[The basename for our gettext translation domains.])
####################################################################