1、sudo npm i electron -g一直失敗html
最終解決辦法:使用了sudo cnpm i electron -g安裝成功 node
緣由不詳npm
2、打包問題架構
一、使用electron-packager打包app
命令:electron
electron-packager . HelloWorld --mac --out ../HellorldApp --arch=x64 --electron-version=4.0.7 --overwrite --ignore=node_module
大概格式是這樣的:.net
electron-packager <應用目錄> <應用名稱> <打包平臺> --out <輸出目錄> <架構> <應用版本>
更換icon
electron-packager . hello --mac --out ./hello-app --arch=x64 --electron-version=4.0.7 --overwrite --ignore=node_module --icon=./static/img/333.icns
搜索你想要的icon:https://www.easyicon.net/1129415-Dictionary_icon.htmlhtm