electron/docs/api/browser/auto-updater.md

43 lines
1 KiB
Markdown
Raw Normal View History

2013-09-09 07:35:57 +00:00
# auto-updater
2013-08-14 22:43:35 +00:00
The `auto-updater` module is a simple wrap around the
[Squirrel](https://github.com/Squirrel/Squirrel.Mac) framework, you should
follow Squirrel's instructions on setting the server.
2013-08-14 22:43:35 +00:00
## Event: checking-for-update
2013-08-14 22:43:35 +00:00
Emitted when checking for update has started.
2013-08-14 22:43:35 +00:00
## Event: update-available
Emitted when there is an available update, the update would be downloaded
automatically.
## Event: update-not-available
2013-08-14 22:43:35 +00:00
Emitted when there is no available update.
2013-08-14 22:43:35 +00:00
## Event: update-downloaded
2013-08-14 22:43:35 +00:00
* `event` Event
* `releaseNotes` String
* `releaseName` String
* `releaseDate` Date
* `updateUrl` String
2013-08-14 22:43:35 +00:00
* `quitAndUpdate` Function
Emitted when update has been downloaded, calling `quitAndUpdate()` would restart
the application and install the update.
2013-08-14 22:43:35 +00:00
## autoUpdater.setFeedUrl(url)
* `url` String
Set the `url` and initialize the auto updater. The `url` could not be changed
once it is set.
2013-08-14 22:43:35 +00:00
## autoUpdater.checkForUpdates()
Ask the server whether there is an update, you have to call `setFeedUrl` before
using this API.