const{app,BrowserWindow}=require('electron')constpath=require('path')constcreateWindow=()=>{constwin=newBrowserWindow({width:800,height:600,})win.loadFile(path.join(__dirname,'index.html'))// Assuming the file is located in the same folder}app.whenReady().then(()=>{createWindow()app.on('activate',()=>BrowserWindow.getAllWindows().length===0&&createWindow())})app.on('window-all-closed',()=>process.platform!=='darwin'&&app.quit())
const{app,BrowserWindow}=require('electron')constpath=require('path')functioncreateWindow(){constwin=newBrowserWindow({width:800,height:600,})win.loadFile(path.join(__dirname,'gui','index.html'))// Assuming the GUI files are in a folder called gui}app.whenReady().then(()=>{createWindow()app.on('activate',()=>{if (BrowserWindow.getAllWindows().length===0){createWindow()}})})app.on('window-all-closed',()=>{if (process.platform!=='darwin'){app.quit()}})