summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorzxp198210052024-10-18 16:58:19 +0800
committerzxp198210052024-10-18 16:58:19 +0800
commit6399e14c1e2d439ca7154cfc2d6854885eaa0f01 (patch)
tree4daf44323649a5b0ae6079e8e0a5768f35bdf9e4 /PKGBUILD
parentb88e020ae0648e74fb4fc6cb810289755da5760a (diff)
downloadaur-6399e14c1e2d439ca7154cfc2d6854885eaa0f01.tar.gz
update shell-scripts
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD21
1 files changed, 13 insertions, 8 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3a567075ea7a..6ee69ff47476 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,9 +3,9 @@ pkgname=android-toolkit-git
_pkgname=Android-Toolkit
pkgver=1.5.23.r0.ge23050c
_electronversion=25
-_nodeversion=18
+_nodeversion=20
pkgrel=1
-pkgdesc="A cross platform desktop app written in Typescript/Node using React and Electron.A GUI for adb and can be used to modify android devices such as firesticks and google TVs."
+pkgdesc="A cross platform desktop app written in Typescript/Node using React and Electron.A GUI for adb and can be used to modify android devices such as firesticks and google TVs.Use system-wide electron."
arch=('x86_64')
url="https://github.com/AnthonyGress/Android-Toolkit"
license=("MIT")
@@ -51,28 +51,33 @@ build() {
_ensure_local_nvm
gendesk -q -f -n --pkgname="${pkgname%-git}" --pkgdesc="${pkgdesc}" --categories="Utility" --name="${_pkgname}" --exec="${pkgname%-git} %U"
cd "${srcdir}/${pkgname%-git}.git"
+ electronDist="/usr/lib/electron${_electronversion}"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
HOME="${srcdir}/.electron-gyp"
{
- echo -e '\n'
+ echo -e '\n'
#echo 'build_from_source=true'
echo "cache=${srcdir}/.npm_cache"
- if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
+ } >> .npmrc
+ if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
+ {
echo 'registry=https://registry.npmmirror.com'
echo 'disturl=https://registry.npmmirror.com/-/binary/node/'
echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
- fi
- } >> .npmrc
+ } >> .npmrc
+ fi
sed -i "s/AppImage/dir/g;s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
NODE_ENV=development npm install
- NODE_ENV=production npm run package
+ NODE_ENV=production npx ts-node ./.erb/scripts/clean.js dist
+ NODE_ENV=production npm run build
+ NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${electronDist}"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
install -Dm644 "${srcdir}/${pkgname%-git}.git/release/build/linux-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname%-git}"
- cp -r "${srcdir}/${pkgname%-git}.git/release/build/linux-"*/resources/assets "${pkgdir}/usr/lib/${pkgname%-git}"
+ cp -Pr --no-preserve=ownership "${srcdir}/${pkgname%-git}.git/release/build/linux-"*/resources/assets "${pkgdir}/usr/lib/${pkgname%-git}"
_icon_sizes=(16x16 32x32 180x180 192x192 512x512 1024x1024)
for _icons in "${_icon_sizes[@]}";do
install -Dm644 "${srcdir}/${pkgname%-git}.git/assets/icons/${_icons}.png" \