|
| 1 | +#!/bin/csh |
| 2 | +# |
| 3 | +# ######################################################### |
| 4 | +# ## ## |
| 5 | +# ## csh Initialization Script for Tinker-FFE on MacOS ## |
| 6 | +# ## ## |
| 7 | +# ######################################################### |
| 8 | +# |
| 9 | +# This is a csh/tcsh script to set environment variables |
| 10 | +# needed to run Force Field Explorer at the command line |
| 11 | +# |
| 12 | +# Note FFE_HOME and TINKER_HOME are special directory names |
| 13 | +# needed by the Force Field Explorer application |
| 14 | +# |
| 15 | + |
| 16 | +# |
| 17 | +# Set Tinker-FFE installation directory |
| 18 | +# |
| 19 | +setenv INSTALLDIR "$HOME/Tinker-FFE" |
| 20 | + |
| 21 | +# |
| 22 | +# Set location of FFE, Tinker, JRE and FFE libraries |
| 23 | +# |
| 24 | +setenv FFE_HOME "$INSTALLDIR/ffe" |
| 25 | +setenv TINKER_HOME "$INSTALLDIR/tinker" |
| 26 | +setenv JRE_HOME "$INSTALLDIR/.install4j/jre.bundle/Contents/Home/jre" |
| 27 | +setenv FFE_LIB "$FFE_HOME/lib" |
| 28 | +setenv FFE_NATIVE "$FFE_HOME/native" |
| 29 | + |
| 30 | +# |
| 31 | +# Set location of system-dependent MacOS library |
| 32 | +# |
| 33 | +setenv OS_LIB "$FFE_NATIVE/macos/libffe.jnilib" |
| 34 | + |
| 35 | +# |
| 36 | +# Append the Tinker binaries to default PATH |
| 37 | +# |
| 38 | +if !($?PATH) then |
| 39 | + setenv PATH "$TINKER_HOME/bin" |
| 40 | +else |
| 41 | + setenv PATH "$TINKER_HOME/bin:$PATH" |
| 42 | +endif |
| 43 | + |
| 44 | +# |
| 45 | +# Set LD_LIBRARY_PATH environment variable |
| 46 | +# |
| 47 | +if !($?LD_LIBRARY_PATH) then |
| 48 | + setenv LD_LIBRARY_PATH "$JRE_HOME/lib/server:$JRE_HOME/lib" |
| 49 | +else |
| 50 | + setenv LD_LIBRARY_PATH "$JRE_HOME/lib/server:$JRE_HOME/lib:LD_LIBRARY_PATH" |
| 51 | +endif |
| 52 | + |
| 53 | +# |
| 54 | +# Add required JAR files to CLASSPATH variable |
| 55 | +# |
| 56 | +if !($?CLASSPATH) then |
| 57 | + setenv CLASSPATH "$FFE_LIB/AppleJavaExtensions-1.6.jar:$FFE_LIB/commons-io-2.6.jar:$FFE_LIB/commons-lang-2.7.jar:$FFE_LIB/commons-logging-1.3.jar:$FFE_LIB/ffe-8.8.jar:$FFE_LIB/gluegen-rt-android-natives-macosx-universal.jar:$FFE_LIB/gluegen-rt.jar:$FFE_LIB/gluegen.jar:$FFE_LIB/groovy-all-2.4.4.jar:$FFE_LIB/j3dcore-1.7.jar:$FFE_LIB/j3dutils-1.7.jar:$FFE_LIB/jh-2.0.5.jar:$FFE_LIB/joal-natives-macosx-universal.jar:$FFE_LIB/joal.jar:$FFE_LIB/jogl-all-noawt-natives-macosx-universal.jar:$FFE_LIB/jogl-all.jar:$FFE_LIB/sunjce_provider.jar:$FFE_LIB/vecmath-1.7.jar:$OS_LIB" |
| 58 | +else |
| 59 | + setenv CLASSPATH "$FFE_LIB/AppleJavaExtensions-1.6.jar:$FFE_LIB/commons-io-2.6.jar:$FFE_LIB/commons-lang-2.7.jar:$FFE_LIB/commons-logging-1.3.jar:$FFE_LIB/ffe-8.8.jar:$FFE_LIB/gluegen-rt-android-natives-macosx-universal.jar:$FFE_LIB/gluegen-rt.jar:$FFE_LIB/gluegen.jar:$FFE_LIB/groovy-all-2.4.4.jar:$FFE_LIB/j3dcore-1.7.jar:$FFE_LIB/j3dutils-1.7.jar:$FFE_LIB/jh-2.0.5.jar:$FFE_LIB/joal-natives-macosx-universal.jar:$FFE_LIB/joal.jar:$FFE_LIB/jogl-all-noawt-natives-macosx-universal.jar:$FFE_LIB/jogl-all.jar:$FFE_LIB/sunjce_provider.jar:$FFE_LIB/vecmath-1.7.jar:$OS_LIB:$CLASSPATH" |
| 60 | +endif |
| 61 | + |
| 62 | +# |
| 63 | +# Create an alias to execute Force Field Explorer |
| 64 | +# |
| 65 | +#alias ffe "java -server -ms2048M -mx4096M -Djava.library.path=$FFE_LIB -Dtinker.dir=$TINKER_HOME -jar $FFE_LIB/ffe-8.8.jar" |
| 66 | +alias ffe "$FFE_HOME/Force*Field*Explorer.app/Contents/MacOS/JavaApplicationStub" |
0 commit comments