Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add arm64 support #22

Merged

Conversation

benmaidel
Copy link

Binaries are only supplied by community and not officially released. That's why arm64 has to be handled differently.

bin/nwjs_install Outdated Show resolved Hide resolved
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"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to move the URL to a "global" variable, since it probably needs to be adjusted with the version tag in line 7.

Unfortunately , using the $VERSION and $OS and variables to construct the URL doesn't seem possible, but the $ARCH variable could be used. This probably doesn't make sense if the URL gets moved to the top..

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, yes. Problem is that the url for the arm version is a completely different one. So I decided to stick to a fixed version for arm but keep it as it was for the win, linux, osx releases.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, makes sense. That's why the mv command in line 47 doesn't use the variables.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about an ARM_VERSION variable? And a wildcard (*) in line 47.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point. But I think that this will not help a lot because the download link also includes a date. Other Versions will have a completely different date in uri. Perhaps future releases of nwjs will also include linux-arm64 Versions. Then we can roll back and use the same logic for all versions.

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the variables here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could only use it vor v0.60.1 but will this help here?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bin/nwjs_install Outdated Show resolved Hide resolved
Copy link
Member

@fmessmer fmessmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why and where do we need arm support?

@benmaidel
Copy link
Author

why and where do we need arm support?

I have a virtual ubuntu arm running

@benmaidel benmaidel changed the title add arm64 support [WIP] add arm64 support Oct 16, 2023
@benmaidel benmaidel changed the title [WIP] add arm64 support add arm64 support Mar 28, 2024
@fmessmer fmessmer merged commit 0500b77 into mojin-robotics:mojin-devel Apr 8, 2024
1 check passed
@benmaidel benmaidel deleted the feature/arm64_support branch April 8, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants