aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-11-04 04:00:14 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-11-04 04:00:14 +0000
commit6378f63233063bd56e60922a142ecc8342d5c164 (patch)
treef0cb148252cfe1bb0ad04dbb9533acf581701bbf
parent9e60512998b36769ee77fe406f6750ae62c62728 (diff)
added one more pass to catch dylibs that depend on dylibs
svn path=/trunk/; revision=12721
-rwxr-xr-xpackages/darwin_app/embed-MacOSX-dependencies.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/darwin_app/embed-MacOSX-dependencies.sh b/packages/darwin_app/embed-MacOSX-dependencies.sh
index 7ee90f62..c560e10f 100755
--- a/packages/darwin_app/embed-MacOSX-dependencies.sh
+++ b/packages/darwin_app/embed-MacOSX-dependencies.sh
@@ -38,6 +38,7 @@ for pd_darwin in `find $PD_APP_CONTENTS -name '*.pd_darwin'`; do
fi
done
+# check for .so plugins used by libquicktime and others
for so in $PD_APP_LIB/*/*.so; do
LIBS=`otool -L $so | sed -n 's|.*/sw/lib/\(.*\.dylib\).*|\1|p'`
if [ "x$LIBS" != "x" ]; then
@@ -77,3 +78,24 @@ for dylib in $PD_APP_LIB/*.dylib; do
fi
done
+# run it one more time to catch dylibs that depend on dylibs
+for dylib in $PD_APP_LIB/*.dylib; do
+ LIBS=`otool -L $dylib | sed -n 's|.*/sw/lib/\(.*\.dylib\).*|\1|p'`
+ if [ "x$LIBS" != "x" ]; then
+ echo "`echo $dylib | sed 's|.*/\(.*\.dylib\)|\1|'` is using:"
+ for lib in $LIBS; do
+ echo -e "\t$lib"
+ new_lib=`echo $lib | sed 's|.*/\(.*\.dylib\)|\1|'`
+ if [ -e $PD_APP_LIB/$new_lib ]; then
+ echo "$PD_APP_LIB/$new_lib already exists, skipping copy."
+ else
+ install -vp /sw/lib/$lib $PD_APP_LIB
+ fi
+ # @executable_path starts from Contents/Resources/bin/pd
+ install_name_tool -id @executable_path/../../$LIB_DIR/$new_lib $PD_APP_LIB/$new_lib
+ install_name_tool -change /sw/lib/$lib @executable_path/../../$LIB_DIR/$new_lib $dylib
+ done
+ echo " "
+ fi
+done
+