1.安装electron-updater npm install electron-updater --save-dev 2.编写更新代码 const { autoUpdater } = require('electron-updater') ipcMain.on('checkForUpdate', e => updateHandle() ) // 检测更新,在你想要检查更新的时候执行,renderer事件触发后的操作自行编写 function updateHandle () { autoUpdater...
在Windows上,您必须先将自己的应用程序安装到用户的机器中,然后才能使用autoUpdater ,因此建议您使用electronic-winstaller,electron-forge或grunt-electron-installer软件包来生成Windows安装程序。 当使用electronic-winstaller或电子伪造时,请确保您第一次运行时不尝试更新应用程序(另请参阅此问题以获取更多信息)。 还建议您...