feat: implement game launcher window functionality and enhance deep link handling

This commit is contained in:
Moyasee
2026-01-21 21:04:22 +02:00
parent 335f4d33b9
commit 9824f7a905
14 changed files with 554 additions and 14 deletions

View File

@@ -1,10 +1,11 @@
import { registerEvent } from "../register-event";
import { shell } from "electron";
import { spawn } from "child_process";
import { spawn } from "node:child_process";
import { parseExecutablePath } from "../helpers/parse-executable-path";
import { gamesSublevel, levelKeys } from "@main/level";
import { GameShop } from "@types";
import { parseLaunchOptions } from "../helpers/parse-launch-options";
import { WindowManager } from "@main/services";
const openGame = async (
_event: Electron.IpcMainInvokeEvent,
@@ -28,6 +29,9 @@ const openGame = async (
launchOptions,
});
// Always show the launcher window when launching a game
WindowManager.createGameLauncherWindow(shop, objectId);
if (parsedParams.length === 0) {
shell.openPath(parsedPath);
return;

View File

@@ -0,0 +1,8 @@
import { registerEvent } from "../register-event";
import { WindowManager } from "@main/services";
const closeGameLauncherWindow = async () => {
WindowManager.closeGameLauncherWindow();
};
registerEvent("closeGameLauncherWindow", closeGameLauncherWindow);

View File

@@ -1,12 +1,15 @@
import "./can-install-common-redist";
import "./check-homebrew-folder-exists";
import "./close-game-launcher-window";
import "./delete-temp-file";
import "./show-game-launcher-window";
import "./get-hydra-decky-plugin-info";
import "./hydra-api-call";
import "./install-common-redist";
import "./install-hydra-decky-plugin";
import "./open-checkout";
import "./open-external";
import "./open-main-window";
import "./save-temp-file";
import "./show-item-in-folder";
import "./show-open-dialog";

View File

@@ -0,0 +1,8 @@
import { registerEvent } from "../register-event";
import { WindowManager } from "@main/services";
const openMainWindow = async () => {
WindowManager.openMainWindow();
};
registerEvent("openMainWindow", openMainWindow);

View File

@@ -0,0 +1,8 @@
import { registerEvent } from "../register-event";
import { WindowManager } from "@main/services";
const showGameLauncherWindow = async () => {
WindowManager.showGameLauncherWindow();
};
registerEvent("showGameLauncherWindow", showGameLauncherWindow);