feat: implement common redistributables preflight checks and UI updates

- Added preflight check for common redistributables during game launch.
- Introduced new translation keys for preflight status messages.
- Updated GameLauncher component to handle preflight progress and display status.
- Enhanced CommonRedistManager with methods to reset and check preflight status.
- Integrated logging for preflight checks and redistributable installations.
- Added spinner animation to indicate loading state in the UI.
This commit is contained in:
Moyasee
2026-01-29 18:23:40 +02:00
parent ae0f1ce355
commit 85a4bdb7b1
11 changed files with 468 additions and 9 deletions

View File

@@ -11,6 +11,7 @@ import "./is-main-window-open";
import "./open-checkout";
import "./open-external";
import "./open-main-window";
import "./reset-common-redist-preflight";
import "./save-temp-file";
import "./show-item-in-folder";
import "./show-open-dialog";

View File

@@ -3,6 +3,8 @@ import { CommonRedistManager } from "@main/services/common-redist-manager";
const installCommonRedist = async (_event: Electron.IpcMainInvokeEvent) => {
if (await CommonRedistManager.canInstallCommonRedist()) {
// Reset preflight status so the user can force a re-run
await CommonRedistManager.resetPreflightStatus();
CommonRedistManager.installCommonRedist();
}
};

View File

@@ -0,0 +1,8 @@
import { registerEvent } from "../register-event";
import { CommonRedistManager } from "@main/services/common-redist-manager";
const resetCommonRedistPreflight = async (
_event: Electron.IpcMainInvokeEvent
) => CommonRedistManager.resetPreflightStatus();
registerEvent("resetCommonRedistPreflight", resetCommonRedistPreflight);