Skip to main content

Mac App Store 和 Electron 上的 Windows 自动更新程序

· 3 min read

最近,Electron 新增了两项激动人心的功能:兼容 Mac App Store 的版本和内置的 Windows 自动更新程序。

¥Recently Electron added two exciting features: a Mac App Store compatible build and a built-in Windows auto updater.


Mac App Store 支持

¥Mac App Store Support

v0.34.0 开始,每个 Electron 版本都包含与 Mac App Store 兼容的版本。以前,基于 Electron 构建的应用不符合 Apple 对 Mac App Store 的要求。这些需求大多与私有 API 的使用有关。为了使 Electron 符合沙盒化要求,需要删除两个模块:

¥As of v0.34.0 each Electron release includes a build compatible with the Mac App Store. Previously an application built on Electron would not comply with Apple's requirements for the Mac App Store. Most of these requirements are related to the use of private APIs. In order to sandbox Electron in such a way that it complies with the requirements two modules needed to be removed:

  • crash-reporter

  • auto-updater

此外,在检测 DNS 更改、视频捕获和辅助功能方面,一些行为也发生了变化。你可以在文档中阅读更多关于变更和 将应用提交至 Mac App Store 的信息。发行版可在 Electron 版本发布页面 上找到,前缀为 mas-

¥Additionally some behaviors have changed with respect to detecting DNS changes, video capture and accessibility features. You can read more about the changes and submitting your app to the Mac App store in the documentation. The distributions can be found on the Electron releases page, prefixed with mas-.

相关拉取请求:electron/electron#3108electron/electron#2920

¥Related Pull Requests: electron/electron#3108, electron/electron#2920

Windows 自动更新程序

¥Windows Auto Updater

在 Electron v0.34.1 中,auto-updater 模块得到了改进,以便与 Squirrel.Windows。这意味着 Electron 提供了在 OS X 和 Windows 上自动更新应用的简便方法。你可以在文档中阅读有关 在 Windows 上设置应用自动更新 的更多信息。

¥In Electron v0.34.1 the auto-updater module was improved in order to work with Squirrel.Windows. This means that Electron ships with easy ways for auto updating your app on both OS X and Windows. You can read more on setting up your app for auto updating on Windows in the documentation.

相关拉取请求:electron/electron#1984

¥Related Pull Request: electron/electron#1984