@@ -4,7 +4,7 @@ TEMPFILE="nwjs.tar.gz"
4
4
mkdir -p ../nwjs
5
5
cd ../nwjs
6
6
7
- VERSION=" v0.42.3 " # verified working, to be incremented explicitly
7
+ VERSION=" v0.60.0 " # verified working, to be incremented explicitly
8
8
9
9
# check if nw is already existing and up-to-date, abort if so
10
10
if [ -f nw ]; then
30
30
ARCH=" x64"
31
31
if [ ` uname -m` == " x86_64" ]; then
32
32
ARCH=" x64"
33
+ elif [ ` uname -m` == " aarch64" ]; then
34
+ ARCH=" arm64"
33
35
else
34
36
ARCH=" ia32"
35
37
fi
36
38
37
39
# ready to go
38
40
echo " Downloading nwjs..."
39
41
set +e
40
- main_uri=" https://dl.nwjs.io/$VERSION /nwjs-$VERSION -$OS -$ARCH .tar.gz"
41
- curl -sL -o $TEMPFILE $main_uri
42
- status=$?
43
- if [ $status -ne 0 ] ; then
44
- echo " Failed to download '$main_uri ': $status "
45
- echo " Using mirror instead..."
46
- mirror_uri=" https://npm.taobao.org/mirrors/nwjs/$VERSION /nwjs-$VERSION -$OS -$ARCH .tar.gz"
47
- curl -sL -o $TEMPFILE $mirror_uri
42
+ if [ " $ARCH " == " arm64" ]; then
43
+ main_uri=" https://github.com/LeonardLaszlo/nw.js-armv7-binaries/releases/download/nw60-arm64_2022-01-08/nw60-arm64_2022-01-08.tar.gz"
44
+ curl -sL -o $TEMPFILE $main_uri
48
45
status=$?
49
46
if [ $status -ne 0 ] ; then
50
- echo " Failed to download '$mirror_uri ': $status "
47
+ echo " Failed to download '$main_uri ': $status "
51
48
exit " $status "
52
49
fi
50
+ tar -xzf $TEMPFILE --strip-components 1
51
+ rm $TEMPFILE
52
+ mv docker/dist/nwjs-chrome-ffmpeg-branding/nwjs-v0.60.1-linux-arm64.tar.gz nwjs.tar.gz
53
+ rm -rf docker
54
+ else
55
+ main_uri=" https://dl.nwjs.io/$VERSION /nwjs-$VERSION -$OS -$ARCH .tar.gz"
56
+ curl -sL -o $TEMPFILE $main_uri
57
+ status=$?
58
+ if [ $status -ne 0 ] ; then
59
+ echo " Failed to download '$main_uri ': $status "
60
+ echo " Using mirror instead..."
61
+ mirror_uri=" https://npm.taobao.org/mirrors/nwjs/$VERSION /nwjs-$VERSION -$OS -$ARCH .tar.gz"
62
+ curl -sL -o $TEMPFILE $mirror_uri
63
+ status=$?
64
+ if [ $status -ne 0 ] ; then
65
+ echo " Failed to download '$mirror_uri ': $status "
66
+ exit " $status "
67
+ fi
68
+ fi
53
69
fi
54
70
set -e
55
71
echo -e " Successfully downloaded nwjs!"
0 commit comments