node 8.0+ python v2.7 vs stdudio c++2015/2017 node-gyp node-com https://github.com/nodebots/electron-serialport
查看dll 方法 vs -- cmd dumpbin /exports +dll路徑
后臺項目安裝ffi注意事項 1、其他模塊先安裝 ffi安裝失敗的話(刪除package.json中ffi依賴手動安裝) npm install cnpm install ffi --save-dev (管理員權(quán)限)不然打包客戶端打不進去
成功安裝ffi模塊 安裝ref模塊
重編譯
調(diào)用64位dll
ffi、ref 模塊下 cmd管理員權(quán)限運行
node-gyp rebuild --target=4.0.1 --arch=x64 --target_arch=x64 --dist-url=https://npm.taobao.org/mirrors/atom-shell或者
node-gyp rebuild --target=4.0.1 --arch=x64 --target_arch=x64 --dist-url=https://atom.io/download/electron
target ---electron 版本號
調(diào)用32位dll
node 換成x32
node-gyp rebuild --target=4.0.1 --arch=ia32 --target_arch=ia32 --dist-url=https://npm.taobao.org/mirrors/atom-shell
或者一鍵編譯
electron-builder install-app-deps
electron-rebuild