summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD15
-rw-r--r--thinreports-section-editor.sh25
3 files changed, 35 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f140d851d7d7..346de6f10d97 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,19 @@
pkgbase = thinreports-section-editor-bin
pkgdesc = A template editor for Thinreports to edit Section Format templates
pkgver = 1.0.0_dev
- pkgrel = 5
+ pkgrel = 7
url = https://github.com/thinreports/thinreports
arch = x86_64
license = MIT
+ makedepends = fuse2
depends = electron21
- depends = hicolor-icon-theme
provides = thinreports-section-editor=1.0.0_dev
conflicts = thinreports-section-editor
- source = thinreports-section-editor-1.0.0_dev.AppImage::https://github.com/thinreports/thinreports-section-editor/releases/download/v1.0.0-dev/thinreports-section-editor-1.0.0-dev-linux-20221031-0b5119.AppImage
+ source = thinreports-section-editor-1.0.0_dev.AppImage::https://github.com/thinreports/thinreports-section-editor/releases/download/v1.0.0-dev/thinreports-section-editor-1.0.0-dev-linux-20240116-67b3e2.AppImage
source = LICENSE-1.0.0_dev::https://raw.githubusercontent.com/thinreports/thinreports-section-editor/v1.0.0-dev/LICENSE
source = thinreports-section-editor.sh
- sha256sums = 818e3b1fdf4fb1ed1fdbe47cc58a034074a652577a887b168edfb033f47b6aeb
+ sha256sums = 01845dba1789b07a1280701ac15d40a592c34e54a1a45c7dcb711a3b4871a86c
sha256sums = 2d416fa05a32860094f618f477a982dd77676b236dc710f2a4df289b7e43ae0c
- sha256sums = 0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014
+ sha256sums = 2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051
pkgname = thinreports-section-editor-bin
diff --git a/PKGBUILD b/PKGBUILD
index 70b530fd3d09..c6e89bd1b162 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,9 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=thinreports-section-editor-bin
pkgver=1.0.0_dev
+_subver=20240116-67b3e2
_electronversion=21
-pkgrel=5
+pkgrel=7
pkgdesc="A template editor for Thinreports to edit Section Format templates"
arch=('x86_64')
url="https://github.com/thinreports/thinreports"
@@ -12,20 +13,24 @@ provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
- 'hicolor-icon-theme'
+)
+makedepends=(
+ 'fuse2'
)
source=(
- "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver//_/-}/${pkgname%-bin}-${pkgver//_/-}-linux-20221031-0b5119.AppImage"
+ "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver//_/-}/${pkgname%-bin}-${pkgver//_/-}-linux-${_subver}.AppImage"
"LICENSE-${pkgver}::https://raw.githubusercontent.com/thinreports/thinreports-section-editor/v${pkgver//_/-}/LICENSE"
"${pkgname%-bin}.sh"
)
-sha256sums=('818e3b1fdf4fb1ed1fdbe47cc58a034074a652577a887b168edfb033f47b6aeb'
+sha256sums=('01845dba1789b07a1280701ac15d40a592c34e54a1a45c7dcb711a3b4871a86c'
'2d416fa05a32860094f618f477a982dd77676b236dc710f2a4df289b7e43ae0c'
- '0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014')
+ '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051')
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"
chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
"${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
diff --git a/thinreports-section-editor.sh b/thinreports-section-editor.sh
index f9ced1432cfc..4cfe3ac09dd8 100644
--- a/thinreports-section-editor.sh
+++ b/thinreports-section-editor.sh
@@ -1,14 +1,29 @@
-#!/bin/sh
-set -e
+#!/bin/bash
+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}" "$@" || exit $?
+if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then
+ exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} "${_USER_FLAGS[@]}" "$@"
else
- exec electron@electronversion@ "${_RUNNAME}" --no-sandbox "$@" || exit $?
+ exec electron@electronversion@ "${_RUNNAME}" ${_OPTIONS} --no-sandbox "${_USER_FLAGS[@]}" "$@"
fi \ No newline at end of file