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

Updating the library? #294

Open
podrivo opened this issue Jul 15, 2021 · 8 comments
Open

Updating the library? #294

podrivo opened this issue Jul 15, 2021 · 8 comments

Comments

@podrivo
Copy link

podrivo commented Jul 15, 2021

Hello,

Recently I tried to use greenworks in a project, but faced many errors using the latest versions of node and electron.
So I was wondering, any plans on updating the library?

Thank you!
All the best.

@MikalDev
Copy link
Contributor

Check out this site for a bunch of prebuilds with different versions of node and electron:

https://greenworks-prebuilds.armaldio.xyz/

@podrivo
Copy link
Author

podrivo commented Jul 15, 2021

Hey @MikalDev! Thank you so much for the reply! 😃

I have tried the Prebuilt versions and have downloaded the v0.6.0 SDK 1.5.0, Electron 13.0.0-beta.2 15.0.0-nightly.20210714, Mac 64bits, ABI v89.

And followed the Build Instructions (Electron) with a mix of Using Prebuilt Binaries in NW.js (Quick Start), plus some other docs and was able to read the .node files, but got new errors.

This is the latest error I got:

Uncaught Error: dlopen(/Library/WebServer/Documents/_dev/electron-quick-start/node_modules/greenworks/lib/greenworks-osx64.node, 1): no suitable image found.  Did find:
/Library/WebServer/Documents/_dev/electron-quick-start/node_modules/greenworks/lib/greenworks-osx64.node: malformed mach-o image: load command #8 length (0) too small in /Library/WebServer/Documents/_dev/electron-quick-start/node_modules/greenworks/lib/greenworks-osx64.node
/Library/WebServer/Documents/_dev/electron-quick-start/node_modules/greenworks/lib/greenworks-osx64.node: malformed mach-o image: load command #8 length (0) too small in /Library/WebServer/Documents/_dev/electron-quick-start/node_modules/greenworks/lib/greenworks-osx64.node

I'm in macOS Catalina 10.15.7, testing with an electron-quick-start boilerplate with "electron": "^13.1.6" and node v14.17.0.

I also have greenworks-osx64.node, libsdkencryptedappticket.dylib, libsteam_api.dylib inside the folder node_modules/greenworks/lib.

Thoughts on why this might be happening?
Thank you!

@MikalDev
Copy link
Contributor

Not sure, except a bad build of prebuilt or mismatch prebuilt vs electron/node versions. Can you send details on which versions of electron/node you are using and exactly which prebuilt binary you are using (and platform details, e.g. OS, OS version.)

@podrivo
Copy link
Author

podrivo commented Jul 15, 2021

Hey @MikalDev! Yeah, I think this might be the case.

I'm using:

  • electron: ^13.1.6
  • node: v14.17.0
  • macOS 10.15.7

I've downloaded the latest Prebuilt for Mac/Electron:

  • v0.6.0 SDK 1.5.0
  • Electron 13.0.0-beta.2 → 15.0.0-nightly.20210714
  • Mac 64bits
  • ABI v89

I was wondering if you know any working example I could clone and try?
Or possibly a more updated documentation?

I'm sorry, but I've tried many many many things, but couldn't build or use a prebuilt so far.

@podrivo
Copy link
Author

podrivo commented Jul 25, 2021

Hey @MikalDev! I was able to build greenworks with the latest Steamworks SDK v1.51.
So this repo definitely needs some love in the documentation!

I also found a bug in the binding.gyp that was preventing me to build it properly in macOS: #295
And this might be also bugging the prebuilds: ElectronForConstruct/greenworks-prebuilds#349

@Leka74
Copy link

Leka74 commented Jul 30, 2021

@podrivo Do you mind writing just a basic how-to to get this working on Mac? I'm having the same issues as you.

@podrivo
Copy link
Author

podrivo commented Jul 30, 2021

Hey @Leka74 ! It took me so long to get this working, but in most part, the Building with electron-rebuild section from this tutorial works.

What I did was:

  • Install latest dependencies: Python v3, node, Xcode, Developer Tools and whatnot. Make sure you have all $PATH and all these environment variables working.
  • Fresh electron-quick-start install. More about this here
  • Install greenworks, but run without scripts: npm install --save --ignore-scripts git+https://github.com/greenheartgames/greenworks.git
  • Download the latest Steamworks SDK v1.51 and copy files inside node_modules/greenworks/deps. Make sure you rename the folder to steamworks_sdk
  • Since we're using the latest SDK, make sure you edit the file node_modules/greenworks/binding.gyp and remove the 32 from the osx32. Find and edit and save the file
  • Install electron-rebuild by running: npm install --save-dev electron-rebuild
  • And then run it: node_modules/.bin/electron-rebuild

This worked for me! Tried in Windows as well and it was successful.
Hope this works for you as well! (:

@Leka74
Copy link

Leka74 commented Jul 30, 2021

Thanks a lot @podrivo, got it working now.

@podrivo podrivo closed this as completed Aug 29, 2021
@podrivo podrivo reopened this Aug 29, 2021
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

3 participants