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

Commit

Permalink
Use update-electron-app (#361)
Browse files Browse the repository at this point in the history
* remove old autoUpdater code

* use update-electron-app module

* fix package lock synchronicity

* update package lock

* re-add removed call to initialize function

* lint
  • Loading branch information
zeke authored and codebytere committed Aug 1, 2018
1 parent 3adb6fc commit 92af4e7
Show file tree
Hide file tree
Showing 4 changed files with 1,124 additions and 1,363 deletions.
113 changes: 0 additions & 113 deletions auto-updater.js

This file was deleted.

23 changes: 5 additions & 18 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
require('update-electron-app')({
logger: require('electron-log')
})

const path = require('path')
const glob = require('glob')
const {app, BrowserWindow} = require('electron')
const autoUpdater = require('./auto-updater')

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

Expand Down Expand Up @@ -44,7 +47,6 @@ function initialize () {

app.on('ready', () => {
createWindow()
autoUpdater.initialize()
})

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

// Handle Squirrel on Windows startup events
switch (process.argv[1]) {
case '--squirrel-install':
autoUpdater.createShortcut(() => { app.quit() })
break
case '--squirrel-uninstall':
autoUpdater.removeShortcut(() => { app.quit() })
break
case '--squirrel-obsolete':
case '--squirrel-updated':
app.quit()
break
default:
initialize()
}
initialize()
Loading

0 comments on commit 92af4e7

Please sign in to comment.