| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # -*-shell-script-*- |
| 3 | # coot wrapper script |
| 4 | # Copyright 2004, 2005, 2006 Paul Emsley, University of York |
| 5 | |
| 6 | # |
| 7 | current_exe_dir=`dirnamescip-shell system . . dirname. $0` |
| 8 | echoscip-shell system . . echo. current_exe_dir is $current_exe_dir |
| 9 | |
| 10 | if [scip-shell system . . `[`. $current_exe_dir = . ] ; then |
| 11 | COOT_PREFIX=`dirnamescip-shell system . . dirname. $PWD` |
| 12 | else |
| 13 | COOT_PREFIX=`dirnamescip-shell system . . dirname. "$current_exe_dir"` |
| 14 | fi |
| 15 | |
| 16 | # echo COOT_PREFIX is $COOT_PREFIX |
| 17 | |
| 18 | |
| 19 | |
| 20 | # ---------------------------------------------------------------------------- |
| 21 | # ---------------------------------------------------------------------------- |
| 22 | # If the COOT_PREFIX is correct, then these should not need modification |
| 23 | # i.e. nothing below here need be changed. |
| 24 | # ---------------------------------------------------------------------------- |
| 25 | # ---------------------------------------------------------------------------- |
| 26 | # |
| 27 | prefix=$COOT_PREFIX |
| 28 | PATH=$COOT_PREFIX/bin:$PATH |
| 29 | |
| 30 | SYMINFO=$COOT_PREFIX/share/coot/syminfo.lib |
| 31 | COOT_SCHEME_DIR=$COOT_PREFIX/share/coot/scheme |
| 32 | # COOT_REFMAC_LIB_DIR=$COOT_PREFIX/share/coot/lib |
| 33 | COOT_STANDARD_RESIDUES=$COOT_PREFIX/share/coot/standard-residues.pdb |
| 34 | COOT_PIXMAPS_DIR=$COOT_PREFIX/share/coot/pixmaps |
| 35 | COOT_DATA_DIR=$COOT_PREFIX/share/coot |
| 36 | COOT_RESOURCES_FILE=$COOT_PREFIX/share/coot/cootrc |
| 37 | COOT_REF_STRUCTS=$COOT_PREFIX/share/coot/reference-structures |
| 38 | PYTHONPATH=$COOT_PREFIX/share/coot/python |
| 39 | if [scip-shell system . . `[`. -z "$PYTHONPATH" ] ; then |
| 40 | PYTHONPATH=$COOT_PREFIX/share/coot/python |
| 41 | else |
| 42 | PYTHONPATH=${PYTHONPATH}:$COOT_PREFIX/share/coot/python |
| 43 | fi |
| 44 | |
| 45 | GUILE_LOAD_PATH=\ |
| 46 | $COOT_PREFIX/share/guile/1.6:$COOT_PREFIX/share/guile:$COOT_PREFIX/share/guile/gtk-1.2:$COOT_PREFIX/share/guile/gui:$COOT_PREFIX/share/guile/www:$COOT_PREFIX/share/guile/site |
| 47 | GUILE_WARN_DEPRECATED=no |
| 48 | |
| 49 | if [scip-shell system . . `[`. -n "$LOCAL_GUILE_LOAD_PATH_EXTRAS" ] ; then |
| 50 | GUILE_LOAD_PATH=${LOCAL_GUILE_LOAD_PATH_EXTRAS}:$GUILE_LOAD_PATH |
| 51 | fi |
| 52 | |
| 53 | # echo GUILE_LOAD_PATH is now $GUILE_LOAD_PATH |
| 54 | |
| 55 | systype=`unamescip-shell system . . uname.` |
| 56 | |
| 57 | if [scip-shell system . . `[`. $systype = Linux ] ; then |
| 58 | if [scip-shell system . . `[`. -z "$LD_LIBRARY_PATH" ] ; then |
| 59 | LD_LIBRARY_PATH=$COOT_PREFIX/lib |
| 60 | else |
| 61 | LD_LIBRARY_PATH=$COOT_PREFIX/lib:${LD_LIBRARY_PATH} |
| 62 | fi |
| 63 | fi |
| 64 | |
| 65 | # some (Intel, I supose) Mac users may need to change |
| 66 | # DYLD_LIBRARY_PATH to DYLD_FALLBACK_LIBRARY_PATH, if running into |
| 67 | # problems with Framwork jpeg libraries (don't forget the export |
| 68 | # at the end too). |
| 69 | # |
| 70 | if [scip-shell system . . `[`. $systype = Darwin ] ; then |
| 71 | if [scip-shell system . . `[`. -z "$DYLD_LIBRARY_PATH" ] ; then |
| 72 | DYLD_LIBRARY_PATH=$COOT_PREFIX/lib |
| 73 | else |
| 74 | DYLD_LIBRARY_PATH=$COOT_PREFIX/lib:${DYLD_LIBRARY_PATH} |
| 75 | fi |
| 76 | fi |
| 77 | |
| 78 | |
| 79 | export SYMINFO |
| 80 | export COOT_PREFIX |
| 81 | export COOT_STANDARD_RESIDUES |
| 82 | # export COOT_REFMAC_LIB_DIR |
| 83 | export PYTHONPATH |
| 84 | export COOT_SCHEME_DIR |
| 85 | export COOT_REF_STRUCTS |
| 86 | export COOT_RESOURCES_FILE |
| 87 | export COOT_PIXMAPS_DIR |
| 88 | export COOT_DATA_DIR |
| 89 | export GUILE_LOAD_PATH |
| 90 | export DYLD_LIBRARY_PATH |
| 91 | export LD_LIBRARY_PATH |
| 92 | export LD_LIBRARYN32_PATH |
| 93 | |
| 94 | $COOT_PREFIX/libexec/coot-findligand-bin $* |