rubyjs / libv8-node

Package libv8 from Node
MIT License
14 stars 27 forks source link

Add Windows targets #9

Open lloeki opened 4 years ago

adeherdt-r7 commented 2 months ago

Hello,

Is here a way to help out on this? I'm running a use-case where I'd need to be able to install mini_racer on a Windows native build, and libv8-node fails to install because it cannot download NodeJS to build the binary.

Some quick searching shows the problem to be here:

https://github.com/rubyjs/libv8-node/blob/master/libexec/download-node

mkdir -p "${src}"
download "${src}/node-v${version}.tar.gz" "https://nodejs.org/dist/v${version}/node-v${version}.tar.gz"
check_sum "${src}/node-v${version}.tar.gz" "${sha256sum}" && exit 0

This doesn't work on Windows, because for example for 21.7.2, there is no correct path being build to download the package. If I follows the code directly, it tries to download https://nodejs.org/dist/v21.7.2/node-v21.7.2.tag.gz but that doesn't exist, as it should either download the -headers package, or a platform specific one. Although for windows it becomes a 7z file instead.

adeherdt-r7 commented 2 months ago

Actually got the scripts working on my Windows machine, seems there's missing checksum for the version it downloaded, which I added. Just looking for some general advice on how I can locally test an installation with this gem.