initial autoupdate support:

- add support via electron-updater, use electron-log for logging
- targets: update to dmg+zip and nsis to support autoupdater
- run autoupdate check on load
This commit is contained in:
Ilya Kreymer
2020-12-10 21:08:44 -08:00
parent 0e9ea9f2fc
commit 97163edfac
4 changed files with 55 additions and 2 deletions
+11
View File
@@ -11,6 +11,9 @@ import { IPFSClient } from '@webrecorder/wabac/src/ipfs';
import { PassThrough, Readable } from 'stream';
import { autoUpdater } from "electron-updater";
import log from "electron-log";
import mime from 'mime-types';
global.Headers = Headers;
@@ -158,7 +161,15 @@ class ElectronReplayApp
});
}
checkUpdates() {
autoUpdater.logger = log;
autoUpdater.logger.transports.file.level = 'info';
autoUpdater.checkForUpdatesAndNotify();
}
onAppReady() {
this.checkUpdates();
this.screenSize = screen.getPrimaryDisplay().workAreaSize;
app.on('web-contents-created', (event, contents) => {