diff --git a/ElectronClient/app/checkForUpdates.js b/ElectronClient/app/checkForUpdates.js index ef5eb3692..96f71f8cd 100644 --- a/ElectronClient/app/checkForUpdates.js +++ b/ElectronClient/app/checkForUpdates.js @@ -1,31 +1,15 @@ const { dialog } = require('electron') -const { autoUpdater } = require('electron-updater') const { Logger } = require('lib/logger.js'); const { _ } = require('lib/locale.js'); +const fetch = require('node-fetch'); +const packageInfo = require('./packageInfo.js'); +const compareVersions = require('compare-versions'); let autoUpdateLogger_ = new Logger(); let checkInBackground_ = false; let isCheckingForUpdate_ = false; let parentWindow_ = null; -// Note: Electron Builder's autoUpdater is incredibly buggy so currently it's only used -// to detect if a new version is present. If it is, the download link is simply opened -// in a new browser window. -autoUpdater.autoDownload = false; - -function htmlToText_(html) { - let output = html.replace(/\n/g, ''); - output = output.replace(/
  • /g, '- '); - output = output.replace(/

    /g, ''); - output = output.replace(/<\/p>/g, '\n'); - output = output.replace(/<\/li>/g, '\n'); - output = output.replace(/