diff options
author | zxp19821005 | 2023-12-04 11:54:50 +0800 |
---|---|---|
committer | zxp19821005 | 2023-12-04 11:54:50 +0800 |
commit | 58370d4ba04178035ec4bbeb27fcb7973b00ad9b (patch) | |
tree | ebfe0102eba3b6a2ffa3d99c49cdc4e873fc3eb2 | |
parent | cd8808903e83aa9a27095a68ee84ad0cb957a261 (diff) | |
download | aur-58370d4ba04178035ec4bbeb27fcb7973b00ad9b.tar.gz |
update to 1.16.3
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | escrcpy.sh | 17 |
3 files changed, 26 insertions, 13 deletions
@@ -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 @@ -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 |