mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-31 14:51:02 +00:00
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:
@@ -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";
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
8
src/main/events/misc/reset-common-redist-preflight.ts
Normal file
8
src/main/events/misc/reset-common-redist-preflight.ts
Normal 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);
|
||||
Reference in New Issue
Block a user