ffi、ref、serialport在electron中重編譯

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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容