Revamp how version tagging works

Rather than having it be a configurable option, simply build in final
release mode if Aegisub is being built from a signed tag, and get the
version information from that tag.

Drop the version number from the OS X app bundle when not building from
a tag as it done everywhere else. Drop the arch suffix since ppc hasn't
been tested in years and isn't worth testing as it's only going to get
less relevant as time goes on.

Remove some redundant definitions in the build system.
This commit is contained in:
Thomas Goyne 2012-08-19 14:33:50 -07:00
parent 42a016a83b
commit 1e030289ad
18 changed files with 55 additions and 138 deletions

1
.gitignore vendored
View File

@ -48,6 +48,7 @@ aegisub/conf.sh
aegisub/desktop/aegisub.desktop aegisub/desktop/aegisub.desktop
aegisub/libaegisub/libaegisub-3.0.so.3 aegisub/libaegisub/libaegisub-3.0.so.3
aegisub/reporter/reporter-3.0 aegisub/reporter/reporter-3.0
aegisub/src/aegisub
aegisub/src/aegisub-3.0 aegisub/src/aegisub-3.0
aegisub/src/libresrc/bitmap.cpp aegisub/src/libresrc/bitmap.cpp
aegisub/src/libresrc/bitmap.h aegisub/src/libresrc/bitmap.h

View File

@ -14,10 +14,10 @@ all: ;
ifeq (yes, $(BUILD_DARWIN)) ifeq (yes, $(BUILD_DARWIN))
osx-bundle: osx-bundle:
$(BIN_SHELL) tools/osx-bundle.sh "$(BUNDLE_STRING)" $(AEGISUB_VERSION_DATA) "$(BIN_WX_CONFIG)" DICT_DIR=$(DICT_DIR) $(BIN_SHELL) tools/osx-bundle.sh "$(AEGISUB_COMMAND)" "$(BIN_WX_CONFIG)" DICT_DIR=$(DICT_DIR)
osx-dmg: osx-bundle osx-dmg: osx-bundle
$(BIN_SHELL) tools/osx-dmg.sh "$(BUNDLE_STRING)" "$(DMG_STRING)" $(BIN_SHELL) tools/osx-dmg.sh "$(BUILD_VERSION_STRING)"
osx-tinderbox-bundle: osx-tinderbox-bundle:
$(BIN_SHELL) tools/osx-bundle.sh "$(T_BUNDLE)" $(AEGISUB_VERSION_DATA) "$(BIN_WX_CONFIG)" DICT_DIR="$(DICT_DIR)" $(BIN_SHELL) tools/osx-bundle.sh "$(T_BUNDLE)" $(AEGISUB_VERSION_DATA) "$(BIN_WX_CONFIG)" DICT_DIR="$(DICT_DIR)"

View File

