[bugfix] reduce DLL deps of "oculus-allow-dev-sideload.exe" and add log file to all external scripts

This commit is contained in:
MathieuG-P
2025-01-11 18:14:41 +01:00
parent 467ca6e300
commit 17bd2e8463
13 changed files with 542 additions and 24 deletions
@@ -11,6 +11,7 @@ import { CustomError } from "../../../shared/models/exceptions/custom-error.clas
import { UtilsService } from "../utils.service";
import { exec } from "child_process";
import { LaunchMods } from "shared/models/bs-launch/launch-option.interface";
import { app } from "electron";
export class SteamLauncherService extends AbstractLauncherService implements StoreLauncherInterface{
@@ -124,7 +125,7 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
this.launchBs(bsExePath, launchArgs, spawnOpts).exit
) : (
new Promise<number>(resolve => {
const adminProcess = exec(`"${this.getStartBsAsAdminExePath()}" "${bsExePath}" ${launchArgs.join(" ")}`, spawnOpts);
const adminProcess = exec(`"${this.getStartBsAsAdminExePath()}" "${bsExePath}" ${launchArgs.join(" ")} --log-path "${path.join(app.getPath("logs"), "bs-admin-start.log")}"`, spawnOpts);
adminProcess.on("error", err => {
log.error("Error while starting BS as Admin", err);
resolve(-1)
+2 -2
View File
@@ -3,7 +3,7 @@ import { pathExist, resolveGUIDPath } from "../helpers/fs.helpers";
import log from "electron-log";
import { lstat } from "fs-extra";
import { tryit } from "../../shared/helpers/error.helpers";
import { shell } from "electron";
import { app, shell } from "electron";
import { isProcessRunning } from "../helpers/os.helpers";
import { sToMs } from "../../shared/helpers/time.helpers";
import { execOnOs } from "../helpers/env.helpers";
@@ -169,7 +169,7 @@ export class OculusService {
return new Promise((resolve, reject) => {
log.info("Enabling sideloaded apps");
const process = exec(exePath);
const process = exec(`"${exePath}" --log-path "${path.join(app.getPath("logs"), "oculus-allow-dev-sideloaded.log")}"`);
process.on("exit", code => {
if(code === 0){
resolve();