diff --git a/assets/scripts/DepotDownloader b/assets/scripts/DepotDownloader new file mode 100755 index 00000000..b4beaa82 Binary files /dev/null and b/assets/scripts/DepotDownloader differ diff --git a/package.json b/package.json index e9b34a39..0dcc3a2b 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,10 @@ "target": [ "AppImage" ], - "category": "Development" + "category": "Development", + "extraResources": [ + "./assets/scripts/DepotDownloader" + ] }, "directories": { "app": "release/app", diff --git a/src/main/services/bs-version-download/bs-steam-downloader.service.ts b/src/main/services/bs-version-download/bs-steam-downloader.service.ts index 881f75bc..111e7fd7 100644 --- a/src/main/services/bs-version-download/bs-steam-downloader.service.ts +++ b/src/main/services/bs-version-download/bs-steam-downloader.service.ts @@ -41,14 +41,12 @@ export class BsSteamDownloaderService { } private getDepotDownloaderExePath(): string { - return path.join(this.utils.getAssetsScriptsPath(), "DepotDownloader.exe"); + return path.join(this.utils.getAssetsScriptsPath(), process.platform === 'linux' ? "DepotDownloader" : "DepotDownloader.exe"); } public async isDotNet6Installed(): Promise { try { - const proc = process.platform === 'linux' - ? spawnSync('dotnet', [this.getDepotDownloaderExePath()]) - : spawnSync(this.getDepotDownloaderExePath()); + const proc = spawnSync(this.getDepotDownloaderExePath()); if (proc.stderr?.toString()) { log.error("no dotnet", proc.stderr.toString()); return false; @@ -89,8 +87,8 @@ export class BsSteamDownloaderService { const args = DepotDownloader.buildArgs(depotDownloaderOptions); const depotDownloader = new DepotDownloader({ - command: isLinux ? 'dotnet' : exePath, - args: isLinux ? [exePath, ...args] : args, + command: exePath, + args: args, options: { cwd: await this.installLocationService.versionsDirectory() }, echoStartData: downloadVersion }, log);