summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-04 11:54:50 +0800
committerzxp198210052023-12-04 11:54:50 +0800
commit58370d4ba04178035ec4bbeb27fcb7973b00ad9b (patch)
treeebfe0102eba3b6a2ffa3d99c49cdc4e873fc3eb2
parentcd8808903e83aa9a27095a68ee84ad0cb957a261 (diff)
downloadaur-58370d4ba04178035ec4bbeb27fcb7973b00ad9b.tar.gz
update to 1.16.3
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD16
-rw-r--r--escrcpy.sh17
3 files changed, 26 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1c83412b0e53..fe6d346b496d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = escrcpy
pkgdesc = 使用图形化的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动
- pkgver = 1.16.1
+ pkgver = 1.16.3
pkgrel = 1
url = https://github.com/viarotel-org/escrcpy
arch = aarch64
@@ -14,9 +14,9 @@ pkgbase = escrcpy
depends = hicolor-icon-theme
depends = scrcpy
conflicts = escrcpy
- source = escrcpy-1.16.1::git+https://github.com/viarotel-org/escrcpy.git#tag=v1.16.1
+ source = escrcpy-1.16.3::git+https://github.com/viarotel-org/escrcpy.git#tag=v1.16.3
source = escrcpy.sh
sha256sums = SKIP
- sha256sums = 941cb7196d03283a6e65a2271f0c8381a9ec8176f38ce9dc9916f3f89b29a720
+ sha256sums = 8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84
pkgname = escrcpy
diff --git a/PKGBUILD b/PKGBUILD
index 3df04541d5b0..29b573bf39c6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,7 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=escrcpy
-pkgver=1.16.1
+pkgver=1.16.3
+_electronversion=27
pkgrel=1
pkgdesc="使用图形化的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动"
arch=(
@@ -11,7 +12,7 @@ url="https://github.com/viarotel-org/escrcpy"
license=('MIT')
conflicts=("${pkgname}")
depends=(
- 'electron27'
+ "electron${_electronversion}"
'hicolor-icon-theme'
'scrcpy'
)
@@ -26,10 +27,19 @@ source=(
"${pkgname}.sh"
)
sha256sums=('SKIP'
- '941cb7196d03283a6e65a2271f0c8381a9ec8176f38ce9dc9916f3f89b29a720')
+ '8915ca75d453698df81f7f3305cce6869f4261d754d90f0c3724b73c7b24ca84')
build() {
+ sed -e "s|@electronversion@|${_electronversion}|" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app.asar|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
gendesk -q -f -n --categories "Utility" --name "${pkgname}" --exec "${pkgname}"
cd "${srcdir}/${pkgname}-${pkgver}"
+ 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 ELECTRONVERSION="${_electronversion}"
sed -e '81,84d' -e 's|"deb"|"AppImage"|g' -i electron-builder.json
npm install
npm run build:linux
diff --git a/escrcpy.sh b/escrcpy.sh
index b2507a2428fc..2ec4412e5c4f 100644
--- a/escrcpy.sh
+++ b/escrcpy.sh
@@ -1,11 +1,14 @@
#!/bin/bash
-_ELECTRON=/usr/bin/electron27
-APPDIR="/usr/lib/escrcpy"
-export PATH="${APPDIR}:${PATH}"
-#export LD_LIBRARY_PATH="${APPDIR}/usr/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