diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2014-10-24 05:01:09 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2014-10-24 05:01:09 +0000 |
| commit | f7d3d05a888af969102b8277fc2d92d39d7eea8f (patch) | |
| tree | e094c4ad8abc9e8b4660ce6f5ad9c03ea3dabdf6 /packaging/macosx/Resources | |
| parent | Initial removal of box3d outdated GTKish macros. (diff) | |
| download | inkscape-f7d3d05a888af969102b8277fc2d92d39d7eea8f.tar.gz inkscape-f7d3d05a888af969102b8277fc2d92d39d7eea8f.zip | |
Update for osx packaging (re merge review by bryce)
(bzr r13634.1.1)
Diffstat (limited to 'packaging/macosx/Resources')
| -rw-r--r--[-rwxr-xr-x] | packaging/macosx/Resources/alert_fccache.sh | 2 | ||||
| -rwxr-xr-x | packaging/macosx/Resources/bin/gimp-wrapper.sh | 33 | ||||
| -rwxr-xr-x | packaging/macosx/Resources/bin/inkscape | 8 | ||||
| -rwxr-xr-x | packaging/macosx/Resources/bin/python-wrapper.sh | 78 | ||||
| -rw-r--r-- | packaging/macosx/Resources/etc/gtk-2.0/gtkrc | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | packaging/macosx/Resources/openDoc | 6 | ||||
| -rwxr-xr-x | packaging/macosx/Resources/script | 6 | ||||
| -rw-r--r--[-rwxr-xr-x] | packaging/macosx/Resources/xdg_setup.sh | 2 |
8 files changed, 36 insertions, 101 deletions
diff --git a/packaging/macosx/Resources/alert_fccache.sh b/packaging/macosx/Resources/alert_fccache.sh index 50038b2ac..e39971def 100755..100644 --- a/packaging/macosx/Resources/alert_fccache.sh +++ b/packaging/macosx/Resources/alert_fccache.sh @@ -1,5 +1,3 @@ -#!/bin/bash - ALERT_SCRIPT="$(cat << EOM try set parent_path to "$CWD" diff --git a/packaging/macosx/Resources/bin/gimp-wrapper.sh b/packaging/macosx/Resources/bin/gimp-wrapper.sh index 4cddfcc3a..bbb4d6c6a 100755 --- a/packaging/macosx/Resources/bin/gimp-wrapper.sh +++ b/packaging/macosx/Resources/bin/gimp-wrapper.sh @@ -5,6 +5,22 @@ #_DEBUG=true +# --- unset environment inherited from inkscape.app +get_env_current () +{ + env | awk -F= '/[a-zA-Z_][a-zA-Z_0-9]*=/ {if (!system("[ -n \"${" $1 "+y}\" ]")) print $1 }' | sort | uniq +} + +if [ ! -z "$_env_orig" ]; then + keep_env=$_env_orig + for i in $(get_env_current); do + if [ -z "$(printf %s "$keep_env" | grep $i)" ]; then + unset $i + fi + done +fi + + # --- defaults for GIMP.app app_id="org.gnome.gimp" @@ -19,23 +35,6 @@ PATH_local="/opt/local/bin" 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 diff --git a/packaging/macosx/Resources/bin/inkscape b/packaging/macosx/Resources/bin/inkscape index 775f94e5c..8cb581a05 100755 --- a/packaging/macosx/Resources/bin/inkscape +++ b/packaging/macosx/Resources/bin/inkscape @@ -7,6 +7,12 @@ # ~suv <suv-sf@users.sourceforge.net> # +get_env_current () +{ + env | awk -F= '/[a-zA-Z_][a-zA-Z_0-9]*=/ {if (!system("[ -n \"${" $1 "+y}\" ]")) print $1 }' | sort | uniq +} +[ -z "$_env_orig" ] && export _env_orig="$(get_env_current)" + [ -n "$INK_DEBUG_LAUNCHER" ] && set -x CWD="$(cd "$(dirname "$0")" && pwd)" @@ -20,7 +26,7 @@ BASE="$(echo "$TOP" | sed -e 's/\/Contents\/Resources.*$//')" # 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': +# Due to changes after 0.48, we have to 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 diff --git a/packaging/macosx/Resources/bin/python-wrapper.sh b/packaging/macosx/Resources/bin/python-wrapper.sh deleted file mode 100755 index 34cd75737..000000000 --- a/packaging/macosx/Resources/bin/python-wrapper.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/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/gtk-2.0/gtkrc b/packaging/macosx/Resources/etc/gtk-2.0/gtkrc index 5babb9b17..76c9f3397 100644 --- a/packaging/macosx/Resources/etc/gtk-2.0/gtkrc +++ b/packaging/macosx/Resources/etc/gtk-2.0/gtkrc @@ -9,7 +9,7 @@ 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-menu-images = 1 gtk-toolbar-style = 0 #gtk-toolbar-icon-size = 2 diff --git a/packaging/macosx/Resources/openDoc b/packaging/macosx/Resources/openDoc index c2740c9b5..b2e58c114 100644..100755 --- a/packaging/macosx/Resources/openDoc +++ b/packaging/macosx/Resources/openDoc @@ -4,6 +4,12 @@ # Inkscape Modifications: Michael Wybrow <mjwybrow@users.sourceforge.net> # Inkscape Modifications: ~suv <suv-sf@users.sourceforge.net> +get_env_current () +{ + env | awk -F= '/[a-zA-Z_][a-zA-Z_0-9]*=/ {if (!system("[ -n \"${" $1 "+y}\" ]")) print $1 }' | sort | uniq +} +[ -z "$_env_orig" ] && export _env_orig="$(get_env_current)" + CWD="$(cd "$(dirname "$0")" && pwd)" source "${CWD}/xdg_setup.sh" diff --git a/packaging/macosx/Resources/script b/packaging/macosx/Resources/script index a97d02486..2bfe1d9ba 100755 --- a/packaging/macosx/Resources/script +++ b/packaging/macosx/Resources/script @@ -6,6 +6,12 @@ #export _DEBUG=true +get_env_current () +{ + env | awk -F= '/[a-zA-Z_][a-zA-Z_0-9]*=/ {if (!system("[ -n \"${" $1 "+y}\" ]")) print $1 }' | sort | uniq +} +[ -z "$_env_orig" ] && export _env_orig="$(get_env_current)" + CWD="$(cd "$(dirname "$0")" && pwd)" source "${CWD}/xdg_setup.sh" diff --git a/packaging/macosx/Resources/xdg_setup.sh b/packaging/macosx/Resources/xdg_setup.sh index ec7fca648..f37738210 100755..100644 --- a/packaging/macosx/Resources/xdg_setup.sh +++ b/packaging/macosx/Resources/xdg_setup.sh @@ -1,5 +1,3 @@ -#!/bin/bash - export XDG_CACHE_HOME="${HOME}/.cache" export XDG_CONFIG_HOME="${HOME}/.config" export XDG_DATA_HOME="${HOME}/.local/share" |
