summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-10-15 01:41:40 +0200
committerRobin Gareus <robin@gareus.org>2016-10-15 01:41:40 +0200
commitf128bd9b3f9413fbafdee3b7ed42a1b2f86254db (patch)
treefc7a183f6971f3569105ef653eeb0093f62d4b46 /tools
parent4251747760453deff70c549c735b5a7c4c9256a7 (diff)
Include session-utils with OSX bundles
Diffstat (limited to 'tools')
-rwxr-xr-xtools/osx_packaging/osx_build42
1 files changed, 41 insertions, 1 deletions
diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build
index 19b64c3e04..6564539b28 100755
--- a/tools/osx_packaging/osx_build
+++ b/tools/osx_packaging/osx_build
@@ -113,6 +113,8 @@ else
fi
fi
+lower_case_appname=`echo $APPNAME | tr '[:upper:]' '[:lower:]'`
+
# setup directory structure
APPDIR=${APPNAME}${major_version}.app
@@ -419,6 +421,18 @@ if test -f $BUILD_ROOT/libs/vfork/ardour-exec-wrapper ; then
cp $BUILD_ROOT/libs/vfork/ardour-exec-wrapper $Frameworks/
fi
+# session-utils
+HAVE_SESSION_UTILS=false
+for file in $BUILD_ROOT/session_utils/${lower_case_appname}${major_version}-*; do
+ BN=$(basename $file)
+ cp -v $file $Frameworks/
+ if test x$STRIP = xall ; then
+ strip -s $Frameworks/${BN}
+ fi
+ ln -s ../lib/ardour-util.sh ${APPROOT}/MacOS/${BN}
+ HAVE_SESSION_UTILS=true
+done
+
# TODO check if this is still needed, even when building on 10.5
if file $BUILD_ROOT/gtk2_ardour/ardour-$release_version | grep -q ppc; then
STDCPP='|libstdc\+\+'
@@ -482,7 +496,6 @@ cp ../../gtk2_ardour/resources/${PRODUCT_PKG_DIR}-* ${Resources}/resources/
# Themes: only install those named for this app
-lower_case_appname=`echo $APPNAME | tr '[:upper:]' '[:lower:]'`
cp ../../gtk2_ardour/themes/*-${lower_case_appname}.colors $Themes
# go through and recursively remove any .svn dirs in the bundle
@@ -490,6 +503,26 @@ for svndir in `find $APPDIR -name .svn -type dir`; do
rm -rf $svndir
done
+# session utils start script
+if test "$HAVE_SESSION_UTILS" = true ; then
+ cat >> $Frameworks/ardour-util.sh << EOF
+#!/bin/sh
+
+BIN_DIR=\$(dirname "\$0")
+BUNDLE_DIR=\$(dirname "\$BIN_DIR")
+
+export ARDOUR_DATA_PATH="\$BUNDLE_DIR/share"
+export ARDOUR_CONFIG_PATH="\$BUNDLE_DIR/etc"
+export ARDOUR_DLL_PATH="\$BUNDLE_DIR/lib"
+export VAMP_PATH="\$BUNDLE_DIR/lib"\${VAMP_PATH:+:\$VAMP_PATH}
+
+SELF=\$(basename "\$0")
+exec "\$BUNDLE_DIR/lib/\$SELF" "\$@"
+EOF
+ chmod +x $Frameworks/ardour-util.sh
+fi
+
+
# install bundled LV2s to <app>/Contents/lib/LV2/
cp -R $BUILD_ROOT/libs/LV2 $Frameworks/
@@ -507,8 +540,15 @@ executables=$MAIN_EXECUTABLE
if test x$SAE != x ; then
executables="$executables"
fi
+if test "$HAVE_SESSION_UTILS" = true ; then
+ for file in $Frameworks/${lower_case_appname}${major_version}-*; do
+ BN=$(basename $file)
+ executables="$executables ../lib/${BN}"
+ done
+fi
for exe in $executables; do
+ echo "Processing Executable: $exe"
EXE=$APPROOT/MacOS/$exe
changes=""
for lib in `otool -L $EXE | egrep "($GTKSTACK_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/$STDCPP)" | awk '{print $1}' | grep -v 'libjack\.'` ; do