From 4067bd81444736ddd7047210e2afdaaf9eaeaf40 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 9 Jan 2015 20:05:06 +0000 Subject: Fix OSX integration. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5504 a436a847-0d15-0410-975c-d299462d15a1 --- osx/bundleify.sh | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'osx/bundleify.sh') diff --git a/osx/bundleify.sh b/osx/bundleify.sh index 220eb78..75bb030 100755 --- a/osx/bundleify.sh +++ b/osx/bundleify.sh @@ -1,18 +1,27 @@ #!/bin/sh -bundle=$1 -exe=$2 +if [ "$#" != 3 ]; then + echo "USAGE: $0 LIB_PREFIX BUNDLE EXE"; + exit 1; +fi + +prefix=$1 +bundle=$2 +exe=$3 mkdir -p "$bundle/Contents/lib" -mkdir -p "$bundle/Contents/lib/engines" -mkdir -p "$bundle/Contents/lib/modules" # Replace Control with Command in key bindings sed -i '' 's/GDK_CONTROL_MASK/GDK_META_MASK/' $bundle/Contents/patchage.ui +# Copy font configuration files +cp $prefix/etc/fonts/fonts.conf $bundle/Contents/Resources + # Copy GTK and pango modules to bundle -cp /usr/local/lib/gtk-2.0/2.10.0/engines/libquartz.so $bundle/Contents/lib/engines -cp /opt/local/lib/pango/1.6.0/modules/*basic*.so $bundle/Contents/lib/modules +mkdir -p "$bundle/Contents/lib/modules" +mkdir -p "$bundle/Contents/lib/gtk-2.0/engines" +cp $prefix/lib/gtk-2.0/2.10.0/engines/libquartz.so $bundle/Contents/lib/gtk-2.0/engines +cp $prefix/lib/pango/1.8.0/modules/*basic*.so $bundle/Contents/lib/modules # Copy libraries depended on by the executable to bundle libs="`otool -L $exe | grep '\.dylib\|\.so' | grep '/User\|/opt/local\|/usr/local' | sed 's/(.*//'`" @@ -21,13 +30,13 @@ for l in $libs; do done # Add libraries depended on by those libraries -reclibs="`otool -L $bundle/Contents/lib/* $bundle/Contents/lib/engines/* $bundle/Contents/lib/modules/* | grep '\.dylib\|\.so' | grep '/User\|/opt/local\|/usr/local' | sed 's/(.*//'`" +reclibs="`otool -L $bundle/Contents/lib/* $bundle/Contents/lib/gtk-2.0/engines/* $bundle/Contents/lib/modules/* | grep '\.dylib\|\.so' | grep \"$prefix\|/User\|/opt/local\|/usr/local\" | sed 's/(.*//'`" for l in $reclibs; do cp $l $bundle/Contents/lib done # ... and libraries depended on by those libraries (yes, this should be done more sanely) -recreclibs="`otool -L $bundle/Contents/lib/* $bundle/Contents/lib/engines/* $bundle/Contents/lib/modules/* | grep '\.dylib\|\.so' | grep '/User\|/opt/local\|/usr/local' | sed 's/(.*//'`" +recreclibs="`otool -L $bundle/Contents/lib/* $bundle/Contents/lib/gtk-2.0/engines/* $bundle/Contents/lib/modules/* | grep '\.dylib\|\.so' | grep \"$prefix\|/User\|/opt/local\|/usr/local\" | sed 's/(.*//'`" for l in $recreclibs; do cp $l $bundle/Contents/lib done -- cgit v1.2.1