summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-14 12:33:20 +0800
committerzxp198210052023-12-14 12:33:20 +0800
commit565095858bba0abe02fedd6b604e16bd5c40d8da (patch)
treeb299528c50ef05777bd2cdd157d9eb4e4a0bfd03
parent56d8bacbafd6a788dbb22e6675b293d9e3439421 (diff)
downloadaur-565095858bba0abe02fedd6b604e16bd5c40d8da.tar.gz
fix errors
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD12
-rw-r--r--feidao.sh17
3 files changed, 20 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 076fff827842..7a8d46f2c8a0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,11 @@
pkgbase = feidao-bin
pkgdesc = 飞稻在线课程设计平台
pkgver = 1.0.0
- pkgrel = 3
+ pkgrel = 4
url = https://www.fei-dao.com
arch = x86_64
license = custom
makedepends = squashfuse
- depends = bash
depends = hicolor-icon-theme
depends = electron13
depends = libx11
@@ -20,6 +19,6 @@ pkgbase = feidao-bin
source = feidao-1.0.0.AppImage::https://oss.fei-dao.com/resources/application/linux/feidao_latest.AppImage
source = feidao.sh
sha256sums = 2a5f5919ebc8c7ef8ebd232758852c87dd0b165208dc46a501ce3cefdd23ded7
- sha256sums = 0223fe621c1c409019a1302683b0d12ed6e91a7ef5450a8ba64f4bd7bba53c0c
+ sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84
pkgname = feidao-bin
diff --git a/PKGBUILD b/PKGBUILD
index 2821b0953248..1fec57a6ef73 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,15 +1,15 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=feidao-bin
pkgver=1.0.0
-pkgrel=3
+_electronversion=13
+pkgrel=4
pkgdesc="飞稻在线课程设计平台"
arch=("x86_64")
url="https://www.fei-dao.com"
license=('custom')
depends=(
- 'bash'
'hicolor-icon-theme'
- 'electron13'
+ "electron${_electronversion}"
'libx11'
'gdk-pixbuf2'
'libxext'
@@ -27,8 +27,12 @@ source=(
"${pkgname%-bin}.sh"
)
sha256sums=('2a5f5919ebc8c7ef8ebd232758852c87dd0b165208dc46a501ce3cefdd23ded7'
- '0223fe621c1c409019a1302683b0d12ed6e91a7ef5450a8ba64f4bd7bba53c0c')
+ '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app.asar|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
"${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
sed "s|AppRun --no-sandbox %U|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
diff --git a/feidao.sh b/feidao.sh
index 88394a78d0fd..2ec4412e5c4f 100644
--- a/feidao.sh
+++ b/feidao.sh
@@ -1,11 +1,14 @@
#!/bin/bash
-_ELECTRON=/usr/bin/electron13
-APPDIR=/usr/lib/feidao
-export PATH="${APPDIR}:${PATH}"
-export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${APPDIR}/lib:${LD_LIBRARY_PATH}"
-_ASAR="${APPDIR}/app.asar"
+set -e
+_APPDIR="/usr/lib/@appname@"
+export PATH="${_APPDIR}:${PATH}"
+export ELECTRON_IS_DEV=0
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+_ASAR="${_APPDIR}/@appasar@"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec ${_ELECTRON} ${_ASAR} "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@"
else
- exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@"
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
fi \ No newline at end of file