diff options
author | zxp19821005 | 2023-12-14 09:25:25 +0800 |
---|---|---|
committer | zxp19821005 | 2023-12-14 09:25:25 +0800 |
commit | a2485c03b8bfce36eb959b3fa8bc79d71a461009 (patch) | |
tree | 04771f9e1f9db6969e087467bfb9f05469ab7d42 /backend-ai-desktop.sh | |
parent | 4d0be72a5335359f83a1a989f9ff305e9eb6b4a9 (diff) | |
download | aur-a2485c03b8bfce36eb959b3fa8bc79d71a461009.tar.gz |
fix errors
Diffstat (limited to 'backend-ai-desktop.sh')
-rw-r--r-- | backend-ai-desktop.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/backend-ai-desktop.sh b/backend-ai-desktop.sh index 11e99c9d1ae5..2ec4412e5c4f 100644 --- a/backend-ai-desktop.sh +++ b/backend-ai-desktop.sh @@ -1,10 +1,14 @@ #!/bin/bash -_ELECTRON=/usr/bin/electron26 -APPDIR="/usr/lib/backend-ai-desktop" -export PATH="${APPDIR}:${PATH}" -_ASAR="${APPDIR}/app.asar" +set -e +_APPDIR="/usr/lib/@appname@" +export PATH="${_APPDIR}:${PATH}" +export ELECTRON_IS_DEV=0 +export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" +_ASAR="${_APPDIR}/@appasar@" if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec ${_ELECTRON} ${_ASAR} "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" "$@" else - exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" fi
\ No newline at end of file |