-
Notifications
You must be signed in to change notification settings - Fork 697
[WIP] Build Electron and nwjs binaries #784
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
Conversation
|
Hmm actually the |
lifecycleScripts/install.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the runtime, node-pre-gyp will choose the right builder for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to nuke the builder argument entirely and just hardcode it to node-pre-gyp I think.
Edit: Which also might mean that we can drop the dependencies on node-gyp and nw-gyp actually :D
|
If you want, you can just leave PRs open, and tag them [WIP] in the title. |
|
So my first thought here is that I don't know if I like reusing the installscript for packaging, because that also will trigger a reconfiguration of libssh2, and an additional regeneration of all of the C++ and gyp files etc. Nothing should have changed, but it seems a bit unneccesary. Factoring it out into some sort of node-pre-gyp helper might be a bit more on point, but that should be a simple transition, and most of your work should just drop right over. As an aside, any chance you can interactive-rebase or cherry-pick around that merge and just rebase this sans merge-commit on top of master? Awesome friggin work so far man. |
Yeah I'd love to get a second set of 👀 on this! So far as I can tell,
I agree that's gross 👍 I'll change it. |
|
Yeah, it's trying to deduct what platform it's being run in which I don't think we can assume in a lot of build environments. I feel like forcing that in |
|
yeah, just factoring it out though would rock, since the --runtime figuring, and the calling out to it etc are all shared. I need to do a little work on which-native-nodish at minimum, but it seems thats fairly non standard the way I implemented it. It currently just recurses up the tree looking for ../.., where the first parent is a node_modules, until it cant go up anymore, then looks in the root most modules package.json to see if its got electron/atom-shell or nwjs/node-webkit in it's engines. I'd like to see it pull from the root-most levels npm configuration (so an npmrc in the root folder, or the users, or the global npm installations config) programatically, since that's basically what node-pre-gyp will do automatically for most modules if my understanding of how they detect that is correct. IIRC the runtime argument works for an override. Not sure if the same holds true at buildtime however. That would super simplify things though. |
|
Alright, I've pulled apart the functionality into distinct install and package scripts. Lemme know how you all feel about it. As for determining runtime, lemme make sure I understand you right: |
|
No, I'd argue lets put that in a separate pr, but I'd like to get it out asap. Sorry, just thinking out loud with all of this since this was all sort of one big todo in my head until now lol. I do suspect it may be possible to just have node-pre-gyp detect that automatically however, rather than have nodegit/which-native-nodish do it. If not, I'll work that into which-native-nodish so it's easy to extract out to other modules. |
|
I think this is in pretty good shape, but I'm not sure what's going on with the Appveyor builds. Any theories? |
|
Huh. I mean, it's only really upset at the electron version ones. Have you tried it locally on a windows machine? I can give it a shot, or rdp into appveyor if needed. |
|
Nice 👍 |
|
So I think this is almost ready. I'd say lets clean up the commit history since it's like 30 commits of just shooting in the dark with what's going on with CI. Squash those suckers into something more succinct and then let's merge this! |
|
So it's dying on linux consistently but tbh I'm not sure why. It looks like a seg fault since the tests just bomb out but before they bomb out there are some errors. |
This reverts commit 0b3cd2f.
👍 At this point it seems like we've solved a lot of the systematic problems, but we're hitting a lot of test races. So I'll poke around and see if there's anything eminently fixable. |
|
So @maxkorp and I talked about this a bit and we think it's because the other native modules that are used are build against node headers instead of electron. That could be related to this really weird situation. Also we're using this in GitKraken and I can confirm that the tests that are failing are indeed working in GK. edit: at least with our crazy build process in GK. |
|
Denied >.< |
|
I'm starting to seriously wonder if I'm going to try importing these tests into our app that we know uses nodegit successfully, so they can run in electron in a normal way. |
|
Superseded by #804. 🤘 |
Build nwjs and Electron versions.
This is really hard to test, but as best as I can tell, it Does The Right Thing®.
(This is a continuation of the work in #783.)