Add Electron GUI and packaging scripts

This commit is contained in:
thePR0M3TH3AN
2025-06-19 13:04:11 -04:00
parent 52f243ab26
commit b54b051405
11 changed files with 167 additions and 0 deletions

28
gui/electron/main.js Normal file
View File

@@ -0,0 +1,28 @@
const { app, BrowserWindow, ipcMain } = require('electron');
const { spawn } = require('child_process');
const path = require('path');
function createWindow() {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
preload: path.join(__dirname, 'preload.js')
}
});
win.loadFile('index.html');
}
app.whenReady().then(createWindow);
ipcMain.handle('run-quickstart', async () => {
return new Promise((resolve, reject) => {
const proc = spawn('voxvera', ['quickstart'], { stdio: 'inherit' });
proc.on('close', code => resolve(code));
proc.on('error', err => reject(err));
});
});
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit();
});