aboutsummaryrefslogtreecommitdiff
path: root/packages/darwin_app/embed-MacOSX-dependencies.sh
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-12-16 18:38:11 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-12-16 18:38:11 +0000
commit8476554bc26567564d6381e1b733579d5b45d881 (patch)
tree07a3134c21460e7183ea6516e1c2b7d87c51e219 /packages/darwin_app/embed-MacOSX-dependencies.sh
parentbe911ac82a45ca74b900aec72492400ca11374a4 (diff)
- Lots of bug fixes
- added script which searches thru all of the .pd_darwin files for dependencies from Fink. It then copies those libs into the Pd.app and sets everything up for them to be sourced by the objects. - added Guenter's quick hack to allow international characters in Pd patches svn path=/trunk/; revision=4241
Diffstat (limited to 'packages/darwin_app/embed-MacOSX-dependencies.sh')
-rwxr-xr-xpackages/darwin_app/embed-MacOSX-dependencies.sh54
1 files changed, 54 insertions, 0 deletions
diff --git a/packages/darwin_app/embed-MacOSX-dependencies.sh b/packages/darwin_app/embed-MacOSX-dependencies.sh
new file mode 100755
index 00000000..0d4d3022
--- /dev/null
+++ b/packages/darwin_app/embed-MacOSX-dependencies.sh
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# This script finds all of the dependecies from Fink and included them into
+# the Pd.app. <hans@at.or.at>
+#
+# run it in the root directory where the externals are stored, i.e. "extra"
+
+
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 Pd.app-Contents"
+ echo " i.e. $0 /Applications/Pd.app/Contents/"
+ exit
+fi
+
+LIB_DIR=lib
+PD_APP_CONTENTS=$1
+PD_APP_LIB=$PD_APP_CONTENTS/$LIB_DIR
+
+#echo "PD_APP_CONTENTS: $PD_APP_CONTENTS"
+#echo "PD_APP_LIB: $PD_APP_LIB"
+
+echo " "
+
+for pd_darwin in `find $PD_APP_CONTENTS -name '*.pd_darwin'`; do
+ LIBS=`otool -L $pd_darwin | sed -n 's|.*/sw/lib/\(.*\.dylib\).*|\1|p'`
+ if [ "x$LIBS" != "x" ]; then
+ echo "`echo $pd_darwin | sed 's|.*/\(.*\.pd_darwin$\)|\1|'` is using:"
+ for lib in $LIBS; do
+ echo -e "\t$lib"
+ install -d $PD_APP_LIB
+ install -p /sw/lib/$lib $PD_APP_LIB
+ # @executable_path starts from Contents/Resources/bin/pd
+ install_name_tool -id @executable_path/../../$LIB_DIR/$lib $PD_APP_LIB/$lib
+ install_name_tool -change /sw/lib/$lib @executable_path/../../$LIB_DIR/$lib $pd_darwin
+ done
+ echo " "
+ fi
+done
+
+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"
+ install -p /sw/lib/$lib $PD_APP_LIB
+ # @executable_path starts from Contents/Resources/bin/pd
+ install_name_tool -id @executable_path/../../$LIB_DIR/$lib $PD_APP_LIB/$lib
+ install_name_tool -change /sw/lib/$lib @executable_path/../../$LIB_DIR/$lib $dylib
+ done
+ echo " "
+ fi
+done
+