@ -11,7 +11,6 @@ HAVE_FFMS2 = @with_ffms2@
HAVE_LIBPULSE = @with_libpulse@ HAVE_LIBPULSE = @with_libpulse@
HAVE_LIBASS = @with_libass@ HAVE_LIBASS = @with_libass@
################### ###################
# PLATFORM SETTINGS # PLATFORM SETTINGS
################### ###################
@ -20,7 +19,6 @@ BUILD_DARWIN = @build_darwin@
BUILD_DEFAULT = @build_default@ BUILD_DEFAULT = @build_default@
BUILD_LINUX = @build_linux@ BUILD_LINUX = @build_linux@
####### #######
# FLAGS # FLAGS
####### #######
@ -34,22 +32,14 @@ CCACHE_ENV = CCACHE_SLOPPINESS=time_macros
LIB_SHARED_LINK = -shared -Wl,-soname -Wl,$(LIB_SHARED_FULL) 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.5 -install_name ${CURDIR}/$(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.5 -install_name ${CURDIR}/$(LIB_SHARED_FULL)
######### #########
# STRINGS # STRINGS
######### #########
AEGISUB_COMMAND = @AEGISUB_COMMAND@ AEGISUB_COMMAND = @AEGISUB_COMMAND@
AEGISUB_VERSION_DATA = @AEGISUB_VERSION_DATA@
BUILD_DATE = @BUILD_DATE@ BUILD_DATE = @BUILD_DATE@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = aegisub-@BUILD_GIT_VERSION_STRING@
PACKAGE_DEBUG = @PACKAGE_DEBUG@ PACKAGE_DEBUG = @PACKAGE_DEBUG@
BUILD_VERSION_STRING = @BUILD_GIT_VERSION_STRING@ BUILD_VERSION_STRING = @BUILD_GIT_VERSION_STRING@
# OS X
BUNDLE_STRING = @BUNDLE_STRING@
DARWIN_ARCH = @DARWIN_ARCH@
DMG_STRING = @DMG_STRING@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
####### #######
# PATHS # PATHS
@ -74,7 +64,6 @@ P_ICON = @P_ICON@
P_DATA = $(P_DATAROOT)/aegisub/ P_DATA = $(P_DATAROOT)/aegisub/
P_DOC = $(P_DATAROOT)/doc/aegisub/ P_DOC = $(P_DATAROOT)/doc/aegisub/
############### ###############
# LIBRARY FLAGS # LIBRARY FLAGS
############### ###############
@ -129,7 +118,6 @@ LIBS_GCOV = @GCOV_LIBS@
CFLAGS_EFENCE = @EFENCE_CFLAGS@ CFLAGS_EFENCE = @EFENCE_CFLAGS@
CFLAGS_GCOV = @GCOV_CFLAGS@ CFLAGS_GCOV = @GCOV_CFLAGS@
########## ##########
# BINARIES # BINARIES
########## ##########

View File

@ -64,7 +64,7 @@ endif
# INSTALL # INSTALL
######### #########
ifeq (install, $(MAKECMDGOALS)) ifeq (install, $(MAKECMDGOALS))
INSTALL_LIB = $(addprefix $(P_LIB)/, $(LIB_SHARED) $(LIB_SHARED_FULL)) INSTALL_LIB=$(addprefix $(P_LIB)/, $(LIB_SHARED) $(LIB_SHARED_FULL))
endif endif
BIN_SINSTALL=$(BIN_INSTALL) BIN_SINSTALL=$(BIN_INSTALL)
@ -103,8 +103,6 @@ ifdef DATA_SHARE_DOC
done done
endif endif
############## ##############
# DISTRIBUTION # DISTRIBUTION
############## ##############
@ -189,7 +187,5 @@ $(PRECOMPILED_HEADER_NAME).gch: $(PRECOMPILED_HEADER_NAME)
$(CXX_ENV) $(BIN_CXX) $(CPPFLAGS) $(CXXFLAGS) -x c++-header $< $(CXX_ENV) $(BIN_CXX) $(CPPFLAGS) $(CXXFLAGS) -x c++-header $<
-include ($DEP) -include ($DEP)
.SUFFIXES: .SUFFIXES:

View File

@ -6,6 +6,6 @@
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\libaegisub\include&quot;" AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\..\libaegisub\include&quot;"
/> />
</VisualStudioPropertySheet> </VisualStudioPropertySheet>

View File

@ -6,6 +6,6 @@
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
CommandLine="if not exist &quot;..\..\src\config\config_windows.h&quot; (copy &quot;..\..\src\config\config_windows0.h&quot; &quot;..\..\src\config\config_windows.h&quot;)&#x0D;&#x0A;SubWCRev.exe &quot;..\..\src&quot; &quot;..\svn-revision-base.h&quot; &quot;..\svn-revision.h&quot;&#x0D;&#x0A;" CommandLine="if not exist &quot;..\..\src\config\config_windows.h&quot; (copy &quot;..\..\src\config\config_windows0.h&quot; &quot;..\..\src\config\config_windows.h&quot;)&#x0D;&#x0A;..\version.bat&#x0D;&#x0A;"
/> />
</VisualStudioPropertySheet> </VisualStudioPropertySheet>

View File

@ -1,5 +1,5 @@
cd %~dp0.. cd %~dp0..
sh build/version.sh . sh build/version.sh ..
if %ERRORLEVEL% NEQ 0 goto :fail if %ERRORLEVEL% NEQ 0 goto :fail
goto :eof goto :eof

View File

@ -24,16 +24,24 @@ fi
last_svn_revision=6962 last_svn_revision=6962
last_svn_hash="2289c084f28d9923989e1b58b81332347130ea78" last_svn_hash="2289c084f28d9923989e1b58b81332347130ea78"
git_branch="$(git symbolic-ref HEAD 2> /dev/null)" || git_branch="(unnamed branch)"
git_branch="${git_branch##refs/heads/}"
git_revision=$(expr $last_svn_revision + $(git log --pretty=oneline $last_svn_hash..HEAD 2>/dev/null | wc -l)) git_revision=$(expr $last_svn_revision + $(git log --pretty=oneline $last_svn_hash..HEAD 2>/dev/null | wc -l))
git_hash=$(git rev-parse --short HEAD) git_version_str=$(git describe --exact-match 2> /dev/null)
if test x$git_version_str != x; then
git_version_str="${git_version_str##v}"
tagged_release=1
else
git_branch="$(git symbolic-ref HEAD 2> /dev/null)" || git_branch="(unnamed branch)"
git_branch="${git_branch##refs/heads/}"
git_hash=$(git rev-parse --short HEAD)
git_version_str="${git_revision}-${git_branch}-${git_hash}" git_version_str="${git_revision}-${git_branch}-${git_hash}"
tagged_release=0
fi
new_version_h="\ new_version_h="\
#define BUILD_GIT_VERSION_NUMBER ${git_revision} #define BUILD_GIT_VERSION_NUMBER ${git_revision}
#define BUILD_GIT_VERSION_STRING \"${git_version_str}\"" #define BUILD_GIT_VERSION_STRING \"${git_version_str}\"
#define TAGGED_RELEASE ${tagged_release}"
# may not exist yet for out of tree builds # may not exist yet for out of tree builds
mkdir -p build mkdir -p build

View File

@ -1,18 +1,5 @@
AC_PREREQ(2.57) AC_PREREQ(2.57)
######################
# aegisub version info
######################
# MAKE SURE YOU UPDATE THE VERSION INFO BELOW WHEN YOU SET THIS TO '1'
m4_define([aegisub_FINAL_RELEASE], [0])
m4_define([aegisub_version_major], [3])
m4_define([aegisub_version_minor], [0])
m4_define([aegisub_version_revision], [0])
m4_define([aegisub_version], [aegisub_version_major.aegisub_version_minor.aegisub_version_revision])
m4_define([aegisub_version_data], [aegisub_version_major.aegisub_version_minor])
################### ###################
# Required packages # Required packages
################### ###################
@ -49,13 +36,7 @@ build_bsd="no"
build_default="no" build_default="no"
AS_CASE([$host], AS_CASE([$host],
[ppc-*-* | powerpc-*], [arch_ppc="yes"; arch_bundle="ppc"; DARWIN_ARCH="ppc"], [*-*-darwin*], [build_darwin="yes"],
[i*86-*-*], [arch_x86="yes"; arch_bundle="intel"; DARWIN_ARCH="intel"],
[x86_64-*-*], [arch_x86="yes"; arch_x86_64="yes"; DARWIN_ARCH="intel"],
[])
AS_CASE([$host],
[*-*-darwin*], [build_darwin="yes"; AC_SUBST(DARWIN_ARCH)],
[*-*-linux*], [build_linux="yes"], [*-*-linux*], [build_linux="yes"],
[*-*-*bsd*], [build_bsd="yes"], [*-*-*bsd*], [build_bsd="yes"],
[build_default="yes"]) [build_default="yes"])
@ -79,20 +60,13 @@ AC_C_BIGENDIAN(
######################## ########################
# Configurable variables # Configurable variables
######################## ########################
# These cannot be set before AC_INIT()
AEGISUB_VERSION_MAJOR=aegisub_version_major
AEGISUB_VERSION_MINOR=aegisub_version_minor
AEGISUB_VERSION=aegisub_version
# Used for gettext.
AEGISUB_VERSION_DATA=aegisub_version_data
# Suffix used for data paths.
AC_DEFINE_UNQUOTED(AEGISUB_VERSION_DATA, ["$AEGISUB_VERSION_DATA"], [Data path suffix.])
AC_SUBST(AEGISUB_VERSION_DATA)
# Name of aegisub binary. # Name of aegisub binary.
AEGISUB_COMMAND="aegisub-$AEGISUB_VERSION_MAJOR.$AEGISUB_VERSION_MINOR" # 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.0"])
AC_SUBST(AEGISUB_COMMAND) AC_SUBST(AEGISUB_COMMAND)
AC_DEFINE_UNQUOTED([AEGISUB_COMMAND], ["${AEGISUB_COMMAND}"], [Name of the Aegisub executable])
# Handle location of desktop files: http://freedesktop.org/wiki/Specifications/desktop-entry-spec # Handle location of desktop files: http://freedesktop.org/wiki/Specifications/desktop-entry-spec
AC_ARG_WITH(desktop-dir, AC_ARG_WITH(desktop-dir,
@ -108,7 +82,6 @@ AC_ARG_WITH(icon-dir,
P_ICON=${with_icon_dir:-$datarootdir/icons} P_ICON=${with_icon_dir:-$datarootdir/icons}
AC_SUBST(P_ICON) AC_SUBST(P_ICON)
# Install prefix # Install prefix
# If a user doesn't supply --prefix then it is set to NONE so we # 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. # set it to $ac_default_prefix if it hasn't been supplied.
@ -146,7 +119,6 @@ AC_PROG_INSTALL
AC_PROG_RANLIB AC_PROG_RANLIB
PKG_PROG_PKG_CONFIG([pkgconfig_required_version]) PKG_PROG_PKG_CONFIG([pkgconfig_required_version])
################# #################
# Developers only # Developers only
################# #################
@ -154,27 +126,10 @@ AC_MSG_CHECKING([for version])
. $srcdir/build/version.sh "$srcdir/.." . $srcdir/build/version.sh "$srcdir/.."
AC_MSG_RESULT([$BUILD_GIT_VERSION_STRING $VERSION_SOURCE]) AC_MSG_RESULT([$BUILD_GIT_VERSION_STRING $VERSION_SOURCE])
# Release information.
AS_IF([test "aegisub_FINAL_RELEASE" = "1"], [
AC_DEFINE([FINAL_RELEASE], [aegisub_FINAL_RELEASE], [This is only set to 1 for a RELEASE VERSION.])
BUNDLE_STRING="${PACKAGE_NAME}"
DMG_STRING="${PACKAGE_NAME}-${PACKAGE_VERSION}-${arch_bundle}"
], [
PACKAGE_STRING="${PACKAGE_STRING}-dev-r${BUILD_GIT_VERSION_NUMBER}"
PACKAGE_VERSION="${PACKAGE_VERSION}-dev-r${BUILD_GIT_VERSION_NUMBER}"
VERSION="${VERSION}-dev-r${BUILD_GIT_VERSION_NUMBER}"
BUNDLE_STRING="${PACKAGE_NAME}-${PACKAGE_VERSION}"
DMG_STRING="${PACKAGE_NAME}-${PACKAGE_VERSION}-${arch_bundle}"
])
PACKAGE_TARNAME="${PACKAGE_TARNAME}-${PACKAGE_VERSION}"
AC_MSG_CHECKING([for build date]) AC_MSG_CHECKING([for build date])
BUILD_DATE=`date "+%Y-%m-%d %H:%M %Z"` BUILD_DATE=`date "+%Y-%m-%d %H:%M %Z"`
AC_MSG_RESULT($BUILD_DATE) AC_MSG_RESULT($BUILD_DATE)
AC_SUBST(BUNDLE_STRING)
AC_SUBST(DMG_STRING)
AC_SUBST([BUILD_GIT_VERSION_STRING]) AC_SUBST([BUILD_GIT_VERSION_STRING])
AC_SUBST([BUILD_DATE]) AC_SUBST([BUILD_DATE])
@ -603,14 +558,6 @@ AC_SUBST(enable_ccache)
############################## ##############################
AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT([external])
AS_IF([test x$build_darwin = xyes],
[GETTEXT_PACKAGE="aegisub"],
[GETTEXT_PACKAGE="aegisub${AEGISUB_VERSION_MAJOR}${AEGISUB_VERSION_MINOR}"])
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The basename for our gettext translation domains.])
################ ################
# Update checker # Update checker
################ ################

View File

@ -63,10 +63,7 @@ std::string Path::Locale() {
} }
std::string Path::Config() { std::string Path::Config() {
std::string tmp(home()); return home() + "/.aegisub/";
tmp.append("/.aegisub-");
tmp.append(AEGISUB_VERSION_DATA);
return tmp.append("/");
} }
std::string Path::Temp() { std::string Path::Temp() {

View File

@ -38,8 +38,8 @@ all: $(MO)
install: install:
@$(BIN_MKDIR) -p $(addsuffix /LC_MESSAGES/, $(addprefix $(DESTDIR)$(P_LOCALE)/, $(basename $(PO)))) @$(BIN_MKDIR) -p $(addsuffix /LC_MESSAGES/, $(addprefix $(DESTDIR)$(P_LOCALE)/, $(basename $(PO))))
@for i in $(basename $(PO)); do \ @for i in $(basename $(PO)); do \
echo $(BIN_INSTALL) $$i.mo $(DESTDIR)$(P_LOCALE)/$$i/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ echo $(BIN_INSTALL) $$i.mo $(DESTDIR)$(P_LOCALE)/$$i/LC_MESSAGES/$(AEGISUB_COMMAND).mo; \
$(BIN_INSTALL) $$i.mo $(DESTDIR)$(P_LOCALE)/$$i/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ $(BIN_INSTALL) $$i.mo $(DESTDIR)$(P_LOCALE)/$$i/LC_MESSAGES/$(AEGISUB_COMMAND).mo; \
done done

View File

@ -34,9 +34,9 @@ std::string config_path() {
wxStandardPathsBase &paths = wxStandardPaths::Get(); wxStandardPathsBase &paths = wxStandardPaths::Get();
#if defined(__APPLE__) #if defined(__APPLE__)
return std::string((wxString::Format("%s-%s/", paths.GetUserDataDir(), _T(AEGISUB_VERSION_DATA)))); return paths.GetUserDataDir().utf8_str().data();
#elif defined(__UNIX__) #elif defined(__UNIX__)
return std::string(wxString::Format("%s/.aegisub-%s/", paths.GetUserConfigDir(), _T(AEGISUB_VERSION_DATA))); return std::string(wxString::Format("%s/.aegisub/", paths.GetUserConfigDir()));
#else #else
return std::string(wxString::Format("%s/Aegisub/", paths.GetUserConfigDir())); return std::string(wxString::Format("%s/Aegisub/", paths.GetUserConfigDir()));
#endif #endif

View File

@ -1,6 +1,6 @@
include ../Makefile.inc include ../Makefile.inc
PROGRAM = aegisub-3.0 PROGRAM = $(AEGISUB_COMMAND)
PROGRAM_INSTALL = yes PROGRAM_INSTALL = yes
PRECOMPILED_HEADER_NAME=agi_pre.h PRECOMPILED_HEADER_NAME=agi_pre.h

View File

@ -65,7 +65,7 @@ void AegisubLocale::Init(int language) {
locale->AddCatalogLookupPathPrefix(StandardPaths::DecodePath("?data/locale/")); locale->AddCatalogLookupPathPrefix(StandardPaths::DecodePath("?data/locale/"));
locale->AddCatalog("aegisub"); locale->AddCatalog("aegisub");
#else #else
locale->AddCatalog(GETTEXT_PACKAGE); locale->AddCatalog(AEGISUB_COMMAND);
#endif #endif
locale->AddCatalog("wxstd"); locale->AddCatalog("wxstd");
@ -170,7 +170,7 @@ wxArrayInt AegisubLocale::GetAvailableLanguages() {
// If the locale file doesn't exist then don't list it as an option. // If the locale file doesn't exist then don't list it as an option.
wxString locDir = wxStandardPaths::Get().GetLocalizedResourcesDir(langs[i], wxStandardPathsBase::ResourceCat_Messages); wxString locDir = wxStandardPaths::Get().GetLocalizedResourcesDir(langs[i], wxStandardPathsBase::ResourceCat_Messages);
wxFileName file(wxString::Format("%s/%s.mo", locDir, GETTEXT_PACKAGE)); wxFileName file(wxString::Format("%s/%s.mo", locDir, AEGISUB_COMMAND));
if (lang && file.FileExists()) final.Add(lang->Language); if (lang && file.FileExists()) final.Add(lang->Language);
} }
#endif #endif

View File

@ -103,12 +103,6 @@
#define WITH_HUNSPELL #define WITH_HUNSPELL
// Enable "final release" mode
// Displays different versions numbers in About box and title bar, and omits detailed version information from
// the title bar. Only core developers should enable then, and only when making builds for mass consumption.
//#define FINAL_RELEASE
// Use FFTW instead of shipped FFT code // Use FFTW instead of shipped FFT code
// FFTW <http://fftw.org/> is a very fast library for computing the discrete fourier transform, but is a bit // FFTW <http://fftw.org/> is a very fast library for computing the discrete fourier transform, but is a bit
// tricky to get working on Windows, and has the additional problem of being GPL licensed. // tricky to get working on Windows, and has the additional problem of being GPL licensed.

View File

@ -39,34 +39,24 @@
#include "version.h" #include "version.h"
#include "git_version.h" #include "git_version.h"
// Define FINAL_RELEASE to mark a build as a "final" version, ie. not pre-release version #ifdef _DEBUG
// In that case it won't include the SVN revision information #define DEBUG_SUFFIX " [DEBUG VERSION]"
#ifdef FINAL_RELEASE
#define VERSION_NUMBER "3.0.0"
#define BUILD_CREDIT_SUFFIX ""
#define DEBUG_SUFFIX ""
#else #else
#define VERSION_NUMBER BUILD_GIT_VERSION_STRING #define DEBUG_SUFFIX ""
#endif
#ifdef _DEBUG #if defined(BUILD_CREDIT) && !TAGGED_RELEASE
#define DEBUG_SUFFIX " [DEBUG VERSION]" #define BUILD_CREDIT_SUFFIX ", " BUILD_CREDIT
#else #else
#define DEBUG_SUFFIX "" #define BUILD_CREDIT_SUFFIX ""
#endif
#ifdef BUILD_CREDIT
#define BUILD_CREDIT_SUFFIX ", " BUILD_CREDIT
#else
#define BUILD_CREDIT_SUFFIX ""
#endif
#endif #endif
const char *GetAegisubLongVersionString() { const char *GetAegisubLongVersionString() {
return VERSION_NUMBER BUILD_CREDIT_SUFFIX DEBUG_SUFFIX; return BUILD_GIT_VERSION_STRING BUILD_CREDIT_SUFFIX DEBUG_SUFFIX;
} }
const char *GetAegisubShortVersionString() { const char *GetAegisubShortVersionString() {
return VERSION_NUMBER DEBUG_SUFFIX; return BUILD_GIT_VERSION_STRING DEBUG_SUFFIX;
} }
const char *GetAegisubBuildTime() { const char *GetAegisubBuildTime() {
@ -82,15 +72,11 @@ const char *GetAegisubBuildCredit() {
} }
bool GetIsOfficialRelease() { bool GetIsOfficialRelease() {
#ifdef FINAL_RELEASE
return true;
#else
return false; return false;
#endif
} }
const char *GetVersionNumber() { const char *GetVersionNumber() {
return VERSION_NUMBER; return BUILD_GIT_VERSION_STRING;
} }
int GetSVNRevision() { int GetSVNRevision() {

View File

@ -2,12 +2,12 @@
set -e set -e
PKG_DIR=${1}.app PKG_DIR=Aegisub.app
SKEL_DIR="packages/osx_bundle" SKEL_DIR="packages/osx_bundle"
AEGISUB_BIN="aegisub-${2}" AEGISUB_BIN="${1}"
SRCDIR=`pwd` SRCDIR=`pwd`
HOME_DIR=`echo ~` HOME_DIR=`echo ~`
WX_PREFIX=`${3} --prefix` WX_PREFIX=`${2} --prefix`
if test -z "${CC}"; then if test -z "${CC}"; then
CC="cc" CC="cc"
@ -48,9 +48,9 @@ find po -name *.po | sed 's/.*\/\(.*\)\.po/ <string>\1<\/string>/' > lang
find ${SKEL_DIR} -type f -not -regex ".*.svn.*" find ${SKEL_DIR} -type f -not -regex ".*.svn.*"
cp ${SKEL_DIR}/Contents/Resources/*.icns "${PKG_DIR}/Contents/Resources" cp ${SKEL_DIR}/Contents/Resources/*.icns "${PKG_DIR}/Contents/Resources"
cp ${SKEL_DIR}/Contents/Resources/etc/fonts/fonts.dtd "${PKG_DIR}/Contents/Resources/etc/fonts" cp ${SKEL_DIR}/Contents/Resources/etc/fonts/fonts.dtd "${PKG_DIR}/Contents/Resources/etc/fonts"
cat ${SKEL_DIR}/Contents/Resources/etc/fonts/fonts.conf |sed -f tools/osx-bundle.sed > "${PKG_DIR}/Contents/Resources/etc/fonts/fonts.conf" cat ${SKEL_DIR}/Contents/Resources/etc/fonts/fonts.conf | sed -f tools/osx-bundle.sed > "${PKG_DIR}/Contents/Resources/etc/fonts/fonts.conf"
cp ${SKEL_DIR}/Contents/Resources/etc/fonts/conf.d/*.conf "${PKG_DIR}/Contents/Resources/etc/fonts/conf.d" cp ${SKEL_DIR}/Contents/Resources/etc/fonts/conf.d/*.conf "${PKG_DIR}/Contents/Resources/etc/fonts/conf.d"
cat ${SKEL_DIR}/Contents/Info.plist |sed -f tools/osx-bundle.sed > "${PKG_DIR}/Contents/Info.plist" cat ${SKEL_DIR}/Contents/Info.plist | sed -f tools/osx-bundle.sed > "${PKG_DIR}/Contents/Info.plist"
rm languages rm languages

View File

@ -14,10 +14,10 @@
# information. # information.
TMP_DMG="temp_dmg" TMP_DMG="temp_dmg"
PKG_DIR="${1}.app" PKG_DIR="Aegisub.app"
PKG_NAME="${2}" PKG_NAME="Aegisub-${1}"
PKG_NAME_RW="${1}_rw.dmg" PKG_NAME_RW="Aegisub-${1}_rw.dmg"
PKG_NAME_VOLUME="${2}" PKG_NAME_VOLUME="Aegisub-${1}"
if ! test -d "${PKG_DIR}"; then if ! test -d "${PKG_DIR}"; then
echo "\"${PKG_DIR}\" does not exist, please run 'make osx-bundle'" echo "\"${PKG_DIR}\" does not exist, please run 'make osx-bundle'"