123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- const { app, BrowserWindow, Menu } = require('electron')
- const path = require('path')
- const utils = require('./utils');
- app.whenReady().then(() => {
- createWindow()
-
- })
- app.on('window-all-closed', () => {
- if (process.platform !== 'darwin') {
- app.quit()
- }
- })
- const createWindow = () => {
- const win = new BrowserWindow({
- width: 800,
- height: 600,
- webPreferences: {
- preload: path.join(__dirname, 'preload.js'),
-
- nodeIntegrationInWorker: true,
-
- nodeIntegration: true,
- enableRemoteModule: true,
-
-
-
-
- }
- })
- app.on('activate', () => {
- if (BrowserWindow.getAllWindows().length === 0) {
- createWindow();
- }
- });
- win.webContents.openDevTools();
- win.loadFile('view/index/index.html')
-
- }
|