Auto Update自动更新

Setting up Auto Updates in your app with Electron Forge is mostly the same process as described in the Electron docs. 使用Electron Forge在应用程序中设置自动更新的过程与Electron文档中描述的过程基本相同。Forge enhances your workflow by publishing your app to the right place for you. Forge通过将您的应用程序发布到适合您的位置来增强您的工作流程。There are two main ways you can do auto updates.有两种主要方式可以进行自动更新。

Open Source Apps开源应用程序 - update.electronjs.org

Open Source apps hosted on github.com can use a free auto update service from the Electron team, update.electronjs.org. To use this with Forge, set up the GitHub publisher and add the update-electron-app module to your app.

This setup is going to be around 2 lines of code and a few lines of configuration, by far the easiest way to set up auto updates if you're an open source app.这个设置大约需要2行代码和几行配置,如果你是一个开源应用程序,这是迄今为止设置自动更新的最简单方法。

Host your own update server托管您自己的更新服务器

If you're not open source or you want slightly more control over your update service you can host your own update server such as nucleus or nuts. See the full list of known Electron update servers in the Electron's Updating Applications docs.

Each update server will have their own configuration for your actual app, but publishing should be done from Forge for most of them:每个更新服务器都会为您的实际应用程序提供自己的配置,但大多数更新服务器的发布都应该在Forge中完成:

/