diff options
Diffstat (limited to 'osx')
-rw-r--r-- | osx/Info.plist.in | 45 | ||||
-rw-r--r-- | osx/Patchage.icns | bin | 0 -> 177383 bytes | |||
-rwxr-xr-x | osx/bundleify.sh | 79 | ||||
-rw-r--r-- | osx/gtkrc | 251 | ||||
-rw-r--r-- | osx/loaders.cache | 11 | ||||
-rw-r--r-- | osx/pango.modules | 2 | ||||
-rw-r--r-- | osx/pangorc | 2 |
7 files changed, 390 insertions, 0 deletions
diff --git a/osx/Info.plist.in b/osx/Info.plist.in new file mode 100644 index 0000000..0d8714b --- /dev/null +++ b/osx/Info.plist.in @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleDisplayName</key> + <string>Patchage</string> + <key>CFBundleExecutable</key> + <string>patchage</string> + <key>CFBundleGetInfoString</key> + <string>@PATCHAGE_VERSION@, Copyright © 2014 David Robillard</string> + <key>CFBundleIconFile</key> + <string>Patchage</string> + <key>CFBundleIconFile</key> + <string>Patchage.icns</string> + <key>CFBundleIdentifier</key> + <string>net.drobilla.Patchage</string> + <key>CFBundleName</key> + <string>Patchage</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>@PATCHAGE_VERSION@</string> + <key>CFBundleSignature</key> + <string>patc</string> + <key>LSEnvironment</key> + <dict> + <key>DYLD_LIBRARY_PATH</key> + <string>lib</string> + <key>GTK_PATH</key> + <string>lib</string> + <key>GTK_DATA_PREFIX</key> + <string>Resources</string> + <key>XDG_DATA_DIRS</key> + <string>Resources</string> + <key>GDK_PIXBUF_MODULE_FILE</key> + <string>Resources/loaders.cache</string> + <key>FONTCONFIG_FILE</key> + <string>Resources/fonts.conf</string> + <key>PANGO_RC_FILE</key> + <string>Resources/pangorc</string> + </dict> +</dict> +</plist> diff --git a/osx/Patchage.icns b/osx/Patchage.icns Binary files differnew file mode 100644 index 0000000..83364a2 --- /dev/null +++ b/osx/Patchage.icns diff --git a/osx/bundleify.sh b/osx/bundleify.sh new file mode 100755 index 0000000..55ff57d --- /dev/null +++ b/osx/bundleify.sh @@ -0,0 +1,79 @@ +#!/bin/bash + +if [ "$#" != 3 ]; then + echo "USAGE: $0 LIB_PREFIX BUNDLE EXE"; + exit 1; +fi + +prefix=$1 +bundle=$2 +exe=$3 + +mkdir -p "$bundle/Contents/lib" + +# 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 +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 $(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/; +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\|/usr/local' | sed 's/(.*//'`" +for l in $libs; do + cp $l $bundle/Contents/lib/; +done +chmod 755 $bundle/Contents/lib/* + +# ... 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 + + # Exit once we haven't added any new libraries + newlibs=$(echo "$newlibs" | sort | uniq) + if [ "$newlibs" = "$libs" ]; then + break; + fi + libs=$newlibs +done + +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" + install_name_tool -id $lid $lpath + install_name_tool -change $l $lid $exe + for j in `find $bundle -name '*.so' -or -name '*.dylib'`; do + install_name_tool -change $l $lid $j + done; +done + +echo "External library references:" +otool -L $exe `find $bundle -name '*.so' -or -name '*.dylib'` | grep -v ':' | grep -v '@executable_path' | sort | uniq diff --git a/osx/gtkrc b/osx/gtkrc new file mode 100644 index 0000000..412de42 --- /dev/null +++ b/osx/gtkrc @@ -0,0 +1,251 @@ +gtk-color-scheme = +"bg_color: #f5f5f5 +fg_color: #000 +base_color: #fff +text_color: #000 +selected_bg_color: #0066FF +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=16,16" +gtk-toolbar-icon-size = small-toolbar +gtk-error-bell = 0 +gtk-show-input-method-menu = 0 + +style "default" +{ + bg[NORMAL] = @bg_color + bg[PRELIGHT] = @bg_color + bg[SELECTED] = @selected_bg_color + bg[INSENSITIVE] = @bg_color + bg[ACTIVE] = @bg_color + + fg[NORMAL] = @fg_color + fg[PRELIGHT] = @fg_color + fg[SELECTED] = @selected_fg_color + fg[INSENSITIVE] = darker (@bg_color) + fg[ACTIVE] = @fg_color + + text[NORMAL] = @text_color + text[PRELIGHT] = @text_color + text[SELECTED] = @selected_fg_color + text[INSENSITIVE] = darker (@bg_color) + text[ACTIVE] = @text_color + + base[NORMAL] = @base_color + base[PRELIGHT] = @selected_bg_color + base[SELECTED] = @selected_bg_color + base[INSENSITIVE] = @bg_color + base[ACTIVE] = shade (1.3, @selected_bg_color) + + GtkWidget::interior-focus = 1 + GtkWidget::new-tooltip-style = 1 + GtkWidget::focus-line-width = 0 + GtkWidget::focus-padding = 0 + 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 + GtkSpinButton::shadow-type = out + GtkButtonBox::child-min-width = 70 + GtkButtonBox::child-min-height = 22 + GtkComboBox::appears-as-list = 0 + GtkComboBox::focus-on-click = 0 + GtkNotebook::tab-curvature = 4 + GtkNotebook::tab-overlap = 0 + GtkTreeView::allow-rules = 1 + GtkTreeView::expander-size = 14 + GtkToolbar::internal-padding = 2 + GtkExpander::expander-size = 14 + GtkScrolledWindow::scrollbar-spacing = 0 + GtkMenuItem::horizontal-padding = 8 + GtkMenu::vertical-padding = 4 + GtkMenuItem::horizontal-padding = 9 + GtkMenuItem::toggle-spacing = 0 + GtkSeparatorMenuItem::horizontal-padding = 2 + GtkSeparatorMenuItem::horizontal-padding = 2 + GtkScrollbar::min-slider-length = 10 + GtkScrollbar::has-forward-stepper = 1 + GtkScrollbar::has-backward-stepper = 0 + GtkScrollbar::has-secondary-forward-stepper = 0 + GtkScrollbar::has-secondary-backward-stepper = 1 + GtkRange::trough-border = 0 + GtkRange::stepper-spacing = 0 + GtkRange::stepper-size = 14 + GtkRange::trough-under-steppers = 1 + + engine "quartz" + { + buttontype = "aqua" + } +} + +style "wider" +{ + xthickness = 3 + ythickness = 3 +} + +style "scrolled-window" +{ + xthickness = 1 + ythickness = 1 +} + +style "menu" +{ + xthickness = 0 + ythickness = 0 + font_name = "Lucida Grande 14" + + bg[PRELIGHT] = @selected_fg_color + fg[PRELIGHT] = @selected_fg_color + text[PRELIGHT] = @selected_fg_color +} + +style "menu-item" = "menu" +{ + ythickness = 2 + GtkWidget::draw-border = { 0, 0, 0, 2 } +} + +style "menu-separator" = "menu-item" +{ + ythickness = 3 +} + +style "menu-bar" +{ + ythickness = 0 + xthickness = 0 +} + +style "treeview" +{ + GtkTreeView::odd-row-color = "#f5f5f5" + + base[SELECTED] = "#2b5dcd" + base[ACTIVE] = "#cacaca" + text[SELECTED] = "#FFF" + text[ACTIVE] = "#000" + + font_name = "Lucida Grande 12" + + GtkWidget::focus-line-width = 0 + GtkWidget::draw-border = { 1, 1, 1, 1 } + GtkButton::inner-border = { 3, 3, 1, 3 } +} + +style "tree-header" +{ + ythickness = 0 + bg[NORMAL] = "#f2f2f2" + + font_name = "Lucida Grande 11" +} + +style "tooltip" +{ + xthickness = 5 + ythickness = 5 + + fg[NORMAL] = @tooltip_fg_color + bg[NORMAL] = @tooltip_bg_color +} + +style "scrollbar" +{ + GtkScrollbar::has-forward-stepper = 0 + GtkScrollbar::has-backward-stepper = 0 + GtkRange::slider-width = 15 + GtkRange::trough-border = 0 + GtkRange::trough-side-details = 0 +} + +style "button" +{ + xthickness = 2 + ythickness = 2 + + bg[NORMAL] = @bg_color + bg[PRELIGHT] = shade(1.1, @bg_color) + bg[ACTIVE] = @bg_color + bg[INSENSITIVE] = @bg_color + + GtkWidget::draw-border = { 2, 2, 2, 2 } + GtkWidget::focus-line-width = 1 +} + +style "combo-box" +{ + fg[NORMAL] = "#616161" + #xthickness = 2 + #ythickness = 2 +} + +style "combo-box-button" +{ + xthickness = 6 + ythickness = 2 + + bg[NORMAL] = @base_color + bg[PRELIGHT] = shade(1.1, @base_color) + bg[ACTIVE] = @base_color + bg[INSENSITIVE] = @base_color + + GtkWidget::focus-padding = 0 +} + +style "combo-box-label" = "combo-box" +{ + fg[NORMAL] = "#595959" +} + +style "small-font" +{ + font_name = "Lucida Grande 11" +} + +style "mini-font" +{ + font_name = "Lucida Grande 9" +} + +style "entry" +{ + xthickness = 2 + ythickness = 2 + GtkEntry::inner-border = { 2, 2, 2, 2 } + base[INSENSITIVE] = shade(1.02, @bg_color) +} + +class "GtkWidget" style "default" +class "GtkMenuBar" style "menu-bar" +class "GtkScrolledWindow" style "scrolled-window" +class "GtkFrame" style "wider" +class "GtkScrollbar" style "scrollbar" +class "GtkEntry" style "entry" +class "GtkButton" style "button" + +widget "gtk-tooltip*" style "tooltip" +widget "*small-font*" style "small-font" +widget "*mini-font*" style "mini-font" + +widget_class "*<GtkMenu>*" style "menu" +widget_class "*<GtkMenuItem>*" style "menu-item" +widget_class "*<GtkSeparatorMenuItem>" style "menu-separator" +/*widget "*.gtk-combobox-popup-menu*" style "combo-box-menu"*/ +widget_class "*.<GtkTreeView>*" style "treeview" +widget_class "*.GtkTreeView.GtkButton" style "tree-header" +widget_class "*.<GtkComboBox>.*" style "combo-box" +widget_class "*.<GtkComboBoxText>.<GtkToggleButton>" style "combo-box-button" +widget_class "*.<GtkComboBoxEntry>.<GtkToggleButton>" style "combo-box-button" diff --git a/osx/loaders.cache b/osx/loaders.cache new file mode 100644 index 0000000..19e9a29 --- /dev/null +++ b/osx/loaders.cache @@ -0,0 +1,11 @@ +"@executable_path/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-icns.so" +"icns" 4 "gdk-pixbuf" "The ICNS image format" "GPL" +"image/x-icns" "" +"icns" "" +"icns" "" 100 + +"@executable_path/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so" +"png" 5 "gdk-pixbuf" "The PNG image format" "LGPL" +"image/png" "" +"png" "" +"\211PNG\r\n\032\n" "" 100 diff --git a/osx/pango.modules b/osx/pango.modules new file mode 100644 index 0000000..d981ee2 --- /dev/null +++ b/osx/pango.modules @@ -0,0 +1,2 @@ +lib/modules/pango-basic-coretext.so BasicScriptEngineCoreText PangoEngineShape PangoRenderCoreText common: +lib/modules/pango-basic-fc.so BasicScriptEngineFc PangoEngineShape PangoRenderFc common: diff --git a/osx/pangorc b/osx/pangorc new file mode 100644 index 0000000..ce582e3 --- /dev/null +++ b/osx/pangorc @@ -0,0 +1,2 @@ +[Pango] +ModuleFiles = ./Resources/pango.modules |