-
Notifications
You must be signed in to change notification settings - Fork 287
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
Electron support #194
Comments
OK, I got my first "hello world" working manually. Here's the steps I took to do it, so we can at least reproduce it. This is obviously not what we want the final workflow to be, but I need to study electron-builder and see if that will have a nice compatibility story. (Otherwise we may have to either build a new electron tool, which I'd rather not do, or work on integrating with electron-rebuild. But my current hunch is that I got this working with Node v7.5.0. I don't think the version of node on the system has to be a perfect match for the version of node bundled with Electron, but I'm not sure how close it has to be.
|
Which version of Electron were you using? Because the ABI versions of the Node.js installation used to compile the module and Electron have to match - so when you build it with Node v7.5.0 (ABI 51) it won't work with Electron 1.6.3 (ABI 53). You will get an error:
|
@ffflorian I was using v7.5.0. I believe the reason it does work is that setting the npm environment variables and configuration settings (step 3 above) tells node-gyp to download the C++ headers from electron's web server, and selects the ones that match the electron version. So when node builds the native module with |
Integrating with electron-rebuild is a better choice, it's integrated with the rest of the Electron ecosystem far better, electron-builder is kind of the legacy solution to a lot of these problems |
@paulcbetts Thanks, that's helpful to know. I've almost got a first step working that makes building possible at all but doesn't integrate with either. I'll focus more on electron-rebuild, though. I have had a first conversation with @MarshallOfSound, who's happy to work with us to integrate into electron-rebuild. |
Just so I don't lose it, I did some research on what we need to fix inside electron-rebuild:
|
Latest Electron releases are ^4 and ^5, which use a custom When requiring the generated
Edit: Following the guide https://neon-bindings.com/docs/electron-apps, it actually works with Electron@4 🎉. |
I have an initial implementation that propose an easy setup flow. Simply ensure that the
I want to submit a pull request if we agree on this. Note: |
Any news about this? |
Actually, I'm getting errors about missing symbols on versions 3,4,5 and latest. E.g.:
|
This issue is to track what's left to be able to legitimately claim we support using neon projects in Electron apps.
The text was updated successfully, but these errors were encountered: