Skip to content

Commit

Permalink
add arm64 support by community build binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
benmaidel committed Mar 28, 2024
1 parent 971c634 commit fd7eabe
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions bin/nwjs_install
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,42 @@ fi
ARCH="x64"
if [ `uname -m` == "x86_64" ]; then
ARCH="x64"
elif [ `uname -m` == "aarch64" ]; then
ARCH="arm64"
else
ARCH="ia32"
fi

# ready to go
echo "Downloading nwjs..."
set +e
main_uri="https://dl.nwjs.io/$VERSION/nwjs-$VERSION-$OS-$ARCH.tar.gz"
curl -sL -o $TEMPFILE $main_uri
status=$?
if [ $status -ne 0 ] ; then
echo "Failed to download '$main_uri': $status"
echo "Using mirror instead..."
mirror_uri="https://npm.taobao.org/mirrors/nwjs/$VERSION/nwjs-$VERSION-$OS-$ARCH.tar.gz"
curl -sL -o $TEMPFILE $mirror_uri
if [ "$ARCH" == "arm64" ]; then
main_uri="https://github.com/LeonardLaszlo/nw.js-armv7-binaries/releases/download/nw60-arm64_2022-01-08/nw60-arm64_2022-01-08.tar.gz"
curl -sL -o $TEMPFILE $main_uri
status=$?
if [ $status -ne 0 ] ; then
echo "Failed to download '$mirror_uri': $status"
echo "Failed to download '$main_uri': $status"
exit "$status"
fi
tar -xzf $TEMPFILE --strip-components 1
rm $TEMPFILE
mv docker/dist/nwjs-chrome-ffmpeg-branding/nwjs-v0.60.1-linux-arm64.tar.gz nwjs.tar.gz
rm -rf docker
else
main_uri="https://dl.nwjs.io/$VERSION/nwjs-$VERSION-$OS-$ARCH.tar.gz"
curl -sL -o $TEMPFILE $main_uri
status=$?
if [ $status -ne 0 ] ; then
echo "Failed to download '$main_uri': $status"
echo "Using mirror instead..."
mirror_uri="https://npm.taobao.org/mirrors/nwjs/$VERSION/nwjs-$VERSION-$OS-$ARCH.tar.gz"
curl -sL -o $TEMPFILE $mirror_uri
status=$?
if [ $status -ne 0 ] ; then
echo "Failed to download '$mirror_uri': $status"
exit "$status"
fi
fi
fi
set -e
echo -e "Successfully downloaded nwjs!"
Expand Down

0 comments on commit fd7eabe

Please sign in to comment.