-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
37 lines (33 loc) · 780 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
const {app, BrowserWindow} = require('electron');
app.on('ready', function() {
const mainWindow = new BrowserWindow({
width: 1280,
height: 768,
frame: false,
center: true,
show: false,
title: "MS2-Launcher",
icon: "icon.png",
maximizable: false,
fullscreenable: false,
resizable: false,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true
}
});
mainWindow.loadFile('index.html');
mainWindow.webContents.on('did-finish-load', function() {
mainWindow.show();
});
mainWindow.on('close',function() {
app.quit();
});
mainWindow.webContents.openDevTools();
});
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});