[feat/663] moved to advanced settings section + finalisations

This commit is contained in:
LiamillionSS
2024-11-23 08:14:52 +11:00
parent 4f42b3ffcf
commit ef72ba642a
19 changed files with 100 additions and 37 deletions
@@ -29,6 +29,9 @@ export abstract class AbstractLauncherService {
if (launchOptions.additionalArgs) {
launchArgs.push(...launchOptions.additionalArgs);
}
if (launchOptions.launchVR) {
launchArgs.push(...launchOptions.launchVR);
}
return Array.from(new Set(launchArgs).values());
}
@@ -105,7 +105,8 @@ export class BSLauncherService {
oculus: params.oculusMode === "true",
desktop: params.desktopMode === "true",
debug: params.debug === "true",
additionalArgs: params.additionalArgs
additionalArgs: params.additionalArgs,
skipVR: params.skipVR === "true",
};
return res;
@@ -123,6 +124,7 @@ export class BSLauncherService {
if(launchOptions.desktop){ res.desktopMode = "true"; }
if(launchOptions.debug){ res.debug = "true"; }
if(launchOptions.additionalArgs){ res.additionalArgs = launchOptions.additionalArgs; }
if(launchOptions.skipVR){ res.skipVR = "true"; }
return res;
}
@@ -239,6 +241,7 @@ type ShortcutParams = {
desktopMode?: string;
debug?: string;
additionalArgs?: string[];
skipVR?: string;
version: string;
versionName?: string;
versionIno?: string;
@@ -77,8 +77,12 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
throw CustomError.fromError(new Error(`Path not exist : ${exePath}`), BSLaunchError.BS_NOT_FOUND);
}
//const staticConfigService = StaticConfigurationService.getInstance();
//const skipVR = await staticConfigService.get("skipVR");
const skipVR: boolean = launchOptions.skipVR ?? false;
// Open Steam if not running
if(!(await this.steam.steamRunning())){
if(!skipVR && !(await this.steam.steamRunning())){
obs.next({type: BSLaunchEvent.STEAM_LAUNCHING});
await this.steam.openSteam().then(() => {
@@ -88,6 +92,9 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
obs.next({type: BSLaunchWarning.UNABLE_TO_LAUNCH_STEAM});
});
}
else if (!launchOptions.desktop) {
obs.next({ type: BSLaunchEvent.SKIPPING_STEAM_LAUNCH});
}
// Backup SteamVR when desktop mode is enabled
if(launchOptions.desktop){