From ca1e5bb0b4547132f3d66b3cc0255394744cdf93 Mon Sep 17 00:00:00 2001 From: Ramiro Saenz Date: Tue, 12 Jul 2016 22:13:59 -0300 Subject: [PATCH] Removed autoUpdate functionallity Now, the user will be notify from Firebase and download it manually. --- electron/autoupdater.js | 36 ------------------------------------ electron/main.js | 4 ---- 2 files changed, 40 deletions(-) delete mode 100644 electron/autoupdater.js diff --git a/electron/autoupdater.js b/electron/autoupdater.js deleted file mode 100644 index 66bb5100..00000000 --- a/electron/autoupdater.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; -const electron = require('electron'); -const fs = require('fs'); -const path = require('path'); -const app = electron.app; -const dialog = electron.dialog; - -const isDev = !fs.existsSync(path.resolve(path.dirname(process.execPath), '..', 'Update.exe')); - -const autoUpdater = electron.autoUpdater; - -const feedUrl = `https://getrambox.herokuapp.com/update/${process.platform}/${app.getVersion()}`; - -exports.check = win => { - if ( isDev ) return; - /* - autoUpdater.on('update-available', function() { - dialog.showMessageBox({ - message: 'New version' - ,detail: 'There is a new version available.' - ,buttons: ['Ok'] - }); - }); - */ - autoUpdater.on('update-downloaded', function(e, releaseNotes, releaseName, releaseDate, updateURL) { - var index = dialog.showMessageBox({ - message: 'A new update is ready to install' - ,detail: 'Version ' + releaseName + ' is downloaded and will be automatically installed on Quit. Do you want to restart now?' - ,buttons: ['Yes', 'No'] - }); - if (index === 0) autoUpdater.quitAndInstall(); - }); - - autoUpdater.setFeedURL(feedUrl); - autoUpdater.checkForUpdates(); -}; diff --git a/electron/main.js b/electron/main.js index d5e4e10b..08478b7c 100644 --- a/electron/main.js +++ b/electron/main.js @@ -11,8 +11,6 @@ const shell = require('electron').shell; const appMenu = require('./menu'); // Require for tray file const tray = require('./tray'); -// Require for autpUpdate file -const autoupdater = require('./autoupdater'); // Window State Plugin const windowStateKeeper = require('electron-window-state'); @@ -130,8 +128,6 @@ function createWindow () { tray.create(mainWindow); - autoupdater.check(mainWindow); - mainWindow.on('page-title-updated', (e, title) => updateBadge(title)); // Open links in default browser