#!/bin/sh
appname=`basename $0 | sed s,\.sh$,,`

dirname=`dirname $0`
tmp="${dirname#?}"

if [ "${dirname%$tmp}" != "/" ]; then
dirname=$PWD
fi

LD_LIBRARY_PATH=$dirname
#LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.8/targets/x86_64-linux/lib
#LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/xtgeo/cudnn/cudnn-linux-x86_64-8.9.6.50_cuda11-archive/lib
#LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/xtgeo/libtorch/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$dirname/libtorch/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$dirname/libaws

export LD_LIBRARY_PATH


#LD_LIBRARY_PATH=$dirname
#export LD_LIBRARY_PATH

export QT_PLUGIN_PATH=$dirname/plugins

export PHOENIX_INSTALLDIR=$dirname
echo $PHOENIX_INSTALLDIR

#ldd PhoenixGUI

#QT_DEBUG_PLUGINS=1 $dirname/$appname "$@"
$dirname/$appname
#$dirname/$appname "$@"
