From 7dd69a1f89e9b6f07dd4381ef5884e17e3848f3e Mon Sep 17 00:00:00 2001 From: Ramiro Saenz Date: Tue, 2 Oct 2018 17:07:55 -0300 Subject: [PATCH] Added autoUpdate for Mac --- app.js | 2 +- app/Application.js | 2 +- electron/updater.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 9547bc2f..fd174c4f 100644 --- a/app.js +++ b/app.js @@ -43,7 +43,7 @@ ipc.on('autoUpdater:update-available', function() { ,buttons: Ext.Msg.OK }); }); -ipc.on('autoUpdater:update-downloaded', function(e, releaseNotes, releaseName, releaseDate, updateURL) { +ipc.on('autoUpdater:update-downloaded', function(version, files, path, sha512, releaseName, releaseNotes, releaseDate, stagingPercentage) { Ext.cq1('app-main').addDocked({ xtype: 'toolbar' ,dock: 'top' diff --git a/app/Application.js b/app/Application.js index 70625e7d..71b21547 100644 --- a/app/Application.js +++ b/app/Application.js @@ -283,7 +283,7 @@ Ext.define('Rambox.Application', { } ] }); - if ( process.platform === 'win32' ) ipc.send('autoUpdater:check-for-updates'); + if ( process.platform === 'win32' || process.platform === 'darwin' ) ipc.send('autoUpdater:check-for-updates'); return; } else if ( !silence ) { Ext.Msg.show({ diff --git a/electron/updater.js b/electron/updater.js index 8f6cd023..122c10ee 100644 --- a/electron/updater.js +++ b/electron/updater.js @@ -11,7 +11,7 @@ const initialize = (window) => { const webContents = window.webContents; const send = webContents.send.bind(window.webContents); autoUpdater.on('checking-for-update', (event) => send('autoUpdater:checking-for-update')); - autoUpdater.on('update-downloaded', (event, ...args) => send('autoUpdater:update-downloaded', ...args)); + autoUpdater.on('update-downloaded', (...args) => send('autoUpdater:update-downloaded', ...args)); ipcMain.on('autoUpdater:quit-and-install', (event) => autoUpdater.quitAndInstall()); ipcMain.on('autoUpdater:check-for-updates', (event) => autoUpdater.checkForUpdates()); };