Skip to content

Commit

Permalink
Updates working
Browse files Browse the repository at this point in the history
Remote updates are working. Changed installer to oneClick
  • Loading branch information
bratsos committed May 16, 2017
1 parent ae6c90f commit bcb9071
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Switch",
"version": "1.0.3",
"version": "1.0.7",
"description": "Manage your favourite streamers",
"homepage": "./",
"main": "src/electron-starter.js",
Expand Down Expand Up @@ -28,8 +28,8 @@
"icon": "public/logo.ico"
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"oneClick": true,
"allowToChangeInstallationDirectory": false,
"runAfterFinish": false,
"installerIcon": "public/logo.ico"
},
Expand Down
15 changes: 13 additions & 2 deletions src/electron-starter.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,19 @@ autoUpdater.on('update-downloaded', (ev, info) => {
autoUpdater.quitAndInstall();
})

autoUpdater.on('update-not-available', (ev, info) => {
mainWindow.webContents.executeJavaScript(`console.log('no updates')`);
autoUpdater.on('checking-for-update', () => {
mainWindow.webContents.executeJavaScript(`console.log('checking for updates')`);
})

autoUpdater.on('update-not-available', (info) => {
mainWindow.webContents.executeJavaScript(`console.log('updates not available')`);
mainWindow.webContents.executeJavaScript(`console.log('${info}')`);
})

autoUpdater.on('error', (ev, err) => {
mainWindow.webContents.executeJavaScript(`console.log('error on updates')`);
mainWindow.webContents.executeJavaScript(`console.log('${err}')`);
mainWindow.webContents.executeJavaScript(`console.log('${ev}')`);
})
function createWindow() {
// Create the browser window.
Expand Down

0 comments on commit bcb9071

Please sign in to comment.