2013-06-03 17:59:34 +08:00
|
|
|
AutoUpdater = process.atomBinding('auto_updater').AutoUpdater
|
|
|
|
EventEmitter = require('events').EventEmitter
|
|
|
|
|
|
|
|
AutoUpdater::__proto__ = EventEmitter.prototype
|
|
|
|
|
2013-06-03 18:21:13 +08:00
|
|
|
autoUpdater = new AutoUpdater
|
2014-01-21 22:13:34 +08:00
|
|
|
autoUpdater.on 'update-downloaded-raw', (args...) ->
|
|
|
|
args[2] = new Date(args[2]) # releaseDate
|
|
|
|
@emit 'update-downloaded', args..., => @quitAndInstall()
|
2013-06-03 18:21:13 +08:00
|
|
|
|
|
|
|
module.exports = autoUpdater
|