2013-06-03 09:59:34 +00:00
|
|
|
AutoUpdater = process.atomBinding('auto_updater').AutoUpdater
|
|
|
|
EventEmitter = require('events').EventEmitter
|
|
|
|
|
|
|
|
AutoUpdater::__proto__ = EventEmitter.prototype
|
|
|
|
|
2013-06-03 10:21:13 +00:00
|
|
|
autoUpdater = new AutoUpdater
|
|
|
|
autoUpdater.on 'will-install-update-raw', (event, version) ->
|
|
|
|
@emit 'will-install-update', event, version, => @continueUpdate()
|
2013-06-03 13:51:46 +00:00
|
|
|
autoUpdater.on 'ready-for-update-on-quit-raw', (event, version) ->
|
|
|
|
@emit 'ready-for-update-on-quit', event, version, => @quitAndInstall()
|
2013-06-03 10:21:13 +00:00
|
|
|
|
|
|
|
module.exports = autoUpdater
|