3 # Inherited from gtk-mac-bundler example launcher script
4 # Where we get the paths from
11 bundle=$(cd "$dirn/../../" && pwd)
12 bundle_contents="$bundle"/Contents
13 bundle_res="$bundle_contents"/Resources
14 bundle_lib="$bundle_res"/lib
15 bundle_bin="$bundle_res"/bin
16 bundle_data="$bundle_res"/share
17 bundle_etc="$bundle_res"/etc
19 export PATH="$bundle_bin:$PATH"
21 export PATH="$bundle_contents/MacOS/:$PATH"
23 chmod -R +x $bundle_bin
25 # Use fallback instead of normal dlyd path, may not be required
26 export DYLD_FALLBACK_LIBRARY_PATH="$bundle_lib:$DYLD_FALLBACK_LIBRARY_PATH"
28 # Help fontconfig find its configuration file
29 export FONTCONFIG_FILE="$bundle_etc/fonts/fonts.conf"
31 # Help gdk find its loader modules
32 export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
34 # Fix for the theme engine paths
35 export GTK_PATH="$bundle_lib/gtk-2.0/2.10.0"
37 # GTK path no longer required
38 export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
40 # Fix the gegl path issue
41 export GEGL_PATH="$bundle_lib/gegl-0.2"
44 export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
46 # set as absolute directory to find GTK resources internally, thanks GIMP.
47 LNDIR=/tmp/skl/XBoard.app
48 if [ ! -e "$LNDIR/Contents/Resources/launcher_rc" ]; then
52 ln -s "$bundle" "$LNDIR"
55 # set the working directory to users home
59 # Strip out arguments added by the OS
60 if [ x`echo "x$1" | sed -e "s/^x-psn_.*//"` == x ]; then
64 if [ "x$GTK_DEBUG_SHELL" != "x" ]; then
68 $EXEC "$bundle_contents/MacOS/xboard-bin" "$@"