Rob--/memoryjs

NW build instructions.

LiamKarlMitchell opened this issue · 4 comments

For patching values in memory at runtime of already compiled exe's with a GUI I wanted to use node webkit. (Server manager to spawn processes and keep em alive already done in an old version)

Here are my build notes if it might help others wanting to use this in NW or perhaps the newer Electron.


Building for Node Webkit

We need to install nw-gyp and configure target to the appropriate version of node webkit and architecture.

If you are not sure what version of Node Webkit you have.
You can run this in the debug console.

console.log("nw " + process.versions.nw + " " + process.arch + " node " + process.versions.node)

Note: I am using Python 2.7.12 for compiling.
https://www.python.org/downloads/release/python-2712/

I run the command from a Visual Studio 2017 command prompt window and have already changed directory to the memoryjs directory.

Note: I have nw version 0.15.4 and x64.
Change yours as needed below.

npm install -g nw-gyp
nw-gyp clean configure build --arch=x64 --target=0.15.4

If you get gyp info ok you should be good to go.

Rob-- commented

Thanks for these notes, added a section in the readme that links to this.

Rob-- commented

This post has been copied to the Wiki. Thanks again @LiamKarlMitchell !

@LiamKarlMitchell , do you have any instructions for Electron? Haven't had any luck

Hi @grusigast , I haven't tried with Electron and its been a few years so the versions/process has probably changed.

https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules

There are other issues about electron as well looks like your not the only person having trouble compiling it for electron.
https://github.com/Rob--/memoryjs/issues/107
https://github.com/Rob--/memoryjs/issues/96