How to build for nw.js 0.54.0?
Hello, how to build for nw.js 0.54.0?
While it should be possible to also use prebuild for building native module for nw.js, this does not look so smooth like building for node or electron.
Took several attempts to build for the latest release 0.77.0, but it's pretty tricky. First hirdle is, that nw-gyp, which will be used for the actual build, still relies on Python 2. After solving this issue I am now stuck getting it to work with my msvc setup - tried 2015, 2017, 2019 and 2022 and it wouldn't take any of them :-/.
Anyone got more experience in building for nw.js? Otherwise I would tend to say: use electron :x
It's work for me
cd node_modules/better-sqlite3
npx nw-gyp rebuild --release --build-from-source --runtime=nwjs --target=0.80.0
You can change 0.80.0 to the version you want
hey @neoxpert
I personally recommend you to use electron. The construction of nwjs needs to handle prod dependencies by itself. nw-builder will not automatically copy required dependencies. There doesn't seem to be this problem in electron. I'm not sure, I didn't go into a complete comparison