#!/bin/bash # g4blgui - run g4beamline GUI # # This script must be run via an absolute pathname, using the # bin directory of the distribution. That implies that the # g4beamline-$VERSION/bin directory should be put into your PATH. # # If G4BL_DIR is set in the environment, then it is used instead of # the above. # # For the Wired event viewer, on Linux and Mac OS it must be linked # to $G4BL_DIR/Wired; on Windows it must be in C:\Wired. # find G4BL_DIR if test "$G4BL_DIR" = "" then G4BL_DIR=`dirname "$0"` G4BL_DIR=`\cd "$G4BL_DIR" >&- 2>&- && pwd` G4BL_DIR=`dirname "$G4BL_DIR"` if test -x /bin/cygpath then G4BL_DIR=`/bin/cygpath -m "$G4BL_DIR"` fi fi export G4BL_DIR echo G4BL_DIR=$G4BL_DIR JAVAOPTS='' case `uname -s` in Darwin*) JAVAOPTS="-Xdock:icon=$G4BL_DIR/share/g4beamline/g4blicon.icns" ;; Linux*) ;; CYGWIN*) ;; esac # handle input.file as an argument (need full path) INPUT='' if test ! -z "$1" then if test "${1#/}" = "$1" -a "${1#?:}" = "$1" then INPUT="$PWD/$1" else INPUT="$1" fi if test -x /bin/cygpath then INPUT=`/bin/cygpath -m $INPUT` fi fi java $JAVAOPTS -cp "$G4BL_DIR/share/g4beamline" G4blGui "$INPUT"