-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
52 lines (31 loc) · 952 Bytes
/
main.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
44
45
46
47
48
const electron = require('electron');
const { app, BrowserWindow } = electron;
const path = require('path');
const url = require('url');
const { autoUpdater } = require("electron-updater");
const { ipcMain } = require('electron');
//setTimeout(loopPos, 2000);
let win
function createWindow() {
win = new BrowserWindow({frame: false,
webPreferences: {
webSecurity: false
} })
app.commandLine.appendSwitch('ignore-certificate-errors');
win.loadURL(url.format({
pathname: path.join(__dirname, './app/engine/login/login.html'),
protocol: 'file',
webPreferences: {
devTools: true
}
}))
win.maximize();
win.setFullScreen(true)
win.once('ready-to-show', () => win.show)
//if(config.env != 'test')
//autoUpdater.checkForUpdates();
}
ipcMain.on('close-me', (evt, arg) => {
app.quit()
})
app.on('ready',createWindow)