forked from heywoodlh/jumpfm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
43 lines (34 loc) · 1.13 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
const updater = require('electron-simple-updater');
const electron = require('electron')
const app = electron.app
const BrowserWindow = electron.BrowserWindow
const path = require('path')
const url = require('url')
// const log = require('electron-log');
app.on('window-all-closed', function() {
if (process.platform != 'darwin') {
app.quit();
}
});
app.on('ready', function() {
updater.init(
'https://raw.githubusercontent.com/Gilad-Kutiel-App/jumpfm/master/updates.json'
);
const { width, height } = electron.screen.getPrimaryDisplay().workAreaSize;
const w = parseInt(width * .8);
const h = parseInt(height * .8);
global.argv = process.argv
// log.transports.file.level = 'debug';
// log.transports.console.level = 'debug';
// Create the browser window.
let mainWindow = new BrowserWindow({
width: w,
height: h,
icon: path.join(__dirname, 'build/icons/64x64.png'),
});
// mainWindow.setMenu(null);
mainWindow.loadURL('file://' + __dirname + '/index.html');
mainWindow.on('closed', function() {
mainWindow = null;
});
});