Skip to content
This repository was archived by the owner on Dec 5, 2022. It is now read-only.

Commit 92af4e7

Browse files
zekecodebytere
authored andcommitted
Use update-electron-app (#361)
* remove old autoUpdater code * use update-electron-app module * fix package lock synchronicity * update package lock * re-add removed call to initialize function * lint
1 parent 3adb6fc commit 92af4e7

File tree

4 files changed

+1124
-1363
lines changed

4 files changed

+1124
-1363
lines changed

auto-updater.js

-113
This file was deleted.

main.js

+5-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
require('update-electron-app')({
2+
logger: require('electron-log')
3+
})
4+
15
const path = require('path')
26
const glob = require('glob')
37
const {app, BrowserWindow} = require('electron')
4-
const autoUpdater = require('./auto-updater')
58

69
const debug = /--debug/.test(process.argv[2])
710

@@ -44,7 +47,6 @@ function initialize () {
4447

4548
app.on('ready', () => {
4649
createWindow()
47-
autoUpdater.initialize()
4850
})
4951

5052
app.on('window-all-closed', () => {
@@ -82,21 +84,6 @@ function makeSingleInstance () {
8284
function loadDemos () {
8385
const files = glob.sync(path.join(__dirname, 'main-process/**/*.js'))
8486
files.forEach((file) => { require(file) })
85-
autoUpdater.updateMenu()
8687
}
8788

88-
// Handle Squirrel on Windows startup events
89-
switch (process.argv[1]) {
90-
case '--squirrel-install':
91-
autoUpdater.createShortcut(() => { app.quit() })
92-
break
93-
case '--squirrel-uninstall':
94-
autoUpdater.removeShortcut(() => { app.quit() })
95-
break
96-
case '--squirrel-obsolete':
97-
case '--squirrel-updated':
98-
app.quit()
99-
break
100-
default:
101-
initialize()
102-
}
89+
initialize()

0 commit comments

Comments
 (0)