2020-11-10 17:17:58 +00:00
|
|
|
const { app, BrowserWindow } = require('electron');
|
2023-06-15 14:42:27 +00:00
|
|
|
const path = require('node:path');
|
2020-11-10 17:17:58 +00:00
|
|
|
|
|
|
|
app.whenReady().then(() => {
|
|
|
|
const win = new BrowserWindow({
|
|
|
|
show: false,
|
|
|
|
webPreferences: {
|
|
|
|
nodeIntegration: true,
|
|
|
|
preload: path.resolve(__dirname, 'preload.js')
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
win.loadURL('about:blank');
|
|
|
|
|
|
|
|
win.webContents.on('render-process-gone', () => {
|
|
|
|
process.exit(1);
|
|
|
|
});
|
|
|
|
|
|
|
|
win.webContents.on('did-finish-load', () => {
|
|
|
|
setTimeout(() => app.quit());
|
|
|
|
});
|
|
|
|
});
|