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

Not working on Electron 4.0.4+ #219

Closed
goldfire opened this issue Mar 9, 2019 · 9 comments
Closed

Not working on Electron 4.0.4+ #219

goldfire opened this issue Mar 9, 2019 · 9 comments

Comments

@goldfire
Copy link
Contributor

goldfire commented Mar 9, 2019

I'm not sure if this is an Electron issue, a greenworks issue or if there just needs to be a new greenworks build, but everything works on Electron 4.0.3, but upgrading to 4.0.4 or any later version silently fails. No errors are logged, the app just hangs when launching and never appears on screen. I'm not seeing this with a regular Electron app that isn't using greenworks.

@kaansoral
Copy link

kaansoral commented Mar 9, 2019

It would be nice if there was a newer prebuilt/compiled Electron version, I've been staying on Electron 3 just because it's so practical to use precompiled greenworks libraries on all platforms (the precompiled electron4-beta ones never worked for me, don't recall the exact problem)

@hokein
Copy link
Member

hokein commented Mar 10, 2019

The prebuilt greenwork for electron4-beta doesn't work for electron >= 4.0.4, as there was a breaking change (electron/electron#16687) in electron v4.0.4.

We have to rebuild Greenworks in order to make it work for electron v4.0.4+.

@goldfire
Copy link
Contributor Author

@hokein Ah, I guess I missed that. Thanks for the info!

@MikalDev
Copy link
Contributor

You can build your own .node using the appropriate version of Electron. I have done this in the past for Electron (including and up to Electron 5.0.0.beta-) and it's worked well. In general, it does require that you have an environment set up to do the source compile.
https://github.com/greenheartgames/greenworks/blob/master/docs/build-instructions-electron.md

If you need windows compile tools, you can try this:
npm install --global --production windows-build-tools

@maflores16
Copy link
Contributor

maflores16 commented Apr 23, 2019

@MikalDev are you using windows? I'm having a bunch of problems trying to build it. I think however I was able to fix most of them, and now I get stuck here, which I don't understand.

gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\Mario\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:255:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Mario\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Mario\Desktop\greenworks
gyp ERR! node -v v11.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! greenworks@0.14.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the greenworks@0.14.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Mario\AppData\Roaming\npm-cache\_logs\2019-04-23T02_30_15_778Z-debug.log

@MikalDev
Copy link
Contributor

@maflores16 sorry you are having problems! I have built using Windows and OSX. When I did the process, I used the electron-rebuild method rather than the gyp method. Perhaps try that? In the meanwhile, if you let me know which version you need (Electron version, OS, 32-bit, 64-bit, etc.), I can probably either build it or get it for you. I am using this nice build tool for Electron that works with my game engine of choice Construct3 (html5/JS) and working with the dev for the tool, they integrated greenworks *.node, etc. and CI for building *.node for many versions of Electron and OSes. Check it out here: https://efc.armaldio.xyz/ It's in the transition to a new version, but I've been using the old version with greenworks and it works very well.

@maflores16
Copy link
Contributor

@MikalDev Thank you so much for your reply, I will try that soon. I've been busy, but I think that certainly helps! I need to learn how to build these myself because it's an important part of my project, but if I can't at all I would appreciate your help. 😄

@maflores16
Copy link
Contributor

maflores16 commented May 4, 2019

@MikalDev Okay so after so many days of trying, I had the bright idea of going back on each Steam SDK and bingo. Version 1.42 works but 1.43 and 1.44 do not work.

Do you remember what Steam SDK you use to build? I'm not sure if this is a bug with greenworks, the sdk, or just my pc.

On top of this, the readme does not say there is a Steam SDK version that is confirmed to work, this should probably be updated.

@MikalDev
Copy link
Contributor

MikalDev commented May 5, 2019

@maflores16 Yes, I'm using version 1.42 (because I suspected that was all that greenworks supported.) I think it would probably be a good idea to update greenworks to later Steam SDK versions at some point.

maflores16 added a commit to maflores16/greenworks that referenced this issue May 5, 2019
Steam SDK 1.42 works as intended when trying to build greenworks. Newer versions will fail. 

Discovered here: greenheartgames#219 (comment)
@hokein hokein closed this as completed Jun 22, 2019
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

No branches or pull requests

5 participants