diff options
author | zxp19821005 | 2024-05-14 16:52:24 +0800 |
---|---|---|
committer | zxp19821005 | 2024-05-14 16:52:24 +0800 |
commit | 59456a5db753a3ff62e9d44a99c8b8f9d1f630c9 (patch) | |
tree | 07f37c1954e3499ef9761c476457dfdef47cf4dc | |
parent | abdbd1a251c277b35b802881e34aa7b84e8b7341 (diff) | |
download | aur-59456a5db753a3ff62e9d44a99c8b8f9d1f630c9.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | tjmc-launcher.sh | 21 |
3 files changed, 22 insertions, 10 deletions
@@ -1,19 +1,18 @@ pkgbase = tjmc-launcher-bin pkgdesc = A simple to use, extremely fast, and well supported app, that allows you to install pure and modded versions of Java Minecraft. pkgver = 0.2.7 - pkgrel = 3 + pkgrel = 4 url = https://launcher.tjmc.ru/ arch = aarch64 arch = x86_64 license = MIT - depends = hicolor-icon-theme depends = electron23 provides = tjmc-launcher=0.2.7 conflicts = tjmc-launcher source = LICENSE-0.2.7::https://raw.githubusercontent.com/tjmcraft/TJMC-Launcher/v0.2.7/LICENSE source = tjmc-launcher.sh sha256sums = 1a25e3b0f4bf16543e5f802cf6d9d189bcae27617ca8be936ad866a8955d9ce6 - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d source_aarch64 = tjmc-launcher-0.2.7-aarch64.deb::https://github.com/tjmcraft/TJMC-Launcher/releases/download/v0.2.7/TJMC-Launcher-setup-arm64.deb sha256sums_aarch64 = 56b47b4d68367661f3e0b6a42b96c916b091908b420158e5b3d0df1e04941358 source_x86_64 = tjmc-launcher-0.2.7-x86_64.deb::https://github.com/tjmcraft/TJMC-Launcher/releases/download/v0.2.7/TJMC-Launcher-setup-amd64.deb @@ -3,7 +3,7 @@ pkgname=tjmc-launcher-bin _pkgname=TJMC-Launcher pkgver=0.2.7 _electronversion=23 -pkgrel=3 +pkgrel=4 pkgdesc="A simple to use, extremely fast, and well supported app, that allows you to install pure and modded versions of Java Minecraft." arch=( 'aarch64' @@ -15,7 +15,6 @@ license=('MIT') provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( - 'hicolor-icon-theme' "electron${_electronversion}" ) source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.deb::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-setup-arm64.deb") @@ -25,13 +24,14 @@ source=( "${pkgname%-bin}.sh" ) sha256sums=('1a25e3b0f4bf16543e5f802cf6d9d189bcae27617ca8be936ad866a8955d9ce6' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') + '41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d') sha256sums_aarch64=('56b47b4d68367661f3e0b6a42b96c916b091908b420158e5b3d0df1e04941358') sha256sums_x86_64=('b4a0666c537e9e172748d785196a8d99698244ba25d9dffc5c0f55375a188ce9') build() { sed -e "s|@electronversion@|${_electronversion}|" \ -e "s|@appname@|${pkgname%-bin}|g" \ -e "s|@runname@|app.asar|g" \ + -e "s|@cfgdirname@|${pkgname%-bin}|g" \ -e "s|@options@||g" \ -i "${srcdir}/${pkgname%-bin}.sh" bsdtar -xf "${srcdir}/data."* diff --git a/tjmc-launcher.sh b/tjmc-launcher.sh index 7ddcaab8d734..398398461fee 100644 --- a/tjmc-launcher.sh +++ b/tjmc-launcher.sh @@ -1,16 +1,29 @@ #!/bin/bash -set -e +set -o pipefail _APPDIR="/usr/lib/@appname@" _RUNNAME="${_APPDIR}/@runname@" +_CFGDIR="@cfgdirname@/" _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 ELECTRON_OVERRIDE_DIST_PATH="/usr/bin/electron@electronversion@" export NODE_ENV=production +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export _FLAGS_FILE="${XDG_CONFIG_HOME}/${_CFGDIR}@appname@-flags.conf" +declare -a _USER_FLAGS +if [[ -f "${_FLAGS_FILE}" ]]; then + while read -r line; do + if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then + _USER_FLAGS+=("${line}") + fi + done < "${_FLAGS_FILE}" +fi cd "${_APPDIR}" -if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? +if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "${_USER_FLAGS[@]}" "$@" else - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "${_USER_FLAGS[@]}" "$@" fi
\ No newline at end of file |