branchseer / DeskGap

A cross-platform desktop app framework based on Node.js and the system webview
https://deskgap.com/
MIT License
1.83k stars 75 forks source link

How to upgrade version of Node #78

Open vpress-admin opened 2 years ago

vpress-admin commented 2 years ago

I understand that this project is no longer maintained and is pretty much dead. But the Electron like APIs and vastly reduced bundle size and support for vibrancy are a must for me. Only thing holding me back is the Node 12.x. I've built the project but can't work out how to upgrade Node. Anyone able to help on this..?

ci010 commented 2 years ago

Basically, you need to change the node version cmake file here https://github.com/patr0nus/DeskGap/blob/master/node/CMakeLists.txt#L48.

But that won't work, as current master is using nod at https://github.com/patr0nus/DeskGap/blob/master/node/CMakeLists.txt#L49, the nod and DeskGap is not up-to-date. While you set the version to like node 17, it will failed as libnode release format changed.

Basically, the DeskGap depends on nod to bootstrap nodejs, and nod is using libnode as static library to link node. Though, you only need to fork libnode to make it work (or you can use my fork).

For detail, see my fork of libnode, and my fork of DeskGap. The recent commits should explain how this work. You need to focus on the cmake file changes in node/CMakeLists.txt and bootstraping code in node/src/main.cc.