update to 1.1.12
This commit is contained in:
commit
cf9a636ae4
3 files changed
+123
No files matched your search
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
_APPDIR="/usr/lib/@appname@"
|
||||
_RUNNAME="${_APPDIR}/@runname@"
|
||||
_OPTIONS="@options@"
|
||||
export PATH="${_APPDIR}:${PATH}"
|
||||
export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
|
||||
export ELECTRON_IS_DEV=0
|
||||
export ELECTRON_FORCE_IS_PACKAGED=true
|
||||
export ELECTRON_DISABLE_SECURITY_WARNINGS=true
|
||||
export NODE_ENV=production
|
||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
_FLAGS_FILE="${XDG_CONFIG_HOME}/@[email protected]"
|
||||
declare -a flags
|
||||
if [[ -f "${_FLAGS_FILE}" ]]; then
|
||||
mapfile -t < "${_FLAGS_FILE}"
|
||||
fi
|
||||
for line in "${MAPFILE[@]}"; do
|
||||
if [[ ! "${line}" =~ ^[[:space:]]*#.* ]] && [[ -n "${line}" ]]; then
|
||||
flags+=("${line}")
|
||||
fi
|
||||
done
|
||||
_WAYLAND_OPTION=false
|
||||
for arg in "$@"; do
|
||||
if [[ "${arg}" == "--wayland" ]]; then
|
||||
_WAYLAND_OPTION=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ "${_WAYLAND_OPTION}" == true ]]; then
|
||||
echo "Forcing Wayland"
|
||||
flags+=("--enable-features=UseOzonePlatform,WaylandWindowDecorations,VaapiVideoDecodeLinuxGL" "--ozone-platform=wayland")
|
||||
fi
|
||||
cd "${_APPDIR}"
|
||||
if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then
|
||||
exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "${flags[@]}" "$@" || exit $?
|
||||
else
|
||||
exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "${flags[@]}" "$@" || exit $?
|
||||
fi
|
||||
Reference in new issue
Block a user