Uses GRAMPS_RESOURCES to override the root location of the Gramps data files (which would normally be $(prefix)/share). In setup.py install, writes $(prefix)/share to gen/utils/resource-path, installs that file, then deletes it again from the source tree. The presence or absence determines whether Gramps is running from the source directory or from an installation. Const.py is now a static file; const.py.in is no longer used. Note that because importing const into setup tried to initialize things that we don't want initialized, VERSION is removed, and imported from gramps.version -- a file which will be added in the next change. Consequently, this commit will not run. svn: r21613
		
			
				
	
	
		
			48 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh
 | 
						|
name="`basename $0`"
 | 
						|
tmp="$0"
 | 
						|
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"
 | 
						|
 | 
						|
export PATH="$bundle_contents"/MacOS:/bin:/usr/bin
 | 
						|
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"
 | 
						|
export PANGO_SYSCONFDIR="$bundle_etc"
 | 
						|
export PANGO_LIBDIR="$bundle_lib"
 | 
						|
export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-3.0/gdk-pixbuf.loaders"
 | 
						|
export GTK_IM_MODULE_FILE="$bundle_etc/gtk-3.0/gtk.immodules"
 | 
						|
export GI_TYPELIB_PATH="$bundle_lib/girepository-1.0"
 | 
						|
export GVBINDIR="$bundle_lib/graphviz"
 | 
						|
 | 
						|
 | 
						|
#Set $PYTHON to point inside the bundle
 | 
						|
PYVER=2.7
 | 
						|
export PYTHON="$bundle_contents/MacOS/python"
 | 
						|
export PYTHONHOME="$bundle_res"
 | 
						|
 | 
						|
export GRAMPSDIR="$bundle_lib/python$PYVER/site-packages/gramps"
 | 
						|
export GRAMPSI18N="$bundle_data"/locale
 | 
						|
export GRAMPS_RESOURCES="$bundle_data"
 | 
						|
export GRAMPSHOME="$HOME/Library/Application Support"
 | 
						|
 | 
						|
# Strip out the argument added by the OS.
 | 
						|
if /bin/expr "x$1" : '^x-psn_' > /dev/null; then
 | 
						|
    shift 1
 | 
						|
fi
 | 
						|
exec "$PYTHON" -O "$bundle_contents/MacOS/Gramps-bin" "$@"
 | 
						|
 |