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 Sep 21, 2023
1 parent 9aebd04 commit b725b65
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions bin/nwjs_install
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,43 @@ 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
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
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 '$mirror_uri': $status"
exit "$status"
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!"

echo "Unpacking..."
tar -xzf $TEMPFILE --strip-components 1
rm $TEMPFILE
#rm $TEMPFILE
echo "$VERSION" > version

cd ..
Expand Down

0 comments on commit b725b65

Please sign in to comment.