riscv-forks / electron-riscv-releases

[WIP] Binary Releases of electron for riscv64
5 stars 2 forks source link

How do I consume the releases? #1

Open lazyprogrammerio opened 2 months ago

lazyprogrammerio commented 2 months ago

Hello. What is the equivalent command to the npm install electron when using the published release .zip?

Thank you!

kxxt commented 1 month ago

Hi,

What is the equivalent command to the npm install electron

You can continue to use npm install electron because the javascript part is cross-platform.

using the published release .zip

The way to use the published release .zip is largely dependent on how you build your application.

lazyprogrammerio commented 1 month ago

When I run npm install electron, it fails at this moment here: https://github.com/electron/electron/blob/main/npm/install.js#L49

Only if I run ELECTRON_SKIP_BINARY_DOWNLOAD npm install electron, the npm install works.

kxxt commented 1 month ago

When I run npm install electron, it fails at this moment here: https://github.com/electron/electron/blob/main/npm/install.js#L49

Yes, that error is expected if you are building on a riscv64 host. You already mentioned the solution:

Only if I run ELECTRON_SKIP_BINARY_DOWNLOAD npm install electron, the npm install works.

Usually you will need to apply more workarounds like this to get it work, like https://github.com/felixonmars/archriscv-packages/blob/45fbfb5d7b8fc22ebaee52a6ed839dc7cbb18fc5/element.io/riscv64.patch#L7-L9

Because native riscv64 CI environment is rare, usually maintainers of electron applications prefer to build on x64 host for x64, arm64, riscv64 and other targets.