* s/SVN_VERSION/SVN_REVISION/ in configure.in

* Prefix PLIST_ to swappable variables in Plist.info
* Add scripts/osx-bundle.sed.in which swaps the variables in Info.plist
* Split AC_OUTPUT into AC_CONFIG_FILES for Makefiles/config scripts
  (osx-bundle.sed.in) and add AC_OUTPUT below.
* svn:ignore property on . and scripts/
* Fix bug in Info.plist (---> to --> for ending XML comment)

Originally committed to SVN as r2581.
This commit is contained in:
Amar Takhar 2008-12-31 05:52:52 +00:00
parent 5de82eb98a
commit 93002cf4a8
4 changed files with 28 additions and 16 deletions

View file

@ -120,29 +120,31 @@ fi
AC_ARG_ENABLE(build-dist) AC_ARG_ENABLE(build-dist)
if test "$enable_build_dist" = "yes"; then if test "$enable_build_dist" = "yes"; then
`svnversion > $srcdir/svn_version` `svnversion > $srcdir/svn_revision`
fi fi
AC_MSG_CHECKING([for svn version]) AC_MSG_CHECKING([for svn version])
if test -d "$srcdir/.svn"; then if test -d "$srcdir/.svn"; then
SVN_VERSION=`svnversion $srcdir` SVN_REVISION=`svnversion $srcdir`
AC_MSG_RESULT([$SVN_VERSION from "svnversion $srcdir"]) AC_MSG_RESULT([$SVN_REVISION from "svnversion $srcdir"])
elif test -f "$srcdir/svn_version"; then elif test -f "$srcdir/svn_revision"; then
SVN_VERSION=`cat $srcdir/svn_version` SVN_REVISION=`cat $srcdir/svn_revision`
AC_MSG_RESULT([$SVN_VERSION from "$srcdir/svn_version"]) AC_MSG_RESULT([$SVN_REVISION from "$srcdir/svn_revision"])
else else
SVN_VERSION="_unknown" SVN_REVISION="_unknown"
AC_MSG_RESULT([not found]) AC_MSG_RESULT([not found])
fi fi
PACKAGE_STRING="${PACKAGE_STRING}-r$SVN_VERSION" PACKAGE_STRING="${PACKAGE_STRING}-r$SVN_REVISION"
PACKAGE_VERSION="${PACKAGE_VERSION}-r$SVN_VERSION" PACKAGE_VERSION="${PACKAGE_VERSION}-r$SVN_REVISION"
VERSION="${VERSION}-r$SVN_VERSION" VERSION="${VERSION}-r$SVN_REVISION"
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(SVN_REVISION)
AC_SUBST(BUILD_DATE)
################################################### ###################################################
@ -917,7 +919,8 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The prefix for our gettext translation domains.]) [The prefix for our gettext translation domains.])
AC_OUTPUT([ # Makefiles
AC_CONFIG_FILES([
Makefile Makefile
aegisub/Makefile aegisub/Makefile
aegisub/bitmaps/Makefile aegisub/bitmaps/Makefile
@ -931,6 +934,12 @@ po/Makefile.in
m4macros/Makefile m4macros/Makefile
]) ])
# Files that need substitution.
AC_CONFIG_FILES([
scripts/osx-bundle.sed
])
AC_OUTPUT
if test -z "$found_audio"; then if test -z "$found_audio"; then
AC_MSG_NOTICE([ AC_MSG_NOTICE([

View file

@ -22,16 +22,16 @@
<string>agsu</string> <string>agsu</string>
<!-- Bundle version --> <!-- Bundle version -->
<!-- This should be bumped on any major changes ---> <!-- This should be bumped on any major changes -->
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1</string> <string>1</string>
<!-- aegisub version --> <!-- aegisub version -->
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>@VERSION@</string> <string>@PLIST_VERSION@</string>
<key>CFBundleLongVersionString</key> <key>CFBundleLongVersionString</key>
<string>@VERSION@ (@SVN_REVISION@), Copyright 2005-2009, aegisub http://www.aegisub.net/</string> <string>@PLIST_VERSION@ (@PLIST_SVN_REVISION@), Copyright 2005-2009, aegisub http://www.aegisub.net/</string>
<!-- Values: i386, ppc, x86_65, ppc64 --> <!-- Values: i386, ppc, x86_65, ppc64 -->
<key>LSArchitecturePriority</key> <key>LSArchitecturePriority</key>
@ -39,7 +39,7 @@
<!-- Displayed in the 'Get Info' context menu dialogue --> <!-- Displayed in the 'Get Info' context menu dialogue -->
<key>CFBundleGetInfoString</key> <key>CFBundleGetInfoString</key>
<string>aegisub version @VERSION@ (@SVN_REVISION) built on @BUILD_DATE@ http://www.aegisub.net/</string> <string>aegisub version @PLIST_VERSION@ (@PLIST_SVN_REVISION@) built on @PLIST_BUILD_DATE@ http://www.aegisub.net/</string>
<!-- Whether to allow multiple instances across user logins --> <!-- Whether to allow multiple instances across user logins -->
<key>LSMultipleInstancesProhibited</key> <key>LSMultipleInstancesProhibited</key>

View file

@ -0,0 +1,3 @@
s/@PLIST_VERSION@/@VERSION@/g
s/@PLIST_SVN_REVISION@/@SVN_REVISION@/g
s/@PLIST_BUILD_DATE@/@BUILD_DATE@/g

View file

@ -23,7 +23,7 @@ mkdir -v ${PKG_DIR}/Contents/Resources
echo echo
echo "---- Copying Skel Files ----" echo "---- Copying Skel Files ----"
cp -v ${SKEL_DIR}/Contents/Resources/* ${PKG_DIR}/Contents/Resources cp -v ${SKEL_DIR}/Contents/Resources/* ${PKG_DIR}/Contents/Resources
cp -v ${SKEL_DIR}/Contents/Info.plist ${PKG_DIR}/Contents cat ${SKEL_DIR}/Contents/Info.plist |sed -f scripts/osx-bundle.sed > ${PKG_DIR}/Contents/Info.plist
echo echo
echo "---- Binaries ----" echo "---- Binaries ----"