2010-12-28 04:12:13 +05:30
|
|
|
#!/bin/sh
|
2011-06-07 21:32:53 +05:30
|
|
|
name="`basename $0`"
|
2011-06-29 00:24:52 +05:30
|
|
|
tmp="$0"
|
2011-06-07 21:32:53 +05:30
|
|
|
tmp=`dirname "$tmp"`
|
|
|
|
tmp=`dirname "$tmp"`
|
|
|
|
bundle=`dirname "$tmp"`
|
|
|
|
bundle_contents="$bundle"/Contents
|
|
|
|
bundle_res="$bundle_contents"/Resources
|
|
|
|
bundle_lib="$bundle_res"/lib
|
|
|
|
bundle_bin="$bundle_res"/bin
|
|
|
|
bundle_data="$bundle_res"/share
|
|
|
|
bundle_etc="$bundle_res"/etc
|
|
|
|
|
|
|
|
export XDG_DATA_DIRS="$bundle_data"
|
|
|
|
|
2012-04-11 04:33:09 +05:30
|
|
|
export PATH="$bundle_contents"/MacOS:/bin:/usr/bin
|
2011-06-07 21:32:53 +05:30
|
|
|
export DYLD_LIBRARY_PATH="$bundle_lib"
|
|
|
|
export LD_LIBRARY_PATH="$DYLD_LIBRARY_PATH"
|
|
|
|
export GTK_DATA_PREFIX="$bundle_res"
|
|
|
|
export GTK_EXE_PREFIX="$bundle_res"
|
|
|
|
export GTK_PATH="$bundle_res"
|
|
|
|
|
|
|
|
export PANGO_RC_FILE="$bundle_etc/pango/pangorc"
|
2012-10-31 00:07:42 +05:30
|
|
|
export PANGO_SYSCONFDIR="$bundle_etc"
|
|
|
|
export PANGO_LIBDIR="$bundle_lib"
|
2015-05-03 05:50:56 +05:30
|
|
|
export GDK_PIXBUF_MODULE_FILE="$bundle_lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
|
2014-02-02 02:41:15 +05:30
|
|
|
if [ `uname -r | cut -d . -f 1` -ge 10 ]; then
|
|
|
|
export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
|
|
|
|
fi
|
2011-06-29 00:24:52 +05:30
|
|
|
export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
|
2011-06-29 00:24:40 +05:30
|
|
|
export GVBINDIR="$bundle_lib/graphviz"
|
2011-06-07 21:32:53 +05:30
|
|
|
|
2011-06-29 00:24:52 +05:30
|
|
|
|
2011-06-07 21:32:53 +05:30
|
|
|
#Set $PYTHON to point inside the bundle
|
2012-01-29 07:15:16 +05:30
|
|
|
PYVER=2.7
|
2011-06-07 21:32:53 +05:30
|
|
|
export PYTHON="$bundle_contents/MacOS/python"
|
2011-06-29 00:24:52 +05:30
|
|
|
export PYTHONHOME="$bundle_res"
|
2012-01-29 07:15:16 +05:30
|
|
|
PYTHONPATH="$bundle_lib/python$PYVER/site-packages/pyenchant-1.6.1-py$PYVER.egg:$PYTHONPATH"
|
2011-06-29 00:24:52 +05:30
|
|
|
export PYTHONPATH="$bundle_lib/python$PYVER/site-packages/gtk-2.0:$PYTHONPATH"
|
|
|
|
|
2011-06-07 21:32:53 +05:30
|
|
|
export GRAMPSDIR="$bundle_data"/gramps
|
|
|
|
export GRAMPSI18N="$bundle_data"/locale
|
2015-04-26 05:14:23 +05:30
|
|
|
export USERPROFILE="$HOME"
|
|
|
|
export APPDATA="$HOME/Library/Application Support"
|
2011-06-07 21:32:53 +05:30
|
|
|
|
|
|
|
# Strip out the argument added by the OS.
|
2012-01-29 07:15:16 +05:30
|
|
|
if /bin/expr "x$1" : '^x-psn_' > /dev/null; then
|
2011-06-07 21:32:53 +05:30
|
|
|
shift 1
|
|
|
|
fi
|
2012-01-29 07:15:16 +05:30
|
|
|
exec "$PYTHON" -O "$GRAMPSDIR/gramps.py" "$@"
|
2011-06-29 00:24:52 +05:30
|
|
|
|