diff options
author | David Robillard <d@drobilla.net> | 2017-02-12 23:29:13 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-02-12 23:29:13 +0100 |
commit | b570c19fc01040c32840406be7f47ac6c6858c0f (patch) | |
tree | 7162a1abb24bee437d1be23a64af07c32f7c9bf0 | |
parent | ab1e90c6374d5a06e7b77821728c57b9bb391afe (diff) | |
download | patchage-b570c19fc01040c32840406be7f47ac6c6858c0f.tar.gz patchage-b570c19fc01040c32840406be7f47ac6c6858c0f.tar.bz2 patchage-b570c19fc01040c32840406be7f47ac6c6858c0f.zip |
Update Mac bundling
-rwxr-xr-x | osx/bundleify.sh | 50 | ||||
-rw-r--r-- | osx/gtkrc | 13 |
2 files changed, 41 insertions, 22 deletions
diff --git a/osx/bundleify.sh b/osx/bundleify.sh index a9a6cf1..3806bd2 100755 --- a/osx/bundleify.sh +++ b/osx/bundleify.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash if [ "$#" != 3 ]; then echo "USAGE: $0 LIB_PREFIX BUNDLE EXE"; @@ -17,38 +17,54 @@ 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 +# Copy GTK and pango 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 +cp $(find /usr/local/Cellar/pango -name '*basic-coretext*') $bundle/Contents/lib/modules # Copy GdkPixbuf loaders mkdir -p $bundle/Contents/lib/gdk-pixbuf-2.0/2.10.0/loaders/ for fmt in icns png; do - cp $prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-$fmt.so \ - $bundle/Contents/lib/gdk-pixbuf-2.0/2.10.0/loaders/; + cp $prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-$fmt.so \ + $bundle/Contents/lib/gdk-pixbuf-2.0/2.10.0/loaders/; done +chmod -R 755 $bundle/Contents/lib/* + # Copy libraries depended on by the executable to bundle -libs="`otool -L $exe | grep '\.dylib\|\.so' | grep '/User\|/opt/local\|/usr/local' | sed 's/(.*//'`" +libs="`otool -L $exe | grep '\.dylib\|\.so' | grep '/User\|/usr/local' | sed 's/(.*//'`" for l in $libs; do - cp $l $bundle/Contents/lib + cp $l $bundle/Contents/lib/; done +chmod 755 $bundle/Contents/lib/* -# Add libraries depended on by those libraries -reclibs="`otool -L $bundle/Contents/lib/* $bundle/Contents/lib/gtk-2.0/engines/* $bundle/Contents/lib/modules/* $bundle/Contents/lib/gdk-pixbuf-2.0/2.10.0/loaders/* | grep '\.dylib\|\.so' | grep \"$prefix\|/User\|/opt/local\|/usr/local\" | sed 's/(.*//'`" -for l in $reclibs; do - cp $l $bundle/Contents/lib -done +# ... recursively +while true; do + newlibs=$libs + + # Copy all libraries this library depends on to bundle + for l in $(find $bundle -name '*.dylib' -or -name '*.so'); do + reclibs="`otool -L $l | grep '\.dylib\|\.so' | grep '/User\|/usr/local' | sed 's/(.*//'`" + for rl in $reclibs; do + cp $rl $bundle/Contents/lib/; + done + chmod 755 $bundle/Contents/lib/* + newlibs=$(echo "$newlibs"; echo "$reclibs") + done -# ... and libraries depended on by those libraries (yes, this should be done more sanely) -recreclibs="`otool -L $bundle/Contents/lib/* $bundle/Contents/lib/gtk-2.0/engines/* $bundle/Contents/lib/modules/* $bundle/Contents/lib/gdk-pixbuf-2.0/2.10.0/loaders/* | grep '\.dylib\|\.so' | grep \"$prefix\|/User\|/opt/local\|/usr/local\" | sed 's/(.*//'`" -for l in $recreclibs; do - cp $l $bundle/Contents/lib + # Exit once we haven't added any new libraries + newlibs=$(echo "$newlibs" | sort | uniq) + if [ "$newlibs" = "$libs" ]; then + break; + fi + libs=$newlibs done -for l in $libs $reclibs $recreclibs; do +echo "Bundled libraries:" +echo "$libs" + +for l in $libs; do lname=`echo $l | sed 's/.*\///'` lid="@executable_path/lib/$lname" lpath="$bundle/Contents/lib/$lname" @@ -8,12 +8,15 @@ selected_fg_color: #fff tooltip_bg_color: #fafaba tooltip_fg_color: #000" +gtk-font-name = "Lucida Grande 12" +gtk-icon-theme-name = "Tango" +gtk-menu-popup-delay = 1 gtk-button-images = 0 gtk-menu-images = 0 gtk-toolbar-style = 0 gtk-enable-mnemonics = 0 -gtk-icon-sizes = "gtk-small-toolbar=16,16:gtk-large-toolbar=22,22" -gtk-toolbar-icon-size = large-toolbar +gtk-icon-sizes = "gtk-small-toolbar=16,16:gtk-large-toolbar=16,16" +gtk-toolbar-icon-size = small-toolbar gtk-error-bell = 0 gtk-show-input-method-menu = 0 @@ -47,8 +50,8 @@ style "default" GtkWidget::new-tooltip-style = 1 GtkWidget::focus-line-width = 0 GtkWidget::focus-padding = 0 - GtkButton::default-border = { 1, 1, 1, 1 } - GtkButton::default-outside-border = { 1, 1, 1, 1 } + GtkButton::inner-border = { 8, 8, 0, 0 } + GtkButton::default-border = { 0, 0, 0, 0 } GtkButton::child-displacement-x = 0 GtkButton::child-displacement-y = 0 GtkCheckButton::indicator-spacing = 3 @@ -61,7 +64,7 @@ style "default" GtkNotebook::tab-overlap = 0 GtkTreeView::allow-rules = 1 GtkTreeView::expander-size = 14 - GtkToolbar::internal-padding = 3 + GtkToolbar::internal-padding = 2 GtkExpander::expander-size = 14 GtkScrolledWindow::scrollbar-spacing = 0 GtkMenuItem::horizontal-padding = 8 |