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

Build and Dependencies - Windows #3

Open
Apidcloud opened this issue Jan 14, 2018 · 9 comments
Open

Build and Dependencies - Windows #3

Apidcloud opened this issue Jan 14, 2018 · 9 comments

Comments

@Apidcloud
Copy link

Apidcloud commented Jan 14, 2018

Good evening!

I'm really interested in this project (the idea of electron, node and c++ working together). I want to figure out how you put it together and I've been trying to run this project in Windows. But I'm not entirely sure what might be missing.
Here's my process thus far, based on the errors yielded by trying to run npm install:

  • install MinGW and add C:\MinGW\bin\ to PATH (so I can use make from cli)
  • run npm install -g node-gyp
  • run npm --add-python-to-path='true' --debug install --global windows-build-tools (because gyp wasn't finding python - this way it installs 2.7 and so on)
  • git submodule update --init --recursive (to install git submodules. git submodule init didn't really work, maybe due to my git version)

With the above, the result of running npm install still yields the following error:
gyp: Dependency 'build.gyp:glsl-optimizer#target' not found while trying to load target build.gyp:MyEngine#target

Running node-gyp configure build directly yields the same result.

What should I do to install it?

Maybe we can use this fresh attempt to make a step-by-step windows build guide of the project 😄

@tyduptyler13
Copy link
Owner

Hi, currently I am working on this project to rewrite the builder to use cmake instead of gyp.

Gyp is great and I was actually quite reluctant to move away from it but cmake will give me more flexibility to get the builds working on more platforms. So for now, all I can do is suggest you wait. I should have a cmake version out relatively soon.

@Apidcloud
Copy link
Author

Thanks, @tyduptyler13! Meanwhile, I'll be making some tests and taking a look at bindings, particularly nbind.

@tyduptyler13
Copy link
Owner

Sounds great. :) I am glad that the project caught someone's attention. I personally believe this project has a great potential for success. I just need to carve out some more time to work on it. I might do some this afternoon. See if I can get the basic build working again. Unfortunately I started migrating builds half way between changing the underlying renderer to bgfx but I will see if I can't hack something together.

@Apidcloud
Copy link
Author

Sorry for the late response. Been a little busy lately.

It really does have potential. I tend to run away from Qt 😅, and have been using electron for a while now, so it's great.
A friend and I are still focusing on 2D for the moment (see https://github.com/joafalves/Gibbo2D and https://github.com/scarlettgamestudio), but I'm looking forward to taking a deeper look at this repo when you make the build changes. After we release Scarlett's base version (which shouldn't take long hopefully...), I'll invest a bit on native modules (particularly using C++ and Rust)

Thanks!

@tyduptyler13
Copy link
Owner

Not a problem I have been pretty distracted with work lately anyways. I too have been working to create a game of my own but unfortunately I need the money and talent to get something like that off the ground. I feel like I may get back into this again soon though. My distractions are running out 😄 and I miss doing engine programming.

@JipBoesenkool
Copy link

JipBoesenkool commented Dec 2, 2018

Encountered the same error, any updates?

`

Jips-MacBook-Pro:MyEngine Jip$ npm install

electron@2.0.14 postinstall /Users/Jip/Desktop/programmeren/electron/MyEngine/node_modules/electron
node install.js

MyEngine@0.0.7 install /Users/Jip/Desktop/programmeren/electron/MyEngine
node-gyp rebuild

gyp: Dependency 'build.gyp:glsl-optimizer#target' not found while trying to load target build.gyp:MyEngine#target
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Jip/Desktop/programmeren/electron/MyEngine
gyp ERR! node -v v8.2.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! MyEngine@0.0.7 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the MyEngine@0.0.7 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! /Users/Jip/.npm/_logs/2018-12-02T12_42_55_372Z-debug.log
Jips-MacBook-Pro:MyEngine Jip$
`

@tyduptyler13
Copy link
Owner

tyduptyler13 commented Dec 3, 2018

The current build is still in pieces. I keep looking at the engine to improve it but just haven't had the motivation to implement the core renderer again.

If you want to toy around with the engine I recommend checking out the Alpha-7 tag and building that. It should work ok so long as EVERYTHING is built using the same compiler. (I'm pretty sure you'll be ok since you are on mac, but if electron was cross compiled then its a huge pain to build properly)

I am glad to see that there is still interest in this project though. Would you mind sharing what attributes about this feel the most worthwhile to you?

@JipBoesenkool
Copy link

I am glad to see that there is still interest in this project though. Would you mind sharing what attributes about this feel the most worthwhile to you?

For me personally, I'm still exploring possibilities.
I would like to replace my dependency on Chromium Embedded Framework for something more stable aka Electron. Besides this, I currently spend alot of time recreating functionality node.js already offers and like using web technologies for UI and prototyping.

Thus, the idea is to use Electron as a base, do prototyping first before I implement all the low level systems in C++ with the possibility to move that logic later to C++.

Currently the big question is if I can use my own render context which seems you have/had figured out.

@tyduptyler13
Copy link
Owner

Hi, thanks for sharing.

Yes, if you are interested in sharing contexts then Alpha-7 was the last stable release and will happily do what you need (although you may have to implement some shaders and such). Since then I figuratively have ripped everything appart again to put bgfx in as the core rendering framework with all of my math and object libraries as an abstraction layer.

I originally started this with the goal of being a native speed rendering library with an API that is extremely similar to three.js that was easy to mod/prototype with nodejs. Since then I also added electron with the goal of having html as a UI framework but also added the bonus of having other window controls and browsing. The problem with this is remaining abi compatible with electron is a huge pain and I've been hoping to replace it with something else. I am open to any external input for design or desired features though.

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