[bugfix] Update DepotDownloader to fix connection to Steam errors

This commit is contained in:
MathieuG-P
2024-10-12 16:24:47 +02:00
parent ce6fb95aa2
commit 99d125d35d
24 changed files with 461 additions and 90 deletions
@@ -12,11 +12,11 @@ ipc.on<ImportVersionOptions>("import-version", (req, reply) => {
reply(versionManager.importVersion(req.args));
});
// #region Steam
// #region Steam
ipc.on("is-dotnet-6-installed", (_, reply) => {
ipc.on("is-dotnet-installed", (_, reply) => {
const installer = BsSteamDownloaderService.getInstance();
reply(from(installer.isDotNet6Installed()));
reply(from(installer.isDotNetInstalled()));
});
ipc.on("bs-download.installation-folder", (_, reply) => {
@@ -83,4 +83,4 @@ ipc.on("bs-oculus-clear-auth-token", async (_, reply) => {
reply(from(oculusDownloader.clearAuthToken()));
});
// #endregion
// #endregion
@@ -44,7 +44,7 @@ export class BsSteamDownloaderService {
return path.join(this.utils.getAssetsScriptsPath(), "depot-downloader", `DepotDownloader.${process.platform === 'linux' ? 'dll' : 'exe'}`);
}
public async isDotNet6Installed(): Promise<boolean> {
public async isDotNetInstalled(): Promise<boolean> {
try {
const proc = process.platform === 'linux'
? spawnSync('dotnet', [this.getDepotDownloaderExePath()])
@@ -55,7 +55,7 @@ export class BsSteamDownloaderService {
}
return true;
} catch (e) {
log.error("Error while checking .NET 6", e);
log.error("Error while checking .NET 8", e);
return false;
}
}
@@ -45,8 +45,8 @@ export class SteamDownloaderService extends AbstractBsDownloaderService implemen
this.linkOpener = LinkOpenerService.getInstance();
}
public isDotNet6Installed(): Promise<boolean> {
return lastValueFrom(this.ipcService.sendV2<boolean>("is-dotnet-6-installed"));
public isDotNetInstalled(): Promise<boolean> {
return lastValueFrom(this.ipcService.sendV2<boolean>("is-dotnet-installed"));
}
private setSteamSession(username: string): void { localStorage.setItem(this.STEAM_SESSION_USERNAME_KEY, username); }
@@ -63,7 +63,7 @@ export class SteamDownloaderService extends AbstractBsDownloaderService implemen
});
if (choice === "0") {
this.linkOpener.open("https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-6.0.12-windows-x64-installer");
this.linkOpener.open("https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.10-windows-x64-installer");
}
}
@@ -221,7 +221,7 @@ export class SteamDownloaderService extends AbstractBsDownloaderService implemen
const downloadPromise = (async () => {
const haveDotNet = await this.isDotNet6Installed().catch(() => false);
const haveDotNet = await this.isDotNetInstalled().catch(() => false);
if(!haveDotNet){
this.showDotNetNotInstalledError();
return Promise.reject(new Error("DotNet not installed"));