From b2749060767c0117b8a1b3c0b91cef73ba2f9ca7 Mon Sep 17 00:00:00 2001 From: dtookey Date: Thu, 15 Apr 2021 11:46:20 -0400 Subject: [PATCH] removed autoupdate for beta "testing" --- src/index.js | 58 +++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/src/index.js b/src/index.js index e217e45..53756fc 100644 --- a/src/index.js +++ b/src/index.js @@ -5,40 +5,38 @@ require('update-electron-app')({ const updateCheckInterval = 1000 * 60 const path = require('path') -const {app, BrowserWindow, autoUpdater} = require('electron') +const {app, BrowserWindow} = require('electron') const server = 'https://update.jdsconsulting.net' const url = `${server}/update/${process.platform}/${app.getVersion()}` -autoUpdater.setFeedURL({url}) - -autoUpdater.checkForUpdates(); -setInterval(() => { - console.log("Checking for update..."); - autoUpdater.checkForUpdates(); -}, updateCheckInterval) - -autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => { - console.log("Handling updates...") - const dialogOpts = { - type: 'info', - buttons: ['Restart', 'Later'], - title: 'Application Update', - message: process.platform === 'win32' ? releaseNotes : releaseName, - detail: 'A new version has been downloaded. Restart the application to apply the updates.' - } - - dialog.showMessageBox(dialogOpts).then((returnValue) => { - if (returnValue.response === 0) autoUpdater.quitAndInstall() - }) -}) - -autoUpdater.on('error', message => { - console.error('There was a problem updating the application') - console.error(message) -}) - - +// autoUpdater.setFeedURL({url}) +// +// autoUpdater.checkForUpdates(); +// setInterval(() => { +// console.log("Checking for update..."); +// autoUpdater.checkForUpdates(); +// }, updateCheckInterval) +// +// autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => { +// console.log("Handling updates...") +// const dialogOpts = { +// type: 'info', +// buttons: ['Restart', 'Later'], +// title: 'Application Update', +// message: process.platform === 'win32' ? releaseNotes : releaseName, +// detail: 'A new version has been downloaded. Restart the application to apply the updates.' +// } +// +// dialog.showMessageBox(dialogOpts).then((returnValue) => { +// if (returnValue.response === 0) autoUpdater.quitAndInstall() +// }) +// }) +// +// autoUpdater.on('error', message => { +// console.error('There was a problem updating the application') +// console.error(message) +// }) const debug = /--debug/.test(process.argv[2])