From 01d522b34457bd801fb991696d738ad9dfdbb39f Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Fri, 13 Mar 2009 04:27:24 +0000 Subject: [PATCH] * Add a (small) hack for scripts/osx-bundle.sh to handle libtools weirdness. * Update path to reflect new repo changes. Originally committed to SVN as r2765. --- aegisub/scripts/osx-bundle.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/aegisub/scripts/osx-bundle.sh b/aegisub/scripts/osx-bundle.sh index fa987f211..1d036e0d1 100755 --- a/aegisub/scripts/osx-bundle.sh +++ b/aegisub/scripts/osx-bundle.sh @@ -3,6 +3,7 @@ PKG_DIR=${1}.app SKEL_DIR="packages/osx_bundle" AEGISUB_VERSION_DATA="${2}" +AEGISUB_BIN="aegisub-${AEGISUB_VERSION_DATA}" SRCDIR=`pwd` HOME_DIR=`echo ~` @@ -82,7 +83,20 @@ done echo echo "---- Binaries ----" -cp -v aegisub/.libs/aegisub-${AEGISUB_VERSION_DATA} ${PKG_DIR}/Contents/MacOS/aegisub + +# XXX: Fix me +# I'm not sure of the exact reason but libtool likes creating the binary in +# either '.' or '.libs', the file in the parent is just a script that loads +# the binary from .libs. On ocassion it'll stop using the script and just +# create the binary, this isn't the best way to check which one to copy but +# it's a good enough hack until then. + +if test src/${AEGISUB_BIN} -nt src/.libs/${AEGISUB_BIN}; then + cp -v src/${AEGISUB_BIN} ${PKG_DIR}/Contents/MacOS/aegisub +else + cp -v src/.libs/${AEGISUB_BIN} ${PKG_DIR}/Contents/MacOS/aegisub +fi + echo cc -o ${PKG_DIR}/Contents/MacOS/restart-helper scripts/osx-bundle-restart-helper.c ${CC} -o ${PKG_DIR}/Contents/MacOS/restart-helper scripts/osx-bundle-restart-helper.c