Skip to content

Commit

Permalink
hest
Browse files Browse the repository at this point in the history
  • Loading branch information
lmelbye committed Jun 5, 2019
1 parent 3f1b4fd commit c0007d9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
28 changes: 28 additions & 0 deletions autoupdate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const log = require('electron-log');
const electron = require('electron')
const autoUpdater = electron.autoUpdater

log.info('auto update loaded');


autoUpdater.on('error', (ev, err) => {
log.info(err);
})

autoUpdater.once('checking-for-update', (ev, err) => {
log.info('Checking for updates');
})

autoUpdater.once('update-available', (ev, err) => {
log.info('Update available. Downloading');
})

autoUpdater.once('update-not-available', (ev, err) => {
log.info('Update not available');
})

autoUpdater.once('update-downloaded', (ev, err) => {
log.info('Update downloaded');
})

autoUpdater.checkForUpdates()
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ else
iconpath = path.join(__dirname, 'assets', 'servicepos.png')

if (require('electron-squirrel-startup')) return app.quit();
require('update-electron-app')()
require('./autolauncher.js');
require('./autoupdate')
require('./autolauncher');

let tray = null
function createWindow() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "printdesk",
"version": "1.0.0",
"version": "1.0.1",
"productName": "Printdesk",
"description": "A electron app for connecting printers to ServicePOS",
"main": "main.js",
Expand Down
2 changes: 1 addition & 1 deletion util.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ const process = require('process');

module.exports = {
isDev : function() {
return true && process.mainModule.filename.indexOf('app.asar') === -1;
return true || process.mainModule.filename.indexOf('app.asar') === -1;
}
}

0 comments on commit c0007d9

Please sign in to comment.