summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-11-26 02:06:06 +0000
committerDavid Robillard <d@drobilla.net>2011-11-26 02:06:06 +0000
commitc9491c87b0f0c6cf7f73ecd6ba87ba12ab6dc6d2 (patch)
treeac0db9e2913bdc9770751114611ba8023022370f
parent3e3d411d4078c5dbae6ee3da7438dd95ccb343b4 (diff)
downloadpatchage-c9491c87b0f0c6cf7f73ecd6ba87ba12ab6dc6d2.tar.gz
patchage-c9491c87b0f0c6cf7f73ecd6ba87ba12ab6dc6d2.tar.bz2
patchage-c9491c87b0f0c6cf7f73ecd6ba87ba12ab6dc6d2.zip
Fix OSX bundling with auto-arrange enabled.
Use Mac-style keybindings on OSX. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3639 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--ChangeLog3
-rwxr-xr-xosx/bundleify.sh30
2 files changed, 22 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 97a9471..e5801aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,8 +2,9 @@ patchage (UNRELEASED) unstable; urgency=low
* Make it possible to remove connections by middle-clicking on their
handle, or selecting them and pressing delete.
- * Fix font configuration on OSX.
* Remove Raul dependency.
+ * Fix font configuration on OSX.
+ * Use Mac style key bindings on OSX.
-- David Robillard <d@drobilla.net> (UNRELEASED)
diff --git a/osx/bundleify.sh b/osx/bundleify.sh
index cc72009..9a49a78 100755
--- a/osx/bundleify.sh
+++ b/osx/bundleify.sh
@@ -3,26 +3,36 @@
bundle=$1
exe=$2
-libs="`otool -L $exe | grep '\.dylib\|\.so' | grep '/User\|/opt/local\|/usr/local' | sed 's/(.*//'`"
-
mkdir -p "$bundle/Contents/lib"
-for l in $libs; do
- cp $l $bundle/Contents/lib
-done
-
mkdir -p "$bundle/Contents/lib/engines"
-cp /opt/local/lib/gtk-2.0/2.10.0/engines/libclearlooks.so $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 GTK and pango modules to bundle
+cp /opt/local/lib/gtk-2.0/2.10.0/engines/libclearlooks.so $bundle/Contents/lib/engines
cp /opt/local/lib/pango/1.6.0/modules/*basic*.so $bundle/Contents/lib/modules
-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/(.*//'`"
+# Copy libraries depended on by the executable to bundle
+libs="`otool -L $exe | grep '\.dylib\|\.so' | grep '/User\|/opt/local\|/usr/local' | sed 's/(.*//'`"
+for l in $libs; do
+ cp $l $bundle/Contents/lib
+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/(.*//'`"
for l in $reclibs; do
cp $l $bundle/Contents/lib
done
-for l in $libs $reclibs; do
+# ... 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/(.*//'`"
+for l in $recreclibs; do
+ cp $l $bundle/Contents/lib
+done
+
+for l in $libs $reclibs $recreclibs; do
lname=`echo $l | sed 's/.*\///'`
lid="@executable_path/lib/$lname"
lpath="$bundle/Contents/lib/$lname"