mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
Merge pull request #356 from Zagrios/bugfix/unable-to-launch-oculus-version-after-staying-in-the-version-page-while-downloading
[bugfix] BS version page being downloaded was always recognized as a Steam version, preventing launching if it was an Oculus version
This commit is contained in:
@@ -2,6 +2,7 @@ import { LaunchOption } from "shared/models/bs-launch";
|
||||
import { BSLocalVersionService } from "../bs-local-version.service";
|
||||
import { ChildProcessWithoutNullStreams, SpawnOptionsWithoutStdio, spawn } from "child_process";
|
||||
import path from "path";
|
||||
import log from "electron-log";
|
||||
|
||||
export abstract class AbstractLauncherService {
|
||||
|
||||
@@ -39,6 +40,8 @@ export abstract class AbstractLauncherService {
|
||||
spawnOptions.windowsVerbatimArguments = true;
|
||||
}
|
||||
|
||||
log.info(`Launch BS exe at ${bsExePath} with args ${args?.join(" ")}`);
|
||||
|
||||
return spawn(bsExePath, args, spawnOptions);
|
||||
|
||||
}
|
||||
|
||||
@@ -108,7 +108,11 @@ export class BsOculusDownloaderService {
|
||||
private async createDownloadVersion(version: BSVersion): Promise<{version: BSVersion, dest: string}>{
|
||||
const dest = await ensurePathNotAlreadyExist(await this.versions.getVersionPath(version));
|
||||
return {
|
||||
version: {...version, ...(path.basename(dest) !== version.BSVersion && { name: path.basename(dest) })},
|
||||
version: {
|
||||
...version,
|
||||
...(path.basename(dest) !== version.BSVersion && { name: path.basename(dest) }),
|
||||
metadata: { store: BsStore.OCULUS }
|
||||
},
|
||||
dest
|
||||
};
|
||||
}
|
||||
|
||||
@@ -64,7 +64,11 @@ export class BsSteamDownloaderService {
|
||||
|
||||
const versionPath = await this.localVersionService.getVersionPath(downloadInfos.bsVersion);
|
||||
const dest = downloadInfos.isVerification ? versionPath : await ensurePathNotAlreadyExist(versionPath);
|
||||
const downloadVersion: BSVersion = { ...downloadInfos.bsVersion, ...(path.basename(dest) !== downloadInfos.bsVersion.BSVersion && { name: path.basename(dest) }) };
|
||||
const downloadVersion: BSVersion = {
|
||||
...downloadInfos.bsVersion,
|
||||
...(path.basename(dest) !== downloadInfos.bsVersion.BSVersion && { name: path.basename(dest) }),
|
||||
metadata: { store: BsStore.STEAM }
|
||||
};
|
||||
|
||||
const depotDownloaderOptions: DepotDownloaderArgsOptions = {
|
||||
app: BS_APP_ID,
|
||||
|
||||
Reference in New Issue
Block a user