summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052024-03-21 11:57:05 +0800
committerzxp198210052024-03-21 11:57:05 +0800
commit377c2802235e0a1a64e5c92c042d0df9a5956156 (patch)
treedcdc37c6e3f4ef440c351bbd7a29ae2f070314c6
parent0b9d8118b1521fd818a9ece3233f7232c7f81545 (diff)
downloadaur-aero-browser.tar.gz
fix errors
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD14
-rw-r--r--aero-browser.sh5
3 files changed, 16 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 27f5a0c699a6..8225ef917d5f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = aero-browser
pkgdesc = A fast and lightweight web browser made with electron and react that allows you to navigate the Internet with ease.
pkgver = 0.2.2_alpha
- pkgrel = 3
+ pkgrel = 4
url = https://aero-mymeiy532-frostbreker.vercel.app/
arch = any
license = MIT
@@ -15,6 +15,6 @@ pkgbase = aero-browser
source = aero-browser.git::git+https://github.com/FrostBreker/Aero.git#tag=v0.2.2-alpha
source = aero-browser.sh
sha256sums = SKIP
- sha256sums = 50b10386d13e5bec806aeb78f819c4edd0208a4d184332e53866c802731217fe
+ sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
pkgname = aero-browser
diff --git a/PKGBUILD b/PKGBUILD
index a40da72de3fe..d4019c097507 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@ _pkgname="AeroBrowser"
pkgver=0.2.2_alpha
_electronversion=23
_nodeversion=18
-pkgrel=3
+pkgrel=4
pkgdesc="A fast and lightweight web browser made with electron and react that allows you to navigate the Internet with ease."
arch=('any')
url="https://aero-mymeiy532-frostbreker.vercel.app/"
@@ -27,7 +27,7 @@ source=(
"${pkgname}.sh"
)
sha256sums=('SKIP'
- '50b10386d13e5bec806aeb78f819c4edd0208a4d184332e53866c802731217fe')
+ 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
_ensure_local_nvm() {
export NVM_DIR="${srcdir}/.nvm"
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
@@ -38,6 +38,7 @@ build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname}|g" \
-e "s|@runname@|app|g" \
+ -e "s|@options@||g" \
-i "${srcdir}/${pkgname}.sh"
_ensure_local_nvm
gendesk -q -f -n --categories="Network" --pkgname="${_appname}-browser" --name="${_pkgname}" --exec="${pkgname} %U"
@@ -50,7 +51,14 @@ build() {
export ELECTRONVERSION="${_electronversion}"
export npm_config_disturl=https://electronjs.org/headers
HOME="${srcdir}/.electron-gyp"
- sed '53,56d;52s|,||g' -i electron-builder.json
+ if [ `curl -s ipinfo.io/country | grep CN | wc -l ` -ge 1 ];then
+ echo 'registry="https://registry.npmmirror.com/"' >> .npmrc
+ echo 'electron_mirror="https://registry.npmmirror.com/-/binary/electron/"' >> .npmrc
+ echo 'electron_builder_binaries_mirror="https://registry.npmmirror.com/-/binary/electron-builder-binaries/"' >> .npmrc
+ else
+ echo "Your network is OK."
+ fi
+ sed '53,56d;s|"deb",|"dir"|g' -i electron-builder.json
sed "s|https://www.google.fr/|about:blank|g" -i src/App.js
npm install
npm run electron:package:linux
diff --git a/aero-browser.sh b/aero-browser.sh
index 86cb3dc6a9bf..7ddcaab8d734 100644
--- a/aero-browser.sh
+++ b/aero-browser.sh
@@ -2,6 +2,7 @@
set -e
_APPDIR="/usr/lib/@appname@"
_RUNNAME="${_APPDIR}/@runname@"
+_OPTIONS="@options@"
export PATH="${_APPDIR}:${PATH}"
export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
export ELECTRON_IS_DEV=0
@@ -9,7 +10,7 @@ export ELECTRON_FORCE_IS_PACKAGED=true
export NODE_ENV=production
cd "${_APPDIR}"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec electron@electronversion@ "${_RUNNAME}" "$@" || exit $?
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $?
else
- exec electron@electronversion@ "${_RUNNAME}" --no-sandbox "$@" || exit $?
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $?
fi \ No newline at end of file