summaryrefslogtreecommitdiffstats
path: root/packaging/macosx/Resources
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-10-16 23:36:32 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-10-16 23:36:32 +0000
commitb2c02c3cd7513b6fad49a0bd0c669f9a581f5cc8 (patch)
tree7d37d088e9179f631f22143a980157da49a331a9 /packaging/macosx/Resources
parentRemoved dangerous GTK-mimicking macros. (diff)
parentupdate to trunk (r13610) (diff)
downloadinkscape-b2c02c3cd7513b6fad49a0bd0c669f9a581f5cc8.tar.gz
inkscape-b2c02c3cd7513b6fad49a0bd0c669f9a581f5cc8.zip
Merge in osx-packaging-update branch. OS X packaging now works correctly for trunk.
(bzr r13620)
Diffstat (limited to 'packaging/macosx/Resources')
-rwxr-xr-xpackaging/macosx/Resources/alert_fccache.sh28
-rwxr-xr-xpackaging/macosx/Resources/bin/getdisplay.sh9
-rwxr-xr-xpackaging/macosx/Resources/bin/gimp-wrapper.sh96
-rwxr-xr-xpackaging/macosx/Resources/bin/inkscape196
-rwxr-xr-xpackaging/macosx/Resources/bin/python-wrapper.sh78
-rw-r--r--packaging/macosx/Resources/etc/fonts/fonts.conf14
-rw-r--r--packaging/macosx/Resources/etc/gtk-2.0/gtkrc20
-rw-r--r--[-rwxr-xr-x]packaging/macosx/Resources/openDoc14
-rwxr-xr-xpackaging/macosx/Resources/script51
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-down.pngbin465 -> 0 bytes
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-left.pngbin497 -> 0 bytes
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-right.pngbin498 -> 0 bytes
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-up.pngbin463 -> 0 bytes
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/trough-scrollbar-horiz.pngbin1014 -> 0 bytes
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/trough-scrollbar-vert.pngbin905 -> 0 bytes
-rwxr-xr-xpackaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/copy-slider.sh7
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-horiz-prelight.pngbin5940 -> 0 bytes
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-horiz.pngbin5940 -> 0 bytes
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-vert-prelight.pngbin5409 -> 0 bytes
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-vert.pngbin5409 -> 0 bytes
-rwxr-xr-xpackaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/copy-slider.sh7
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-horiz-prelight.pngbin5864 -> 0 bytes
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-horiz.pngbin5864 -> 0 bytes
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-vert-prelight.pngbin5412 -> 0 bytes
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-vert.pngbin5412 -> 0 bytes
-rw-r--r--packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/pre_gtkrc547
-rwxr-xr-xpackaging/macosx/Resources/xdg_setup.sh13
27 files changed, 359 insertions, 721 deletions
diff --git a/packaging/macosx/Resources/alert_fccache.sh b/packaging/macosx/Resources/alert_fccache.sh
new file mode 100755
index 000000000..50038b2ac
--- /dev/null
+++ b/packaging/macosx/Resources/alert_fccache.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+ALERT_SCRIPT="$(cat << EOM
+try
+ set parent_path to "$CWD"
+ set icon_path to POSIX path of (parent_path & "/Inkscape.icns")
+ set front_app to ((path to frontmost application) as text)
+ tell application front_app
+ display dialog "While Inkscape is open, its windows can be displayed or hidden by displaying or hiding the X11 application.
+
+The first time this version of Inkscape is run it may take several minutes before the main window is displayed while font caches are built." buttons {"OK"} default button 1 with title "Inkscape on OS X" with icon POSIX file icon_path
+ activate
+ end tell
+end try
+EOM)"
+
+if [ -z "$INK_CACHE_DIR" ]; then
+ export INK_CACHE_DIR="${HOME}/.cache/inkscape"
+ mkdir -p "$INK_CACHE_DIR"
+ [ $_DEBUG ] && echo "INK_CACHE_DIR: falling back to $INK_CACHE_DIR"
+fi
+
+# Warn the user about time-consuming generation of fontconfig caches.
+if [ ! -f "${INK_CACHE_DIR}/.fccache-new" ]; then
+ alert_result=$(osascript -e "$ALERT_SCRIPT")
+ mkdir -p "$INK_CACHE_DIR"
+ touch "${INK_CACHE_DIR}/.fccache-new"
+fi
diff --git a/packaging/macosx/Resources/bin/getdisplay.sh b/packaging/macosx/Resources/bin/getdisplay.sh
deleted file mode 100755
index f7f383348..000000000
--- a/packaging/macosx/Resources/bin/getdisplay.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-#
-# Author: Aaron Voisine <aaron@voisine.org>
-
-if [ "$DISPLAY"x == "x" ]; then
- echo :0 > /tmp/display.$UID
-else
- echo $DISPLAY > /tmp/display.$UID
-fi
diff --git a/packaging/macosx/Resources/bin/gimp-wrapper.sh b/packaging/macosx/Resources/bin/gimp-wrapper.sh
new file mode 100755
index 000000000..4cddfcc3a
--- /dev/null
+++ b/packaging/macosx/Resources/bin/gimp-wrapper.sh
@@ -0,0 +1,96 @@
+#!/bin/bash
+#
+# simple gimp wrapper script for Inkscape.app
+#
+
+#_DEBUG=true
+
+# --- defaults for GIMP.app
+
+app_id="org.gnome.gimp"
+app_exec_default="GIMP"
+
+
+# --- defaults for gimp in $PATH
+
+# path for local gimp install
+PATH_local="/opt/local/bin"
+# launch a specific gimp version? (e.g. gimp-2.9)
+gimp_name="gimp"
+
+
+# --- unset environment inherited from Inkscape.app
+
+unset XDG_CONFIG_HOME XDG_DATA_HOME XDG_CACHE_HOME
+unset XDG_CONFIG_DIRS XDG_DATA_DIRS
+unset GTK_PATH GTK_DATA_PREFIX GTK_EXE_PREFIX GTK_IM_MODULE_FILE GTK2_RC_FILES
+unset FONTCONFIG_FILE FONTCONFIG_PATH HB_SHAPER_LIST PANGO_RC_FILE PANGO_SYSCONFDIR
+unset GDK_PIXBUF_MODULE_FILE GSETTINGS_SCHEMA_DIR
+unset DBUS_SESSION_BUS_PID DBUS_LAUNCHD_SESSION_BUS_SOCKET DBUS_SESSION_BUS_ADDRESS
+unset GNOME_VFS_MODULE_CONFIG_PATH GNOME_VFS_MODULE_PATH
+unset GIO_MODULE_DIR GVFS_MOUNTABLE_DIR
+unset ASPELL_CONF
+unset POPPLER_DATADIR
+unset VERSIONER_PYTHON_VERSION VERSIONER_PYTHON_PREFER_32_BIT PYTHONPATH
+unset MAGICK_HOME MAGICK_CONFIGURE_PATH MAGICK_CODER_FILTER_PATH MAGICK_CODER_MODULE_PATH
+unset GS_LIB GS_ICC_PROFILES GS_RESOURCE_DIR GS_LIB GS_FONTPATH GS
+
+
+# --- detect installed GIMP.app
+
+unset GIMP_APP
+
+APPLESCRIPT1="$(cat << EOM
+try
+ tell application "Finder"
+ set theApp to application file id "$app_id" as string
+ set theApp_path to POSIX path of theApp as string
+ return theApp_path
+ end tell
+end try
+EOM)"
+
+GIMP_APP="$(osascript -e "$APPLESCRIPT1")"
+
+
+# --- pass command line arguments to GIMP.app or gimp or exit
+
+if [ ! -z "$GIMP_APP" ]; then
+
+ app_exec="$(defaults read "${GIMP_APP}/Contents/Info.plist" CFBundleExecutable)"
+ [[ $? -ne 0 ]] && app_exec="$app_exec_default"
+
+ GIMP_APP_EXEC="${GIMP_APP}/Contents/MacOS/${app_exec}"
+
+ [ $_DEBUG ] && echo "GIMP.app found as: $GIMP_APP" 1>&2
+ [ $_DEBUG ] && echo "Command line arguments: $@" 1>&2
+ if [ $# -eq 1 ]; then
+ [ $_DEBUG ] && echo "open -a $GIMP_APP $@" 1>&2
+ open -a "$GIMP_APP" "$@"
+ else
+ [ $_DEBUG ] && echo "exec $GIMP_APP_EXEC $@" 1>&2
+ exec "$GIMP_APP_EXEC" "$@"
+ fi
+
+else # --- test for gimp installed in PATH
+
+ # remove CWD from path (we don't want to recursively call this script)
+ [ $_DEBUG ] && echo "orig PATH: $PATH" 1>&2
+ PATH_cleaned="$(echo $PATH | sed 's|'"$(cd "$(dirname "$0")" && pwd)"':||g')" || exit 1
+ [ $_DEBUG ] && echo "clean PATH: $PATH_cleaned" 1>&2
+ export PATH="$PATH_local:$PATH_cleaned"
+ [ $_DEBUG ] && echo "final PATH: $PATH" 1>&2
+
+ type -p "$gimp_name"
+
+ if [ $? -eq 0 ]; then
+ [ $_DEBUG ] && echo "gimp found in \$PATH: $PATH" 1>&2
+ [ $_DEBUG ] && echo "Command line arguments: $@" 1>&2
+ exec "$gimp_name" -n "$@"
+ else
+ echo "Giving up - couldn't find GIMP.app nor gimp." 1>&2
+ fi
+
+fi
+
+# eof
diff --git a/packaging/macosx/Resources/bin/inkscape b/packaging/macosx/Resources/bin/inkscape
index 486877fa4..775f94e5c 100755
--- a/packaging/macosx/Resources/bin/inkscape
+++ b/packaging/macosx/Resources/bin/inkscape
@@ -4,71 +4,103 @@
# Inkscape Modifications:
# Michael Wybrow <mjwybrow@users.sourceforge.net>
# Jean-Olivier Irisson <jo.irisson@gmail.com>
+# ~suv <suv-sf@users.sourceforge.net>
#
-CWD="`(cd \"\`dirname \\\"$0\\\"\`\"; echo \"$PWD\")`"
+[ -n "$INK_DEBUG_LAUNCHER" ] && set -x
+
+CWD="$(cd "$(dirname "$0")" && pwd)"
# e.g. /Applications/Inkscape.app/Contents/Resources/bin
-TOP="`dirname \"$CWD\"`"
+TOP="$(dirname "$CWD")"
# e.g. /Applications/Inkscape.app/Contents/Resources
+BASE="$(echo "$TOP" | sed -e 's/\/Contents\/Resources.*$//')"
+# e.g. /Applications/Inkscape.app
-
-# Brutally add many things to the PATH. If the directories do not exist, they won't be used anyway.
-# People should really use ~/.macosx/environment.plist to set environment variables as explained by Apple:
-# http://developer.apple.com/qa/qa2001/qa1067.html
-# but since no one does, we correct this by making the 'classic' PATH additions here:
-# /usr/local/bin which, though standard, doesn't seem to be in the PATH
-# newer python as recommended by MacPython http://www.python.org/download/mac/
-# Fink
-# MacPorts (former DarwinPorts)
-# LaTeX distribution for Mac OS X
-export PATH="/usr/texbin:/opt/local/bin:/sw/bin/:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/local/bin:$CWD:$PATH"
-
-# Put /usr/bin at beginning of path so we make sure we use Apple's python
-# over one that may be installed be Macports, Fink or some other means.
-export PATH="/usr/bin:$PATH"
-
-# On Snow Leopard, use the 32-bit version of python from Universal build.
-# This is because our bundled i386 python libraries are 32-bit only.
-export VERSIONER_PYTHON_VERSION=2.6
-export VERSIONER_PYTHON_PREFER_32_BIT=yes
-
+# FIXME: Inkscape needs better relocation support for OS X (get rid of the relative
+# path hack in src/path-prefix.h for osxapp-enabled builds). Until then, below change
+# of working directory is required:
+#
+# Due to changes after 0.48, we have change working directory in the script named 'inkscape':
+# recursive calls to inkscape from python-based extensions otherwise cause the app to hang or
+# fail (for python-based extensions, inkscape changes the working directory to the
+# script's directory, and inkscape launched by python script thus can't find resources
+# like the now essential 'units.xml' in INKSCAPE_UIDIR relative to the working directory).
+cd "$BASE" || exit 1
+
+# don't prepend to $PATH in recursive calls:
+if [ -z "$INK_PATH_ORIG" ]; then
+
+ # Brutally add many things to the PATH. If the directories do not exist, they won't be used anyway.
+ # the 'classic' PATH additions:
+ # /usr/local/bin which, though standard, doesn't seem to be in the PATH
+ # Fink
+ # MacPorts (former DarwinPorts)
+ # LaTeX distribution for Mac OS X
+ PATH_OTHER="/usr/texbin:/opt/local/bin:/sw/bin/:/usr/local/bin"
+
+ # Put /usr/bin at beginning of path so we make sure we use Apple's python
+ # over one that may be installed be Macports, Fink or some other means.
+ PATH_PYTHON="/usr/bin"
+
+ # Put $TOP/bin at beginning of path so we make sure that recursive calls
+ # to inkscape don't pull in other inkscape binaries with different setup.
+ # Also allows to override system python with custom wrapper script, and
+ # e.g. to support GIMP.app or gimp for external editing and GIMP XCF export.
+ PATH_pkgbin="$TOP/bin"
+
+ # save orig, new PATH
+ export INK_PATH_ORIG="$PATH"
+ export PATH="$PATH_pkgbin:$PATH_PYTHON:$PATH_OTHER:$INK_PATH_ORIG"
+fi
# Setup PYTHONPATH to use python modules shipped with Inkscape
-ARCH=`arch`
-PYTHON_VERS=`python -V 2>&1 | cut -c 8-10`
-export PYTHONPATH="$TOP/python/site-packages/$ARCH/$PYTHON_VERS"
-# NB: we are only preprending some stuff to the default python path so if the directory does not exist it should not harm the rest
-
-# No longer required if path rewriting has been conducted.
-# export DYLD_LIBRARY_PATH="$TOP/lib"
-
-mkdir -p "${HOME}/.inkscape-etc"
+OSXMINORNO="$(/usr/bin/sw_vers -productVersion | cut -d. -f2)"
+build_arch=__build_arch__
+if [ $OSXMINORNO -gt "5" ]; then
+ if [ $OSXMINORNO -eq "6" ]; then
+ export VERSIONER_PYTHON_VERSION=2.6
+ else # if [ $OSXMINORNO -ge "7" ]; then
+ export VERSIONER_PYTHON_VERSION=2.7
+ fi
+ if [ $build_arch = "i386" ]; then
+ export VERSIONER_PYTHON_PREFER_32_BIT=yes
+ else # build & runtime arch x86_64
+ export VERSIONER_PYTHON_PREFER_32_BIT=no
+ fi
+fi
+PYTHON_VERS="$(python -V 2>&1 | cut -c 8-10)"
+export PYTHONPATH="$TOP/lib/python$PYTHON_VERS/site-packages/"
export FONTCONFIG_PATH="$TOP/etc/fonts"
-export PANGO_RC_FILE="$HOME/.inkscape-etc/pangorc"
-export GTK_IM_MODULE_FILE="$HOME/.inkscape-etc/gtk.immodules"
-export GDK_PIXBUF_MODULE_FILE="$HOME/.inkscape-etc/gdk-pixbuf.loaders"
+export PANGO_RC_FILE="$TOP/etc/pango/pangorc"
+export PANGO_SYSCONFDIR="$TOP/etc"
+export GTK_IM_MODULE_FILE="$TOP/lib/gtk-2.0/__gtk_version__/immodules.cache"
+export GDK_PIXBUF_MODULE_FILE="$TOP/lib/gdk-pixbuf-2.0/__gtk_version__/loaders.cache"
export GTK_DATA_PREFIX="$TOP"
export GTK_EXE_PREFIX="$TOP"
+export GTK_PATH="$TOP"
export GNOME_VFS_MODULE_CONFIG_PATH="$TOP/etc/gnome-vfs-2.0/modules"
export GNOME_VFS_MODULE_PATH="$TOP/lib/gnome-vfs-2.0/modules"
+export GIO_USE_VFS="local"
+export GVFS_REMOTE_VOLUME_MONITOR_IGNORE=1
+export GVFS_DISABLE_FUSE=1
export XDG_DATA_DIRS="$TOP/share"
export ASPELL_CONF="prefix $TOP;"
+export POPPLER_DATADIR="$TOP/share/poppler"
+
+# no DBUS for now
+unset DBUS_LAUNCHD_SESSION_BUS_SOCKET
+unset DBUS_SESSION_BUS_ADDRESS
# Note: This requires the path with the exact ImageMagic version number.
-# Also, that ImageMagick will only work if it does not find a
-# version installed into the same PREFIX as it was originally
-# installed. Luckily, this is very unlikely given the extra long
-# and strangely named install prefix we use.
-# The actual version is inserted by the packaging script.
-export MAGICK_CONFIGURE_PATH="$TOP/lib/ImageMagick-IMAGEMAGICKVER/config:$TOP/share/ImageMagick-IMAGEMAGICKVER/config"
+# The actual version is inserted by the packaging script.
+export MAGICK_CONFIGURE_PATH="$TOP/lib/ImageMagick-IMAGEMAGICKVER/config:$TOP/share/ImageMagick-IMAGEMAGICKVER_MAJOR/config"
export MAGICK_CODER_FILTER_PATH="$TOP/lib/ImageMagick-IMAGEMAGICKVER/modules-Q16/filters"
export MAGICK_CODER_MODULE_PATH="$TOP/lib/ImageMagick-IMAGEMAGICKVER/modules-Q16/coders"
-export INKSCAPE_SHAREDIR="$TOP"
-# TODO: move the share directory to a its own folder to make things a bit cleaner in the app bundle
+export INKSCAPE_SHAREDIR="$TOP/share/inkscape"
export INKSCAPE_PLUGINDIR="$TOP/lib/inkscape"
-export INKSCAPE_LOCALEDIR="$TOP/locale"
+export INKSCAPE_LOCALEDIR="$TOP/share/locale"
# Handle the case where the directory storing Inkscape has special characters
# ('#', '&', '|') in the name. These need to be escaped to work properly for
@@ -77,38 +109,7 @@ ESCAPEDTOP=`echo "$TOP" | sed 's/#/\\\\\\\\#/' | sed 's/&/\\\\\\&/g' | sed 's/|/
# Set GTK theme (only if there is no .gtkrc-2.0 in the user's home)
if [[ ! -e "$HOME/.gtkrc-2.0" ]]; then
- # Appearance setting
- aquaStyle=`defaults read "Apple Global Domain" AppleAquaColorVariant 2>/dev/null`
- # 1 for aqua, 6 for graphite, inexistant if the default color was never changed
- if [[ "$aquaStyle" == "" ]]; then
- aquaStyle=1 # set aqua as default
- fi
-
- # Highlight Color setting
- hiliColor=`defaults read "Apple Global Domain" AppleHighlightColor 2>/dev/null`
- # a RGB value, with components between 0 and 1, also inexistant if it was not changed
- if [[ "$hiliColor" == "" ]]; then
- hiliColor="0.709800 0.835300 1.000000" # set blue as default
- fi
-
- # Menu items color
- if [[ aquaStyle -eq 1 ]]; then
- menuColor="#4a76cd" # blue
- else
- menuColor="#7c8da4" # graphite
- fi
- # Format highlight color as a GTK rgb value
- hiliColorFormated=`echo $hiliColor | awk -F " " '{print "\\\{"$1","$2","$3"\\\}"}'`
-
- # echo $menuColor
- # echo $hiliColorFormated
-
- # Modify the gtkrc
- # - with the correct colors
- # - to point to the correct scrollbars folder
- sed 's/OSX_HILI_COLOR_PLACEHOLDER/'$hiliColorFormated'/g' "$INKSCAPE_SHAREDIR/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/pre_gtkrc" | sed 's/OSX_MENU_COLOR_PLACEHOLDER/\"'$menuColor'\"/g' | sed 's/AQUASTYLE_PLACEHOLDER/'$aquaStyle'/g' | sed 's|${THEMEDIR}|'"$ESCAPEDTOP/themes/Clearlooks-Quicksilver-OSX/gtk-2.0|g" > "${HOME}/.inkscape-etc/gtkrc"
-
- export GTK2_RC_FILES="$HOME/.inkscape-etc/gtkrc"
+ export GTK2_RC_FILES="$ESCAPEDTOP/etc/gtk-2.0/gtkrc"
fi
# If the AppleCollationOrder preference doesn't exist, we fall back to using
@@ -116,12 +117,11 @@ fi
LANGSTR=`defaults read .GlobalPreferences AppleCollationOrder 2>/dev/null`
if [ "x$LANGSTR" == "x" -o "x$LANGSTR" == "xroot" ]
then
- echo "Warning: AppleCollationOrder setting not found, using AppleLocale." 1>&2
LANGSTR=`defaults read .GlobalPreferences AppleLocale 2>/dev/null | \
sed 's/_.*//'`
- echo "Setting LANGSTR from AppleLocale: $LANGSTR" 1>&2
+ [ $_DEBUG ] && echo "Setting LANGSTR from AppleLocale: $LANGSTR" 1>&2
else
- echo "Setting LANGSTR from AppleCollationOrder: $LANGSTR" 1>&2
+ [ $_DEBUG ] && echo "Setting LANGSTR from AppleCollationOrder: $LANGSTR" 1>&2
fi
# NOTE: Have to add ".UTF-8" to the LANG since omitting causes Inkscape
@@ -129,7 +129,7 @@ fi
if [ "x$LANGSTR" == "x" ]
then
# override broken script
- echo "Overriding empty LANGSTR" 1>&2
+ [ $_DEBUG ] && echo "Overriding empty LANGSTR" 1>&2
export LANG="en_US.UTF-8"
else
tmpLANG="`grep \"\`echo $LANGSTR\`_\" /usr/share/locale/locale.alias | \
@@ -137,22 +137,30 @@ else
if [ "x$tmpLANG" == "x" ]
then
# override broken script
- echo "Overriding empty LANG from /usr/share/locale/locale.alias" 1>&2
+ [ $_DEBUG ] && echo "Overriding empty LANG from /usr/share/locale/locale.alias" 1>&2
export LANG="en_US.UTF-8"
else
- echo "Setting LANG from /usr/share/locale/locale.alias" 1>&2
+ [ $_DEBUG ] && echo "Setting LANG from /usr/share/locale/locale.alias" 1>&2
export LANG="$tmpLANG.UTF-8"
fi
fi
-echo "Setting Language: $LANG" 1>&2
-
-sed 's|${HOME}|'"$HOME|g" "$TOP/etc/pango/pangorc" > "${HOME}/.inkscape-etc/pangorc"
-sed 's|${CWD}|'"$ESCAPEDTOP|g" "$TOP/etc/pango/pango.modules" \
- > "${HOME}/.inkscape-etc/pango.modules"
-cp -f "$TOP/etc/pango/pangox.aliases" "${HOME}/.inkscape-etc/"
-sed 's|${CWD}|'"$ESCAPEDTOP|g" "$TOP/etc/gtk-2.0/gtk.immodules" \
- > "${HOME}/.inkscape-etc/gtk.immodules"
-sed 's|${CWD}|'"$ESCAPEDTOP|g" "$TOP/etc/gtk-2.0/gdk-pixbuf.loaders" \
- > "${HOME}/.inkscape-etc/gdk-pixbuf.loaders"
-
-exec "$CWD/inkscape-bin" "$@"
+[ $_DEBUG ] && echo "Setting Language: $LANG" 1>&2
+export LC_ALL="$LANG"
+
+case "$INK_DEBUG" in
+ gdb)
+ EXEC="gdb --args" ;;
+ lldb)
+ EXEC="lldb -- " ;;
+ dtruss)
+ EXEC="dtruss" ;;
+ *)
+ EXEC="exec" ;;
+esac
+unset INK_DEBUG # ignore for recursive calls
+
+if [ "x$INK_DEBUG_SHELL" != "x" ]; then
+ exec bash
+else
+ $EXEC "$CWD/inkscape-bin" "$@"
+fi
diff --git a/packaging/macosx/Resources/bin/python-wrapper.sh b/packaging/macosx/Resources/bin/python-wrapper.sh
new file mode 100755
index 000000000..34cd75737
--- /dev/null
+++ b/packaging/macosx/Resources/bin/python-wrapper.sh
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+
+# ---------------------------------------------------------------------
+# a) to use PyGTK (for Sozi or inksmoto) from MacPorts
+# ---------------------------------------------------------------------
+
+# export PYTHONPATH="$INKSCAPE_SHAREDIR"/extensions
+#
+# # unset other environment variables used in Inkscape.app
+# unset DYLD_LIBRARY_PATH
+# unset XDG_CONFIG_DIRS XDG_DATA_DIRS
+# unset GTK_PATH GTK_DATA_PREFIX GTK_EXE_PREFIX GTK_IM_MODULE_FILE
+# unset FONTCONFIG_FILE FONTCONFIG_PATH HB_SHAPER_LIST PANGO_RC_FILE PANGO_SYSCONFDIR
+# unset GDK_PIXBUF_MODULE_FILE GSETTINGS_SCHEMA_DIR
+# unset DBUS_SESSION_BUS_PID DBUS_LAUNCHD_SESSION_BUS_SOCKET DBUS_SESSION_BUS_ADDRESS
+# unset GNOME_VFS_MODULE_CONFIG_PATH GNOME_VFS_MODULE_PATH
+# unset GIO_MODULE_DIR GVFS_MOUNTABLE_DIR
+# unset ASPELL_CONF
+# unset POPPLER_DATADIR
+# unset VERSIONER_PYTHON_VERSION VERSIONER_PYTHON_PREFER_32_BIT
+# unset MAGICK_HOME MAGICK_CONFIGURE_PATH MAGICK_CODER_FILTER_PATH MAGICK_CODER_MODULE_PATH
+# unset GS_LIB GS_ICC_PROFILES GS_RESOURCE_DIR GS_LIB GS_FONTPATH GS
+#
+# # set locale (language) explicitly
+# # (not needed with 0.48.5 package)
+# #export LANG="en_US.UTF-8"
+#
+# # set MacPorts prefix
+# LIBPREFIX="/opt/local"
+#
+# exec "$LIBPREFIX/bin/python" "$@"
+
+
+# ---------------------------------------------------------------------
+# b) to test different 32bit or 64bit system-provided Python versions
+# (available on Mac OS X 10.6 Snow Leopard and later versions)
+# ---------------------------------------------------------------------
+
+# # Python 2.5 (system) - Lion: 2.5.6
+# #exec /usr/bin/python2.5 "$@"
+# export VERSIONER_PYTHON_VERSION=2.5
+# export VERSIONER_PYTHON_PREFER_32_BIT=yes
+# exec /usr/bin/python "$@"
+
+# # Python 2.6 (system) - Lion: 2.6.7
+# #exec arch -i386 /usr/bin/python2.6 "$@"
+# export VERSIONER_PYTHON_VERSION=2.6
+# export VERSIONER_PYTHON_PREFER_32_BIT=yes
+# #export VERSIONER_PYTHON_PREFER_32_BIT=no
+# exec /usr/bin/python "$@"
+
+# # Python 2.7 (system) - Lion: 2.7.1
+# #exec arch -i386 /usr/bin/python2.7 "$@"
+# export VERSIONER_PYTHON_VERSION=2.7
+# export VERSIONER_PYTHON_PREFER_32_BIT=yes
+# #export VERSIONER_PYTHON_PREFER_32_BIT=no
+# exec /usr/bin/python "$@"
+
+
+# ---------------------------------------------------------------------
+# c) to test different 32bit or 64bit MacPorts-provided Python versions
+# (define $LIBPREFIX locally)
+# ---------------------------------------------------------------------
+
+# LIBPREFIX="/opt/local-x11"
+# exec "$LIBPREFIX/bin/python2.5" "$@"
+# #exec "$LIBPREFIX/bin/python2.6" "$@"
+# #exec "$LIBPREFIX/bin/python2.7" "$@"
+
+
+# ---------------------------------------------------------------------
+# d) ... otherwise run default python
+# ---------------------------------------------------------------------
+
+exec /usr/bin/python "$@"
+
+# eof
diff --git a/packaging/macosx/Resources/etc/fonts/fonts.conf b/packaging/macosx/Resources/etc/fonts/fonts.conf
index c8a008dab..316043814 100644
--- a/packaging/macosx/Resources/etc/fonts/fonts.conf
+++ b/packaging/macosx/Resources/etc/fonts/fonts.conf
@@ -24,12 +24,14 @@
<!-- Font directory list -->
<dir>/usr/share/fonts</dir>
- <dir>/usr/X11R6/lib/X11/fonts</dir>
+ <dir>/usr/X11/lib/X11/fonts</dir>
<dir>/opt/local/share/fonts</dir>
- <!-- <dir>/System/Library/Fonts</dir> -->
+ <dir>/System/Library/Fonts</dir>
<dir>/Network/Library/Fonts</dir>
<dir>/Library/Fonts</dir>
<dir>~/Library/Fonts</dir>
+ <dir prefix="xdg">fonts</dir>
+ <!-- the following element will be removed in the future -->
<dir>~/.fonts</dir>
<!--
@@ -39,7 +41,7 @@
<test qual="any" name="family">
<string>mono</string>
</test>
- <edit name="family" mode="assign">
+ <edit name="family" mode="assign" binding="same">
<string>monospace</string>
</edit>
</match>
@@ -51,7 +53,7 @@
<test qual="any" name="family">
<string>sans serif</string>
</test>
- <edit name="family" mode="assign">
+ <edit name="family" mode="assign" binding="same">
<string>sans-serif</string>
</edit>
</match>
@@ -63,7 +65,7 @@
<test qual="any" name="family">
<string>sans</string>
</test>
- <edit name="family" mode="assign">
+ <edit name="family" mode="assign" binding="same">
<string>sans-serif</string>
</edit>
</match>
@@ -75,6 +77,8 @@
<!-- Font cache directory list -->
+ <cachedir prefix="xdg">fontconfig</cachedir>
+ <!-- the following element will be removed in the future -->
<cachedir>~/.fontconfig</cachedir>
<config>
diff --git a/packaging/macosx/Resources/etc/gtk-2.0/gtkrc b/packaging/macosx/Resources/etc/gtk-2.0/gtkrc
new file mode 100644
index 000000000..5babb9b17
--- /dev/null
+++ b/packaging/macosx/Resources/etc/gtk-2.0/gtkrc
@@ -0,0 +1,20 @@
+#
+# gtkrc file for Inkscape.app (X11)
+#
+
+gtk-theme-name = "Adwaita"
+gtk-font-name = "Lucida Grande 9"
+
+gtk-icon-theme-name = "GtkStock"
+gtk-icon-sizes = "gtk-dialog=32,32:gtk-button=16,16:gtk-large-toolbar=24,24:gtk-small-toolbar=16,16:gtk-menu=16,16:inkscape-decoration=12,12"
+
+gtk-button-images = 0
+gtk-menu-images = 0
+gtk-toolbar-style = 0
+#gtk-toolbar-icon-size = 2
+
+# fix Adwaita theme for Inkscape's GimpSpinScale widgets
+style "spinbutton" {}
+widget_class "*GimpSpinScale*" style "spinbutton"
+
+# eof
diff --git a/packaging/macosx/Resources/openDoc b/packaging/macosx/Resources/openDoc
index fd37dd128..c2740c9b5 100755..100644
--- a/packaging/macosx/Resources/openDoc
+++ b/packaging/macosx/Resources/openDoc
@@ -1,17 +1,11 @@
-#!/bin/sh
+#!/bin/bash
#
# Author: Aaron Voisine <aaron@voisine.org>
# Inkscape Modifications: Michael Wybrow <mjwybrow@users.sourceforge.net>
+# Inkscape Modifications: ~suv <suv-sf@users.sourceforge.net>
-CWD="`dirname \"$0\"`"
+CWD="$(cd "$(dirname "$0")" && pwd)"
-# System version: 3 for Panther, 4 for Tiger, 5 for Leopard
-export VERSION=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 -d'.'`
+source "${CWD}/xdg_setup.sh"
-if [[ $VERSION -le 4 ]]; then
- export "DISPLAY=`cat /tmp/display.$UID`"
-fi
-
-BASE="`echo "$0" | sed -e 's/\/Contents\/Resources\/openDoc/\//'`"
-cd "$BASE"
exec "$CWD/bin/inkscape" "$@"
diff --git a/packaging/macosx/Resources/script b/packaging/macosx/Resources/script
index 62dcafdf5..a97d02486 100755
--- a/packaging/macosx/Resources/script
+++ b/packaging/macosx/Resources/script
@@ -1,54 +1,21 @@
-#!/bin/sh
+#!/bin/bash
#
# Author: Aaron Voisine <aaron@voisine.org>
# Inkscape Modifications: Michael Wybrow <mjwybrow@users.sourceforge.net>
+# Inkscape Modifications: ~suv <suv-sf@users.sourceforge.net>
-CWD=`dirname "$0"`
+#export _DEBUG=true
-# System version: 3 for Panther, 4 for Tiger, 5 for Leopard
-export VERSION=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 -d'.'`
+CWD="$(cd "$(dirname "$0")" && pwd)"
-# On Leopard, X11.app is installed by default, and will be started
-# automatically via launchd. On older systems, we need to start
-# X11 ourself.
+source "${CWD}/xdg_setup.sh"
+source "${CWD}/alert_fccache.sh"
-# For Panther and Tiger, start X11
-if [[ $VERSION -le 4 ]]; then
- # FIXME apparently this removes the xterm that starts with X
- # from xinitrc but when is it really used? Should we modify
- # the .xinitrc of the user without warning?
- ps -wx -ocommand | grep -e '[X]11' > /dev/null
- if [ "$?" != "0" -a ! -f "${HOME}/.xinitrc" ]; then
- echo "rm -f \"\${HOME}/.xinitrc\"" > "${HOME}/.xinitrc"
- sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> "${HOME}/.xinitrc"
- fi
-
- # Start X11 and get DISPLAY
- # FIXME: Insecure tmp file usage. Why do we have to copy this to /tmp anyway?
- cp -f "$CWD/bin/getdisplay.sh" /tmp/
- rm -f /tmp/display.$UID
- open-x11 /tmp/getdisplay.sh || \
- open -a XDarwin /tmp/getdisplay.sh || \
- echo ":0" > /tmp/display.$UID
-
- while [ "$?" == "0" -a ! -f /tmp/display.$UID ]; do
- sleep 1
- done
- export DISPLAY=`cat /tmp/display.$UID`
-
- ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11
-fi
-
-# Warn the user about time-consuming generation of fontconfig caches.
-test -f "${HOME}/.inkscape-etc/.fccache-new" || exit 12
-
-
-
-BASE=`echo "$0" | sed -e 's/\/Contents\/Resources\/script/\//'`
-cd "$BASE"
-exec "$CWD/bin/inkscape" "$@"
# TODO examine whether it would be wisest to move the code from inkscape shell
# script and getdisplay.sh to here and only keep the real binary in bin. This
# may make things easier on Leopard and may also help using Inkscape on the
# command line.
+#
+# See related FIXME in bin/inkscape for requirements to merge the two scripts.
+exec "$CWD/bin/inkscape" "$@"
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-down.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-down.png
deleted file mode 100644
index 62c0b41bd..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-down.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-left.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-left.png
deleted file mode 100644
index 0dff81db9..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-left.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-right.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-right.png
deleted file mode 100644
index 02ef8ee7a..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-right.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-up.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-up.png
deleted file mode 100644
index dba866012..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/stepper-up.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/trough-scrollbar-horiz.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/trough-scrollbar-horiz.png
deleted file mode 100644
index e978dfb9f..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/trough-scrollbar-horiz.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/trough-scrollbar-vert.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/trough-scrollbar-vert.png
deleted file mode 100644
index 4f128b323..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars/trough-scrollbar-vert.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/copy-slider.sh b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/copy-slider.sh
deleted file mode 100755
index 020e059bd..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/copy-slider.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-cp -f slider-vert.png slider-vert-prelight.png
-cp -f slider-vert.png slider-horiz-prelight.png
-cp -f slider-vert.png slider-horiz.png
-convert -rotate 90 slider-horiz.png slider-horiz.png
-convert -rotate 90 slider-horiz-prelight.png slider-horiz-prelight.png \ No newline at end of file
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-horiz-prelight.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-horiz-prelight.png
deleted file mode 100644
index 1ee4528ba..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-horiz-prelight.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-horiz.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-horiz.png
deleted file mode 100644
index 1ee4528ba..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-horiz.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-vert-prelight.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-vert-prelight.png
deleted file mode 100644
index 4fa68000c..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-vert-prelight.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-vert.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-vert.png
deleted file mode 100644
index 4fa68000c..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_1/slider-vert.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/copy-slider.sh b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/copy-slider.sh
deleted file mode 100755
index 020e059bd..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/copy-slider.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-cp -f slider-vert.png slider-vert-prelight.png
-cp -f slider-vert.png slider-horiz-prelight.png
-cp -f slider-vert.png slider-horiz.png
-convert -rotate 90 slider-horiz.png slider-horiz.png
-convert -rotate 90 slider-horiz-prelight.png slider-horiz-prelight.png \ No newline at end of file
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-horiz-prelight.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-horiz-prelight.png
deleted file mode 100644
index c0f7f3c3f..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-horiz-prelight.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-horiz.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-horiz.png
deleted file mode 100644
index c0f7f3c3f..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-horiz.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-vert-prelight.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-vert-prelight.png
deleted file mode 100644
index 9643f378e..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-vert-prelight.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-vert.png b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-vert.png
deleted file mode 100644
index 9643f378e..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/Scrollbars_6/slider-vert.png
+++ /dev/null
Binary files differ
diff --git a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/pre_gtkrc b/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/pre_gtkrc
deleted file mode 100644
index 171e73626..000000000
--- a/packaging/macosx/Resources/themes/Clearlooks-Quicksilver-OSX/gtk-2.0/pre_gtkrc
+++ /dev/null
@@ -1,547 +0,0 @@
-#
-# GTK theme to be used on Mac OS X, to mimic the appearance of Tiger
-#
-# Heavily based on Clearlooks-Quicksilver
-# Scrollbars from OSX-theme by Lauri Taimila (lauri@taimila.com)
-#
-# (c) 2007 JiHO <jo.irisson@gmail.com>.
-# GNU General Public License http://www.gnu.org/copyleft/gpl.html
-#
-
-pixmap_path "${THEMEDIR}"
-
-style "clearlooks-default"
-{
- GtkButton ::default_border = { 0, 0, 0, 0 }
- GtkRange ::trough_border = 0
- GtkPaned ::handle_size = 6
- GtkRange ::slider_width = 15
- GtkRange ::stepper_size = 15
- GtkScale ::slider-length = 23
- GtkScale ::trough-side-details = 1
- GtkScrollbar ::min_slider_length = 30
- GtkCheckButton ::indicator_size = 12
- GtkMenuBar ::internal-padding = 0
- GtkTreeView ::expander_size = 14
- GtkExpander ::expander_size = 16
-
- xthickness = 1
- ythickness = 1
-
- fg[NORMAL] = "#000000" # black
- fg[PRELIGHT] = "#000000" # black
- fg[SELECTED] = "#ffffff" # white
- fg[ACTIVE] = "#000000" # black
- fg[INSENSITIVE] = {0.6, 0.6, 0.6} # dark gray
-
- bg[NORMAL] = {0.95, 0.95, 0.95} # very light gray
- bg[PRELIGHT] = "#ffffff" # white
- bg[SELECTED] = OSX_MENU_COLOR_PLACEHOLDER # menu color
- bg[INSENSITIVE] = {0.9, 0.9, 0.9} # light gray
- bg[ACTIVE] = {0.85, 0.85, 0.85} # gray
-
- base[NORMAL] = "#ffffff" # white
- base[PRELIGHT] = OSX_MENU_COLOR_PLACEHOLDER # menu color
- base[ACTIVE] = {0.6, 0.6, 0.6} # dark gray
- base[SELECTED] = OSX_HILI_COLOR_PLACEHOLDER # highlight color
- base[INSENSITIVE] = {0.9, 0.9, 0.9} # light gray
-
- text[NORMAL] = "#000000" # black
- text[PRELIGHT] = "#000000" # black
- text[ACTIVE] = "#ffffff" # white
- text[SELECTED] = "#ffffff" # white
- text[INSENSITIVE] = {0.6, 0.6, 0.6} # dark gray
-
- engine "clearlooks"
- {
- colorize_scrollbar = FALSE #TRUE
- reliefstyle = 1
- menubarstyle = 0 # 0 = flat, 1 = sunken, 2 = flat gradient
- toolbarstyle = 0 # 0 = flat, 1 = enable effects
- animation = FALSE
- radius = 3.0 # 3.0 = default, 0.0 = sharp corners
- style = GUMMY # CLASSIC, GUMMY, GLOSSY
- }
-}
-
-
-style "clearlooks-wide" = "clearlooks-default"
-{
- xthickness = 2
- ythickness = 2
-}
-
-style "clearlooks-button" = "clearlooks-default"
-{
- xthickness = 3
- ythickness = 3
-
- bg[NORMAL] = "#f0f1f2" # a hint of blue...
-
- engine "clearlooks" {
- style = CLASSIC
- }
-}
-
-style "clearlooks-notebook" = "clearlooks-wide"
-{
- bg[NORMAL] = {0.93, 0.93, 0.93}
- bg[INSENSITIVE] = {0.93, 0.93, 0.93}
-}
-
-style "clearlooks-tasklist" = "clearlooks-default"
-{
- xthickness = 5
- ythickness = 3
-}
-
-style "clearlooks-menu" = "clearlooks-default"
-{
- xthickness = 2
- ythickness = 1
- bg[NORMAL] = "#ffffff"
-}
-
-style "clearlooks-menu-item" = "clearlooks-default"
-{
- xthickness = 0
- ythickness = 2
-
- fg[PRELIGHT] = "#ffffff"
- text[PRELIGHT] = "#ffffff"
- # We want PRELIGHT to be white for widgets, but coloured for the menu.
- bg[PRELIGHT] = OSX_MENU_COLOR_PLACEHOLDER
-
- # Radius of the menu items (inside menus)
- engine "clearlooks" {
- radius = 0.0
- }
-}
-
-style "clearlooks-menu-itembar" = "clearlooks-default"
-{
- xthickness = 3
- ythickness = 3
-}
-
-style "clearlooks-tree" = "clearlooks-default"
-{
- xthickness = 2
- ythickness = 2
-}
-
-style "clearlooks-frame-title" = "clearlooks-default"
-{
- fg[NORMAL] = "#404040"
-}
-
-style "clearlooks-tooltips" = "clearlooks-default"
-{
- xthickness = 4
- ythickness = 4
- bg[NORMAL] = { 1.0,1.0,0.75 }
-}
-
-style "clearlooks-progressbar" = "clearlooks-default"
-{
- xthickness = 1
- ythickness = 1
-
- fg[PRELIGHT] = "#ffffff"
-}
-
-style "clearlooks-combo" = "clearlooks-default"
-{
- xthickness = 2
- ythickness = 3
-}
-
-# Added pixmaps for scollbars
-style "scrollbar" = "default"
-{
- # The values I set here have to do with the relative size of three graphic elements
- # I have used: the slider, the arrow box, and the trough. They all have the same width
- # of 15 pixels, but gtk wants to put in some spacing between them. It seems like it
- # places the sliders inside the trough with a default 1 pixel border on either side of the slider,
- # so that the trough has its width stretched by an additional two pixels(?). Setting the
- # trough border makes the arrow box sit on top of the trough squarely, by making sure that
- # the trough stays the same width as the arrowbox(?). I could be totally wrong here.
- GtkRange::trough_border = 0
- GtkRange::slider_width = 15
-
- # This sets the size of the steppers (arrow buttons on the end of the scrollbar).
- # The image I am using is 15x15 pixels, and if I dont set this a one pixel line
- # gets cut off of the top of the "up" stepper.
- GtkRange::stepper_size = 15
-
- # Set a minimum length for the slider. Since I set the border on the slider
- # image to 15 pixels on either end of the slider I want the min length to be
- # at least 30 pixels to avoid an ugly slider when gtk wants to make it smaller
- # than 30 pixels.
- GtkScrollbar::min_slider_length = 30
-
- engine "pixmap"
- {
- # Horizontal slider background
- image
- {
- function = BOX
- recolorable = TRUE
- detail = "trough"
- file = "Scrollbars/trough-scrollbar-horiz.png"
- border = { 30, 30, 0, 0 }
- stretch = TRUE
- orientation = HORIZONTAL
- }
-
- # Vertical slider background
- image
- {
- function = BOX
- recolorable = TRUE
- detail = "trough"
- file = "Scrollbars/trough-scrollbar-vert.png"
- border = { 0, 0, 30, 30 }
- stretch = TRUE
- orientation = VERTICAL
- }
-
- # Normal horizontal slider
- image
- {
- function = SLIDER
- recolorable = TRUE
- state = NORMAL
- file = "Scrollbars_AQUASTYLE_PLACEHOLDER/slider-horiz.png"
- border = { 15, 15, 6, 6 }
- stretch = TRUE
- orientation = HORIZONTAL
- }
-
- # Horizontal slider (active)
- image
- {
- function = SLIDER
- recolorable = TRUE
- state = ACTIVE
- file = "Scrollbars_AQUASTYLE_PLACEHOLDER/slider-horiz-prelight.png"
- border = { 15, 15, 6, 6 }
- stretch = TRUE
- orientation = HORIZONTAL
- }
-
- # Horizontal slider (mouse over)
- image
- {
- function = SLIDER
- recolorable = TRUE
- state = PRELIGHT
- file = "Scrollbars_AQUASTYLE_PLACEHOLDER/slider-horiz-prelight.png"
- border = { 15, 15, 6, 6 }
- stretch = TRUE
- orientation = HORIZONTAL
- }
-
- # Horizontal slider (Insesitive)
- image
- {
- function = SLIDER
- recolorable = TRUE
- state = INSENSITIVE
- file = "Scrollbars_AQUASTYLE_PLACEHOLDER/slider-horiz.png"
- border = { 15, 15, 6, 6 }
- stretch = TRUE
- orientation = HORIZONTAL
- }
-
- # Normal vertical slider
- image
- {
- function = SLIDER
- recolorable = TRUE
- state = NORMAL
- file = "Scrollbars_AQUASTYLE_PLACEHOLDER/slider-vert.png"
- border = { 6, 6, 15, 15 }
- stretch = TRUE
- orientation = VERTICAL
- }
-
- # Vertical slider (Active)
- image
- {
- function = SLIDER
- recolorable = TRUE
- state = ACTIVE
- file = "Scrollbars_AQUASTYLE_PLACEHOLDER/slider-vert.png"
- border = { 6, 6, 15, 15 }
- stretch = TRUE
- orientation = VERTICAL
- }
-
- # Vertical slider (mouse over)
- image
- {
- function = SLIDER
- recolorable = TRUE
- state = PRELIGHT
- file = "Scrollbars_AQUASTYLE_PLACEHOLDER/slider-vert-prelight.png"
- border = { 6, 6, 15, 15 }
- stretch = TRUE
- orientation = VERTICAL
- }
-
- # Vertical slider (Insesitive)
- image
- {
- function = SLIDER
- recolorable = TRUE
- state = INSENSITIVE
- file = "Scrollbars_AQUASTYLE_PLACEHOLDER/slider-vert-prelight.png"
- border = { 6, 6, 15, 15 }
- stretch = TRUE
- orientation = VERTICAL
- }
-
-################################################################################
-# SCROLLBAR STEPPERS
-################################################################################
-
- # Up
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = NORMAL
- file = "Scrollbars/stepper-up.png"
- #border = { 12, 2, 2, 9 }
- stretch = TRUE
- arrow_direction = UP
- }
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = PRELIGHT
- file = "Scrollbars/stepper-up.png"
- #border = { 12, 2, 2, 9 }
- stretch = TRUE
- arrow_direction = UP
- }
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = ACTIVE
- file = "Scrollbars/stepper-up.png"
- #border = { 12, 2, 2, 9 }
- stretch = TRUE
- arrow_direction = UP
- }
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = INSENSITIVE
- file = "Scrollbars/stepper-up.png"
- #border = { 12, 2, 2, 9 }
- stretch = TRUE
- arrow_direction = UP
- }
-
- ######### DOWN ############
-
-
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = NORMAL
- file = "Scrollbars/stepper-down.png"
- #border = { 12, 2, 10, 2 }
- stretch = TRUE
- arrow_direction = DOWN
- }
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = PRELIGHT
- file = "Scrollbars/stepper-down.png"
- #border = { 12, 2, 10, 2 }
- stretch = TRUE
- arrow_direction = DOWN
- }
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = ACTIVE
- file = "Scrollbars/stepper-down.png"
- #border = { 12, 2, 10, 2 }
- stretch = TRUE
- arrow_direction = DOWN
- }
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = INSENSITIVE
- file = "Scrollbars/stepper-down.png"
- #border = { 12, 2, 10, 2 }
- stretch = TRUE
- arrow_direction = DOWN
- }
-
-############ RIGHT ################
-
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = NORMAL
- file = "Scrollbars/stepper-right.png"
- #border = { 2, 9, 2, 13 }
- stretch = TRUE
- arrow_direction = RIGHT
- }
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = PRELIGHT
- file = "Scrollbars/stepper-right.png"
- #border = { 2, 9, 2, 13 }
- stretch = TRUE
- arrow_direction = RIGHT
- }
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = ACTIVE
- file = "Scrollbars/stepper-right.png"
- #border = { 2, 9, 2, 13 }
- stretch = TRUE
- arrow_direction = RIGHT
- }
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = INSENSITIVE
- file = "Scrollbars/stepper-right.png"
- #border = { 2, 9, 2, 13 }
- stretch = TRUE
- arrow_direction = RIGHT
- }
-
-############### LEFT ###################
-
-
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = NORMAL
- file = "Scrollbars/stepper-left.png"
- #border = { 2, 9, 2, 13 }
- stretch = TRUE
- arrow_direction = LEFT
- }
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = PRELIGHT
- file = "Scrollbars/stepper-left.png"
- #border = { 2, 9, 2, 13 }
- stretch = TRUE
- arrow_direction = LEFT
- }
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = ACTIVE
- file = "Scrollbars/stepper-left.png"
- #border = { 2, 9, 2, 13 }
- stretch = TRUE
- arrow_direction = LEFT
- }
- image
- {
- function = STEPPER
- recolorable = TRUE
- state = INSENSITIVE
- file = "Scrollbars/stepper-left.png"
- #border = { 2, 9, 2, 13 }
- stretch = TRUE
- arrow_direction = LEFT
- }
- }
-}
-
-# widget styles
-class "GtkWidget" style "clearlooks-default"
-class "GtkButton" style "clearlooks-button"
-class "GtkCombo" style "clearlooks-button"
-class "GtkRange" style "clearlooks-wide"
-class "GtkFrame" style "clearlooks-wide"
-class "GtkMenu" style "clearlooks-menu"
-class "GtkEntry" style "clearlooks-button"
-class "GtkMenuItem" style "clearlooks-menu-item"
-class "GtkStatusbar" style "clearlooks-wide"
-class "GtkNotebook" style "clearlooks-notebook"
-class "GtkProgressBar" style "clearlooks-progressbar"
-class "GtkScrollbar" style "scrollbar"
-
-widget_class "*MenuItem.*" style "clearlooks-menu-item"
-
-# combobox stuff
-widget_class "*.GtkComboBox.GtkButton" style "clearlooks-combo"
-widget_class "*.GtkCombo.GtkButton" style "clearlooks-combo"
-
-# tooltips stuff
-widget_class "*.tooltips.*.GtkToggleButton" style "clearlooks-tasklist"
-widget "gtk-tooltips" style "clearlooks-tooltips"
-
-# treeview stuff
-widget_class "*.GtkTreeView.GtkButton" style "clearlooks-tree"
-widget_class "*.GtkCTree.GtkButton" style "clearlooks-tree"
-widget_class "*.GtkList.GtkButton" style "clearlooks-tree"
-widget_class "*.GtkCList.GtkButton" style "clearlooks-tree"
-widget_class "*.GtkFrame.GtkLabel" style "clearlooks-frame-title"
-
-# notebook stuff
-widget_class "*.GtkNotebook.*.GtkEventBox" style "clearlooks-notebook"
-widget_class "*.GtkNotebook.*.GtkViewport" style "clearlooks-notebook"
-
-# OS X uses 11 but due to differences in font smoothing, 10 actually integrates better
-gtk-font-name="Lucida Grande 10"
-
-# icon sizes: 48, 32, 24 (tango=22), 16
-#
-# gtk-dialog main icon in a dialog box: e.g. alert when file is not saved
-# gtk-dnd icon showed while dragging and dropping (not used on OS X)
-# gtk-button buttons: OK/Cancel dialogs, usually 22 but 16 is more OS X-ish
-# gtk-large-toolbar large toolbar: toolbox
-# gtk-small-toolbar small toolbar: command bar, tools control, snap control
-# gtk-menu menus in applications: File, Edit
-# panel-menu general Application/Places menu (not used on OS X)
-#
-# insckape-decoration layers lock, "affect" icons, etc.
-#
-#gtk-icon-sizes = "gtk-dialog=48,48:gtk-button=16,16:gtk-large-toolbar=22,22:gtk-small-toolbar=16,16:gtk-menu=16,16:inkscape-decoration=16,16"
-gtk-icon-sizes = "gtk-dialog=48,48:gtk-button=16,16:gtk-large-toolbar=24,24:gtk-small-toolbar=16,16:gtk-menu=16,16:inkscape-decoration=12,12"
-
-# use OS X default pdf-viewer for print preview
-gtk-print-preview-command="/usr/bin/open %f"
-
-# Whether images should be shown on buttons.
-# Default value: TRUE
-gtk-button-images = 0
-
-# Whether images should be shown in menus.
-gtk-menu-images = 0
-
-
diff --git a/packaging/macosx/Resources/xdg_setup.sh b/packaging/macosx/Resources/xdg_setup.sh
new file mode 100755
index 000000000..ec7fca648
--- /dev/null
+++ b/packaging/macosx/Resources/xdg_setup.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+export XDG_CACHE_HOME="${HOME}/.cache"
+export XDG_CONFIG_HOME="${HOME}/.config"
+export XDG_DATA_HOME="${HOME}/.local/share"
+
+mkdir -p "$XDG_CACHE_HOME"
+mkdir -p "$XDG_CONFIG_HOME"
+mkdir -p "$XDG_DATA_HOME"
+
+export INK_CACHE_DIR="${XDG_CACHE_HOME}/inkscape"
+mkdir -p "$INK_CACHE_DIR"
+