Skip to content

Commit

Permalink
Fixed autoupdater
Browse files Browse the repository at this point in the history
  • Loading branch information
“Andre committed Aug 25, 2017
1 parent 2406463 commit 5097189
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 0 additions & 1 deletion autoupdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const os = require('os');
const {app, autoUpdater, dialog} = require('electron');
const version = app.getVersion();
const platform = os.platform() + '_' + os.arch(); // usually returns darwin_64

const updaterFeedURL = 'http://enupal-feed.herokuapp.com/update/' + platform + '/' + version;
// replace updaterFeedURL with http://yourappname.herokuapp.com

Expand Down
14 changes: 13 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,24 @@ function createWindow(){

const page = win.webContents;

page.once('did-frame-finish-load', () => {
/*page.once('did-frame-finish-load', () => {
const checkOS = isWindowsOrmacOS();
if (checkOS && !isDev) {
// Initate auto-updates on macOs and windows
appUpdater();
}});
*/
const checkOS = isWindowsOrmacOS();
if (checkOS && !isDev) {
let newWin = new BrowserWindow ({width: 400, height:200})
newWin.loadURL(url.format({
pathname: path.join(__dirname, 'enupal.html'),
protocol: 'file',
slashes: true
}))
// Initate auto-updates on macOs and windows
appUpdater();
}

//win.webContents.openDevTools()
}
Expand Down

0 comments on commit 5097189

Please sign in to comment.