-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.js
More file actions
32 lines (27 loc) · 723 Bytes
/
Copy pathindex.js
File metadata and controls
32 lines (27 loc) · 723 Bytes
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
const { app, BrowserWindow } = require('electron');
const { ipcMain } = require('electron');
const requirejs = require('requirejs');
const path = require('path');
function createWindow () {
ipcMain.handle('get-temp-path', async () => {
const path = app.getPath('temp');
return path;
});
const win = new BrowserWindow({
width: 1200,
height: 800,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true,
},
icon: path.join(__dirname, 'img', 'Chance-the-Gardener_logo_icon.png')
})
win.loadFile('main-menu.html');
}
app.whenReady().then(() => {
createWindow();
});
app.on('window-all-closed', function () {
if (process.platform !== 'darwin') app.quit()
});