An example usage of nw.js, edge.js, node-serialport, node-ffi and angular.js.
Note: Only support Windows 32-bit
Assuming the version of nw.js is 0.12.1.
- npm install edge
- cd node_modules\edge
- nw-gyp rebuild --target=0.12.1 --arch=ia32 --target_arch=ia32
- copy build\release\edge.node lib\native\win32\ia32\0.12.0
- edit lib\edge.js
//nw.js is based off IO.js v1.2.0
- [ /^0\.12\./, '0.12.0' ]
+ [ /1.2.0/, '0.12.0' ]
- npm install serialport
- cd node_modules\serialport
- node-pre-gyp rebuild --runtime=node-webkit --target=0.12.1 --target_arch=ia32
- edit package.json
//edit node_abi
- "module_path": "./build/{module_name}/v{version}/{configuration}/{node_abi}-{platform}-{arch}/",
+ "module_path": "./build/{module_name}/v{version}/{configuration}/node-webkit-v0.12.1-{platform}-{arch}/",
- npm install ref
- npm install ffi
- cd node_modules\ref
- nw-gyp rebuild --target=0.12.1 --target_arch=ia32
- cd ..\ffi
- nw-gyp rebuild --target=0.12.1 --target_arch=ia32