summaryrefslogtreecommitdiffstats
path: root/osx/bundleify.sh
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-01-09 20:05:06 +0000
committerDavid Robillard <d@drobilla.net>2015-01-09 20:05:06 +0000
commit4067bd81444736ddd7047210e2afdaaf9eaeaf40 (patch)
tree5cd70895cc5f4247996c321e044dfec7d063e9c7 /osx/bundleify.sh
parent1dff3fea90f2dc43a8bfc782eb88512344c1b5ae (diff)
downloadpatchage-4067bd81444736ddd7047210e2afdaaf9eaeaf40.tar.gz
patchage-4067bd81444736ddd7047210e2afdaaf9eaeaf40.tar.bz2
patchage-4067bd81444736ddd7047210e2afdaaf9eaeaf40.zip
Fix OSX integration.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5504 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'osx/bundleify.sh')
-rwxr-xr-xosx/bundleify.sh25
1 files changed, 17 insertions, 8 deletions
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