summarylogtreecommitdiffstats
path: root/tjmc-launcher.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tjmc-launcher.sh')
-rw-r--r--tjmc-launcher.sh17
1 files changed, 9 insertions, 8 deletions
diff --git a/tjmc-launcher.sh b/tjmc-launcher.sh
index 09a458270cd9..2ec4412e5c4f 100644
--- a/tjmc-launcher.sh
+++ b/tjmc-launcher.sh
@@ -1,13 +1,14 @@
#!/bin/bash
-APPDIR="/usr/lib/tjmc-launcher"
-export PATH="${APPDIR}:${PATH}"
+set -e
+_APPDIR="/usr/lib/@appname@"
+export PATH="${_APPDIR}:${PATH}"
export ELECTRON_IS_DEV=0
-#export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app.asar"
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+_ASAR="${_APPDIR}/@appasar@"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- cd $APPDIR
- exec electron@electronversion@ ${_ASAR} "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@"
else
- cd $APPDIR
- exec electron@electronversion@ ${_ASAR} --no-sandbox "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
fi \ No newline at end of file