Implement auto_updater with Squirrel.

This commit is contained in:
Cheng Zhao 2014-01-21 22:13:34 +08:00
parent ef8e5505c8
commit df399f7c8c
8 changed files with 63 additions and 182 deletions

View file

@ -4,9 +4,8 @@ EventEmitter = require('events').EventEmitter
AutoUpdater::__proto__ = EventEmitter.prototype
autoUpdater = new AutoUpdater
autoUpdater.on 'will-install-update-raw', (event, version) ->
@emit 'will-install-update', event, version, => @continueUpdate()
autoUpdater.on 'ready-for-update-on-quit-raw', (event, version) ->
@emit 'ready-for-update-on-quit', event, version, => @quitAndInstall()
autoUpdater.on 'update-downloaded-raw', (args...) ->
args[2] = new Date(args[2]) # releaseDate
@emit 'update-downloaded', args..., => @quitAndInstall()
module.exports = autoUpdater