This commit is contained in:
mingyuansi
2026-06-10 10:49:05 +08:00
2 changed files with 22 additions and 2 deletions

View File

@@ -2,12 +2,15 @@ const { app, BrowserWindow } = require('electron')
const path = require('path')
app.whenReady().then(() => {
const sceneArg = process.argv.find(a => a.startsWith('--scene='))
const query = sceneArg ? { scene: sceneArg.split('=')[1] } : {}
const win = new BrowserWindow({
fullscreen: true,
autoHideMenuBar: true,
webPreferences: { nodeIntegration: false }
})
win.loadFile(path.join(__dirname, '..', 'dist', 'index.html'))
win.loadFile(path.join(__dirname, '..', 'dist', 'index.html'), { query })
})
app.on('window-all-closed', () => app.quit())