forked from oier/kdm_story_app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
63 lines (53 loc) · 1.37 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
const {
app,
BrowserWindow,
Menu,
protocol,
ipcMain,
dialog,
Notification,
} = require('electron')
// const log = require('electron-log')
// const ProgressBar = require('electron-progressbar')
// const { autoUpdater } = require('electron-updater')
require('v8-compile-cache');
app.commandLine.appendSwitch('--autoplay-policy', 'no-user-gesture-required', '--no-sandbox')
// app.disableHardwareAcceleration();
let template = []
// if (process.platform === 'darwin') {
// OS X
const name = app.getName()
function createWindow () {
// Create the browser window.
win = new BrowserWindow({
// width: 1440,
// height: 900,
// resizable: false,
resizable: true,
fullscreen: true,
webPreferences: {
// devTools: true,
preload: 'js/jquery.min.js',
nodeIntegration: true,
// sandbox: false,
// preload: 'js/jquery-ui.js'
},
backgroundColor: '#000000',
title: 'KDM 1.5 Story',
// frame: false,
})
// global.sharedObj = {path: app.getPath('userData')};
// and load the index.html of the app.
win.removeMenu();
win.loadFile('index.html')
// app.disableHardwareAcceleration();
// win.webContents.openDevTools();
}
let win
// app.enableSandbox()
app.on('ready', function () {
// Create the Menu
// const menu = Menu.buildFromTemplate(template)
// Menu.setApplicationMenu(menu)
createWindow()
})