summarylogtreecommitdiffstats
path: root/craze.sh
diff options
context:
space:
mode:
authorzxp198210052023-12-07 16:34:03 +0800
committerzxp198210052023-12-07 16:34:03 +0800
commita474d4a89d0bc053e5fb8d98ee7f359f37ea7ac3 (patch)
tree18409ae920a935f53d7353ac61b1168a939cbb43 /craze.sh
parent4814e3573cfc154577e7191550bf6a40b6012952 (diff)
downloadaur-a474d4a89d0bc053e5fb8d98ee7f359f37ea7ac3.tar.gz
fix errors
Diffstat (limited to 'craze.sh')
-rw-r--r--craze.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/craze.sh b/craze.sh
index 837bb9cf6eac..2ec4412e5c4f 100644
--- a/craze.sh
+++ b/craze.sh
@@ -1,8 +1,14 @@
#!/bin/bash
-_ELECTRON=/usr/bin/electron22
-_ASAR="/opt/craze/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