diff options
author | zxp19821005 | 2024-05-15 18:52:27 +0800 |
---|---|---|
committer | zxp19821005 | 2024-05-15 18:52:27 +0800 |
commit | d289aa9b1169fe205fd80158b1311aa6f1eae86c (patch) | |
tree | 2206f2b22f967f411c8738437076289020c952c4 | |
parent | c08c225beebc3a003373d1d47193c9f2445f8339 (diff) | |
download | aur-d289aa9b1169fe205fd80158b1311aa6f1eae86c.tar.gz |
update to 2.1.0.r0.gec8d3e9
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 17 | ||||
-rw-r--r-- | electron-widgets.sh | 22 |
3 files changed, 23 insertions, 22 deletions
@@ -1,6 +1,6 @@ pkgbase = electron-widgets-git pkgdesc = A desktop application developed using Electron.js and Node.js. The application allows users to create and manage widgets on their desktops. - pkgver = 2.0.4.r0.gf61f63e + pkgver = 2.1.0.r0.gec8d3e9 pkgrel = 1 url = https://electron-widgets.vercel.app/ arch = any @@ -11,11 +11,11 @@ pkgbase = electron-widgets-git makedepends = gendesk makedepends = curl depends = electron30 - provides = electron-widgets=2.0.4 + provides = electron-widgets=2.1.0 conflicts = electron-widgets source = electron-widgets.git::git+https://github.com/sametcn99/electron-widgets.git source = electron-widgets.sh sha256sums = SKIP - sha256sums = 05762c556c85a4423b28600ccbbe7b7dcdd3d1be526ef4a588a510671fa6c62a + sha256sums = 41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d pkgname = electron-widgets-git @@ -1,7 +1,7 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> pkgname=electron-widgets-git _pkgname="Electron-Widgets" -pkgver=2.0.4.r0.gf61f63e +pkgver=2.1.0.r0.gec8d3e9 _electronversion=30 _nodeversion=20 pkgrel=1 @@ -26,7 +26,7 @@ source=( "${pkgname%-git}.git::git+${_ghurl}.git" "${pkgname%-git}.sh") sha256sums=('SKIP' - '05762c556c85a4423b28600ccbbe7b7dcdd3d1be526ef4a588a510671fa6c62a') + '41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d') pkgver() { cd "${srcdir}/${pkgname%-git}.git" git describe --long --tags --exclude='*[a-z][a-z]*' | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' @@ -41,21 +41,22 @@ build() { sed -e "s|@electronversion@|${_electronversion}|" \ -e "s|@appname@|${pkgname%-git}|g" \ -e "s|@runname@|app.asar|g" \ + -e "s|@cfgdirname@|${pkgname%-git}|g" \ -e "s|@options@|env ELECTRON_OZONE_PLATFORM_HINT=auto|g" \ -i "${srcdir}/${pkgname%-git}.sh" _ensure_local_nvm - gendesk -q -f -n --categories="Utility" --name="${_pkgname}" --exec="${pkgname%-git} %U" + gendesk -q -f -n --pkgname="${pkgname%-git}" --categories="Utility" --name="${_pkgname}" --exec="${pkgname%-git} %U" cd "${srcdir}/${pkgname%-git}.git" export npm_config_build_from_source=true export npm_config_cache="${srcdir}/.npm_cache" export ELECTRON_SKIP_BINARY_DOWNLOAD=1 - export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')" - export npm_config_target="${SYSTEM_ELECTRON_VERSION}" - export ELECTRONVERSION="${_electronversion}" + #export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')" + #export npm_config_target="${SYSTEM_ELECTRON_VERSION}" + #export ELECTRONVERSION="${_electronversion}" HOME="${srcdir}/.electron-gyp" if [ `curl -s ipinfo.io/country | grep CN | wc -l ` -ge 1 ];then - export npm_config_disturl=https://registry.npmmirror.com/-/binary/node/ export npm_config_registry=https://registry.npmmirror.com + export npm_config_disturl=https://registry.npmmirror.com/-/binary/node/ export npm_config_electron_mirror=https://registry.npmmirror.com/-/binary/electron/ export npm_config_electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/ else @@ -70,4 +71,4 @@ package() { install -Dm644 "${srcdir}/${pkgname%-git}.git/public//assets/electron.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png" install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications" install -Dm644 "${srcdir}/${pkgname%-git}.git/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" -}
\ No newline at end of file +} diff --git a/electron-widgets.sh b/electron-widgets.sh index 5594e5380ba2..398398461fee 100644 --- a/electron-widgets.sh +++ b/electron-widgets.sh @@ -1,7 +1,8 @@ #!/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}" @@ -11,19 +12,18 @@ 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}" -_FLAGS_FILE="${XDG_CONFIG_HOME}/@appname@-flags.conf" -declare -a flags +export _FLAGS_FILE="${XDG_CONFIG_HOME}/${_CFGDIR}@appname@-flags.conf" +declare -a _USER_FLAGS if [[ -f "${_FLAGS_FILE}" ]]; then - mapfile -t < "${_FLAGS_FILE}" + while read -r line; do + if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then + _USER_FLAGS+=("${line}") + fi + done < "${_FLAGS_FILE}" fi -for line in "${MAPFILE[@]}"; do - if [[ ! "${line}" =~ ^[[:space:]]*#.* ]] && [[ -n "${line}" ]]; then - flags+=("${line}") - fi -done cd "${_APPDIR}" if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "${_USER_FLAGS}" "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "${_USER_FLAGS[@]}" "$@" else - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "${_USER_FLAGS}" "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "${_USER_FLAGS[@]}" "$@" fi
\ No newline at end of file |