summarylogtreecommitdiffstats
path: root/chain-desktop-wallet.sh
diff options
context:
space:
mode:
Diffstat (limited to 'chain-desktop-wallet.sh')
-rw-r--r--chain-desktop-wallet.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/chain-desktop-wallet.sh b/chain-desktop-wallet.sh
index 27ef0691d416..2ec4412e5c4f 100644
--- a/chain-desktop-wallet.sh
+++ b/chain-desktop-wallet.sh
@@ -1,11 +1,14 @@
#!/bin/bash
-_ELECTRON=/usr/bin/electron19
-APPDIR="/opt/chain-desktop-wallet"
-export PATH="${APPDIR}:${APPDIR}/usr/sbin:${PATH}"
-export LD_LIBRARY_PATH="${APPDIR}/usr/lib:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/resources/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