From 96c4044a6c213c99f225fc7895d2ad1804b0a9d2 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 17 Jun 2019 15:45:28 +0300 Subject: [PATCH] appimage: use APPDIR enviroment variable to determine application directory --- scripts/build_appimage.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/build_appimage.sh b/scripts/build_appimage.sh index fbf7afcd..2469bbf9 100755 --- a/scripts/build_appimage.sh +++ b/scripts/build_appimage.sh @@ -19,13 +19,12 @@ cat > $APPDIR/AppRun << 'EOF' echo "Xash3D FWGS installed as AppImage." -ENGINEROOT=$(dirname -- "$(readlink -f -- "$0")") if [ "$XASH3D_BASEDIR" = "" ]; then export XASH3D_BASEDIR=$PWD fi -export XASH3D_EXTRAS_PAK1="${ENGINEROOT}"/extras.pak -export LD_LIBRARY_PATH="${ENGINEROOT}":$LD_LIBRARY_PATH -${DEBUGGER} "${ENGINEROOT}"/xash3d "$@" +export XASH3D_EXTRAS_PAK1="${APPDIR}"/extras.pak +export LD_LIBRARY_PATH="${APPDIR}":$LD_LIBRARY_PATH +${DEBUGGER} "${APPDIR}"/xash3d "$@" exit $? EOF