summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-05-13 12:01:16 +0800
committerzxp198210052024-05-13 12:01:16 +0800
commit1c4a4f1719c6c133814d47978ddac809ded08ef4 (patch)
treeda3521552d629c12675d64f31851dbd543a829d5
parente753b58acf85d02b5e6e00471f8f17b48b598d12 (diff)
downloadaur-1c4a4f1719c6c133814d47978ddac809ded08ef4.tar.gz
update to 1.2.3
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD7
-rw-r--r--ai-chat.sh21
3 files changed, 26 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d1b0fe31c964..9426c55bc5fe 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,17 @@
pkgbase = ai-chat-bin
pkgdesc = A cross-platform desktop application that provides quick access to chatbots like OpenAI ChatGPT from the menu bar (tray)
- pkgver = 1.2.2
+ pkgver = 1.2.3
pkgrel = 1
url = https://www.chatbar.top/
arch = x86_64
license = LicenseRef-unknown
makedepends = fuse2
depends = electron28
- provides = ai-chat=1.2.2
+ provides = ai-chat=1.2.3
conflicts = ai-chat
- source = ai-chat-1.2.2.AppImage::https://github.com/rabrain/ai-chat/releases/download/v1.2.2/AI-Chat-1.2.2-linux-x86_64.AppImage
+ source = ai-chat-1.2.3.AppImage::https://github.com/rabrain/ai-chat/releases/download/v1.2.3/AI-Chat-1.2.3-linux-x86_64.AppImage
source = ai-chat.sh
- sha256sums = bae8cdcb5006c04973327016fd75afea5a2a3a750bcd576e2eb15e077f75261e
- sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
+ sha256sums = e923297d5ed94766f25ebfbdb3468e14dfdea361c1c6177f8c1e2233b149c40b
+ sha256sums = 41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d
pkgname = ai-chat-bin
diff --git a/PKGBUILD b/PKGBUILD
index cc6307836c79..6c42a952c7f6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=ai-chat-bin
_pkgname="AI Chat"
-pkgver=1.2.2
+pkgver=1.2.3
_electronversion=28
pkgrel=1
pkgdesc="A cross-platform desktop application that provides quick access to chatbots like OpenAI ChatGPT from the menu bar (tray)"
@@ -21,8 +21,8 @@ source=(
"${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver}/${_pkgname// /-}-${pkgver}-linux-${CARCH}.AppImage"
"${pkgname%-bin}.sh"
)
-sha256sums=('bae8cdcb5006c04973327016fd75afea5a2a3a750bcd576e2eb15e077f75261e'
- 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
+sha256sums=('e923297d5ed94766f25ebfbdb3468e14dfdea361c1c6177f8c1e2233b149c40b'
+ '41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d')
build() {
chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
"${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
@@ -32,6 +32,7 @@ package() {
sed -e "s|@electronversion@|${_electronversion}|g" \
-e "s|@appname@|${pkgname%-bin}|g" \
-e "s|@runname@|app.asar|g" \
+ -e "s|@cfgdirname@|${_pkgname}|g" \
-e "s|@options@|env ELECTRON_OZONE_PLATFORM_HINT=auto|g" \
-i "${srcdir}/${pkgname%-bin}.sh"
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
diff --git a/ai-chat.sh b/ai-chat.sh
index 7ddcaab8d734..398398461fee 100644
--- a/ai-chat.sh
+++ b/ai-chat.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