diff options
author | zxp19821005 | 2023-11-15 18:04:30 +0800 |
---|---|---|
committer | zxp19821005 | 2023-11-15 18:04:30 +0800 |
commit | 3ab8f2ddb800e70676bf9f24689a1776a0807294 (patch) | |
tree | b18c06e282e7974781305ec56207e63c2ac5a249 | |
parent | e5d089265f6e495540a23c9681a8c39676bd2df1 (diff) | |
download | aur-3ab8f2ddb800e70676bf9f24689a1776a0807294.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 32 | ||||
-rw-r--r-- | ctool-electron.sh | 10 |
3 files changed, 30 insertions, 21 deletions
@@ -1,15 +1,14 @@ pkgbase = ctool-electron-bin pkgdesc = Common tools for program development.程序开发常用工具 chrome/edge/firefox/utools/windows/linux/mac pkgver = 2.3.0 - pkgrel = 1 + pkgrel = 2 url = https://ctool.dev arch = x86_64 license = MIT makedepends = gendesk - depends = bash depends = electron26 - provides = ctool - conflicts = ctool + provides = ctool-electron + conflicts = ctool-electron conflicts = ctool-electron source = ctool-electron-2.3.0.tar.gz::https://github.com/baiy/Ctool/releases/download/v2.3.0/ctool_electron_linux_x64.tar.gz source = ctool-electron.png::https://raw.githubusercontent.com/baiy/Ctool/v2.3.0/packages/ctool-core/public/icon/icon_1024.png @@ -18,6 +17,6 @@ pkgbase = ctool-electron-bin sha256sums = 39943b2ce2f0232e112d14f4f39ec0008ef71d435246067692ba6dc574298337 sha256sums = 77467c477d328a27c45d59d1b808511dcff33824ca674f1aad43c606d8a1ab9c sha256sums = 459af2e36090998e7807b1d2a5b8d6a381bf94b69cbd2ec68e7943a09e2ce1e2 - sha256sums = 97cb2db4919d62105a97fcbf7770028f5d94d7dc3cb9b11203f0625970a306fc + sha256sums = b4b2561cbb8513a4978d1d006d5d7ac151360381ca411de78b1a7b515abcf028 pkgname = ctool-electron-bin @@ -1,31 +1,37 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> -_pkgname=ctool -pkgname="${_pkgname}-electron-bin" +_pkgname=ctool_electron +pkgname="${_pkgname//_/-}-bin" pkgver=2.3.0 -pkgrel=1 +pkgrel=2 pkgdesc="Common tools for program development.程序开发常用工具 chrome/edge/firefox/utools/windows/linux/mac" arch=('x86_64') url="https://ctool.dev" -_githuburl="https://github.com/baiy/Ctool" +_ghurl="https://github.com/baiy/Ctool" license=('MIT') -provides=("${_pkgname}") -conflicts=("${_pkgname}" "${pkgname%-bin}") -depends=('bash' 'electron26') -makedepends=('gendesk') -source=("${pkgname%-bin}-${pkgver}.tar.gz::${_githuburl}/releases/download/v${pkgver}/${_pkgname}_electron_linux_x64.tar.gz" +provides=("${_pkgname//_/-}") +conflicts=("${_pkgname//_/-}" "${pkgname%-bin}") +depends=( + 'electron26' +) +makedepends=( + 'gendesk' +) +source=( + "${pkgname%-bin}-${pkgver}.tar.gz::${_ghurl}/releases/download/v${pkgver}/${_pkgname}_linux_x64.tar.gz" "${pkgname%-bin}.png::https://raw.githubusercontent.com/baiy/Ctool/v${pkgver}/packages/ctool-core/public/icon/icon_1024.png" "LICENSE::https://raw.githubusercontent.com/baiy/Ctool/v${pkgver}/LICENSE" - "${pkgname%-bin}.sh") + "${pkgname%-bin}.sh" +) sha256sums=('39943b2ce2f0232e112d14f4f39ec0008ef71d435246067692ba6dc574298337' '77467c477d328a27c45d59d1b808511dcff33824ca674f1aad43c606d8a1ab9c' '459af2e36090998e7807b1d2a5b8d6a381bf94b69cbd2ec68e7943a09e2ce1e2' - '97cb2db4919d62105a97fcbf7770028f5d94d7dc3cb9b11203f0625970a306fc') + 'b4b2561cbb8513a4978d1d006d5d7ac151360381ca411de78b1a7b515abcf028') build() { - gendesk -q -f -n --pkgname "${_pkgname}-electron-bin" --categories "Utility" --name "${_pkgname}" --exec "JSC_useDFGJIT=0 ${pkgname%-bin}" + gendesk -q -f -n --pkgname "${_pkgname//_/-}-bin" --categories "Utility" --name "${_pkgname//_/-}" --exec "${pkgname%-bin}" } package() { install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" - install -Dm644 "${srcdir}/electron_linux_x64/resources/app.asar" -t "${pkgdir}/opt/${pkgname%-bin}/resources" + install -Dm644 "${srcdir}/electron_linux_x64/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" install -Dm644 "${srcdir}/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps" install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" diff --git a/ctool-electron.sh b/ctool-electron.sh index e01f25a4cbc0..33329d13e18d 100644 --- a/ctool-electron.sh +++ b/ctool-electron.sh @@ -1,8 +1,12 @@ #!/bin/bash _ELECTRON=/usr/bin/electron26 -_ASAR="/opt/ctool-electron/resources/.asar" +_ENV="env JSC_useDFGJIT=0" +APPDIR="/usr/lib/ctool-electron" +export PATH="${APPDIR}:${PATH}" +export LD_LIBRARY_PATH="${APPDIR}/swiftshader:${LD_LIBRARY_PATH}" +_ASAR="${APPDIR}/app.asar" if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec ${_ELECTRON} ${_ASAR} "$@" + exec ${_ENV} ${_ELECTRON} ${_ASAR} "$@" else - exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" + exec ${_ENV} ${_ELECTRON} ${_ASAR} --no-sandbox "$@" fi
\ No newline at end of file |