OSX: Launcher script cleanup; makes changing python version easier
svn: r17856
This commit is contained in:
parent
7aef6906b4
commit
03428749b3
@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
name="`basename $0`"
|
name="`basename $0`"
|
||||||
tmp="`pwd`/$0"
|
tmp="$0"
|
||||||
tmp=`dirname "$tmp"`
|
tmp=`dirname "$tmp"`
|
||||||
tmp=`dirname "$tmp"`
|
tmp=`dirname "$tmp"`
|
||||||
bundle=`dirname "$tmp"`
|
bundle=`dirname "$tmp"`
|
||||||
@ -14,37 +13,33 @@ bundle_etc="$bundle_res"/etc
|
|||||||
|
|
||||||
export XDG_DATA_DIRS="$bundle_data"
|
export XDG_DATA_DIRS="$bundle_data"
|
||||||
|
|
||||||
|
export PATH="$bundle_contents"/MacOS
|
||||||
export DYLD_LIBRARY_PATH="$bundle_lib"
|
export DYLD_LIBRARY_PATH="$bundle_lib"
|
||||||
export LD_LIBRARY_PATH="$DYLD_LIBRARY_PATH"
|
export LD_LIBRARY_PATH="$DYLD_LIBRARY_PATH"
|
||||||
export GTK_DATA_PREFIX="$bundle_res"
|
export GTK_DATA_PREFIX="$bundle_res"
|
||||||
export GTK_EXE_PREFIX="$bundle_res"
|
export GTK_EXE_PREFIX="$bundle_res"
|
||||||
export GTK_PATH="$bundle_res"
|
export GTK_PATH="$bundle_res"
|
||||||
|
|
||||||
export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
|
|
||||||
export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
|
|
||||||
export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
|
|
||||||
export PANGO_RC_FILE="$bundle_etc/pango/pangorc"
|
export PANGO_RC_FILE="$bundle_etc/pango/pangorc"
|
||||||
|
export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
|
||||||
|
export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
|
||||||
|
export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
|
||||||
export GVBINDIR="$bundle_lib/graphviz"
|
export GVBINDIR="$bundle_lib/graphviz"
|
||||||
|
|
||||||
|
|
||||||
#Set $PYTHON to point inside the bundle
|
#Set $PYTHON to point inside the bundle
|
||||||
|
PYVER=2.6
|
||||||
export PYTHON="$bundle_contents/MacOS/python"
|
export PYTHON="$bundle_contents/MacOS/python"
|
||||||
#Add the bundle's python modules
|
export PYTHONHOME="$bundle_res"
|
||||||
PYTHONPATH="$bundle_lib/python2.6:$PYTHONPATH"
|
export PYTHONPATH="$bundle_lib/python$PYVER/site-packages/gtk-2.0:$PYTHONPATH"
|
||||||
PYTHONPATH="$bundle_lib/python2.6/site-packages:$PYTHONPATH"
|
|
||||||
PYTHONPATH="$bundle_lib/python2.6/site-packages/gtk-2.0:$PYTHONPATH"
|
|
||||||
PYTHONPATH="$bundle_lib/python2.6/lib-dynload:$PYTHONPATH"
|
|
||||||
#Add our program's modules to $PYTHONPATH.
|
|
||||||
PYTHONPATH="$bundle_lib/pygtk/2.0:$PYTHONPATH"
|
|
||||||
export PYTHONPATH
|
|
||||||
export GRAMPSDIR="$bundle_data"/gramps
|
export GRAMPSDIR="$bundle_data"/gramps
|
||||||
export GRAMPSI18N="$bundle_data"/locale
|
export GRAMPSI18N="$bundle_data"/locale
|
||||||
export GRAMPSHOME="$HOME/Library/Application Support"
|
export GRAMPSHOME="$HOME/Library/Application Support"
|
||||||
|
|
||||||
# Strip out the argument added by the OS.
|
# Strip out the argument added by the OS.
|
||||||
if [ x`echo "x$1" | sed -e "s/^x-psn_.*//"` == x ]; then
|
if [ x`echo "x$1" | /usr/bin/sed -e "s/^x-psn_.*//"` == x ]; then
|
||||||
shift 1
|
shift 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Note that we're calling $PYTHON here to override the version in
|
|
||||||
#pygtk-demo's shebang.
|
|
||||||
exec $PYTHON -O "$GRAMPSDIR/gramps.py" "$@"
|
exec $PYTHON -O "$GRAMPSDIR/gramps.py" "$@"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user