nwjs官网 NW.js
编译sqlite3
1.本机安装有vs,vs2015,vs2017都可以
2.安装Python 2.7.14 https://www.python.org/downloads/
3.安装nodejs
4.安装 npm install nw-gyp -g
5.下载sqlite3源码 https://github.com/TryGhost/node-sqlite3#building-for-node-webkit
解压进入目录
参考github的编译方法执行
npm install --build-from-source --runtime=node-webkit --target_arch=x64 --target=0.38.2
或是下面的方式
执行 nw-gyp rebuild --target=0.38.2 --arch=x64
或是
node-pre-gyp rebuild --runtime=node-webkit --target=0.38.2 --arch=x64
编译成功后会在lib\binding下面有个node_sqlite3.node,就是编译的扩展文件
可以自己引入使用,也可以使用下载下来的整个文件夹包含packet.json当成一个node_modules模块引入使用
解决nwjs无法播放视频或mp3的问题
需要到下面
Releases · nwjs-ffmpeg-prebuilt/nwjs-ffmpeg-prebuilt · GitHub
地址找到对应的ffmpeg版本,下载下来替换原来的dll