Skip to content

Commit

Permalink
Correct autoUpdater
Browse files Browse the repository at this point in the history
  • Loading branch information
ClumsyLee committed Oct 9, 2015
1 parent ad486c1 commit 70b1b24
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,21 @@ var Tray = require('tray');
var BrowserWindow = require('browser-window');

var autoUpdater = require('auto-updater');
console.log('http://net-tsinghua.herokuapp.com/update/osx/' + app.getVersion());
autoUpdater.on('error', function (event, message) {
console.log(message);
})
});
autoUpdater.on('checking-for-update', function () {
console.log('Checking for update');
});
autoUpdater.on('update-available', function () {
console.log('Update available');
});
autoUpdater.on('update-not-available', function () {
console.log('Update not available');
});
autoUpdater.on('update-downloaded', function () {
console.log('Update downloaded');
});
autoUpdater.setFeedUrl('http://net-tsinghua.herokuapp.com/update/darwin_x64/' + app.getVersion());

var fs = require('fs');
Expand Down Expand Up @@ -166,6 +177,7 @@ app.on('ready', function() {
appIcon.setToolTip('This is my application.');

update_status(); // First shot.
autoUpdater.checkForUpdates(); // Check for updates.
});

app.on('window-all-closed', function() {});

0 comments on commit 70b1b24

Please sign in to comment.