From 5135578034f62c83cf39a321266271fd7e790dd1 Mon Sep 17 00:00:00 2001 From: zxp19821005 Date: Wed, 13 Dec 2023 18:43:27 +0800 Subject: fix errors --- thorium-reader.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'thorium-reader.sh') diff --git a/thorium-reader.sh b/thorium-reader.sh index 61a96a6..2ec4412 100644 --- a/thorium-reader.sh +++ b/thorium-reader.sh @@ -1,10 +1,14 @@ #!/bin/bash -_ELECTRON=/usr/bin/electron25 -APPDIR="/usr/lib/thorium-reader" -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 -- cgit v1.2.3-70-g09d2