diff --git a/electron/app/ipc/libreoffice_install_handlers.ts b/electron/app/ipc/libreoffice_install_handlers.ts index 0b10baa9..5dba285b 100644 --- a/electron/app/ipc/libreoffice_install_handlers.ts +++ b/electron/app/ipc/libreoffice_install_handlers.ts @@ -211,6 +211,7 @@ async function installWindows(wc: WebContents): Promise { const ps = `$p = Start-Process -FilePath "msiexec" -ArgumentList "/i", '${destEscaped}', "/qn", "/norestart" -Verb RunAs -Wait -PassThru; if ($p) { exit $p.ExitCode } else { exit 1 }`; const child = spawn("powershell", ["-NoProfile", "-ExecutionPolicy", "Bypass", "-Command", ps], { stdio: ["ignore", "pipe", "pipe"], + windowsHide: true, }); child.stdout?.on("data", (d: Buffer) => sendLog(wc, "info", d.toString())); child.stderr?.on("data", (d: Buffer) => sendLog(wc, "warn", d.toString())); diff --git a/electron/app/main.ts b/electron/app/main.ts index 75df3a61..0a526938 100644 --- a/electron/app/main.ts +++ b/electron/app/main.ts @@ -30,6 +30,10 @@ ipcMain.handle("startup:get-status", () => startupStatus); app.commandLine.appendSwitch('gtk-version', '3'); +// Work around Chromium/Electron GPU compositor issues that can cause +// startup white screens on some Linux/driver combinations. +app.disableHardwareAcceleration(); + // Mitigate "Unable to move the cache: Access is denied" on Windows (Chromium disk cache). // Use explicit cache paths and remove stale old_* dirs that cause move failures. if (process.platform === "win32") { diff --git a/electron/app/utils/libreoffice-check.ts b/electron/app/utils/libreoffice-check.ts index f2c4469b..6b991a52 100644 --- a/electron/app/utils/libreoffice-check.ts +++ b/electron/app/utils/libreoffice-check.ts @@ -280,6 +280,7 @@ export async function isLibreOfficeInstalled(): Promise const quoted = `"${candidate}"`; const { stdout } = await execAsync(`${quoted} --version`, { timeout: 8_000, + windowsHide: process.platform === "win32", }); return { installed: true, version: stdout.trim(), path: candidate }; } catch { @@ -293,6 +294,7 @@ export async function isLibreOfficeInstalled(): Promise try { const { stdout } = await execAsync("soffice --version", { timeout: 8_000, + windowsHide: process.platform === "win32", }); // Found via PATH – record the bare command name as the path so callers // can pass it directly to subprocess invocations. diff --git a/electron/app/utils/servers.ts b/electron/app/utils/servers.ts index 077f1fc7..210035ad 100644 --- a/electron/app/utils/servers.ts +++ b/electron/app/utils/servers.ts @@ -40,8 +40,9 @@ export async function startFastApiServer( args, { cwd: directory, - stdio: ["inherit", "pipe", "pipe"], + stdio: ["ignore", "pipe", "pipe"], env: { ...process.env, ...env }, + windowsHide: process.platform === "win32" && !isDev, } ); fastApiProcess.stdout.on("data", (data: any) => { diff --git a/electron/servers/fastapi/server.spec b/electron/servers/fastapi/server.spec index 7fd17588..b4220572 100644 --- a/electron/servers/fastapi/server.spec +++ b/electron/servers/fastapi/server.spec @@ -72,7 +72,7 @@ exe = EXE( bootloader_ignore_signals=False, strip=False, upx=True, - console=True, + console=False, disable_windowed_traceback=False, argv_emulation=False, target_arch=None,