[chore] self-contained depotdownload works on linux

This commit is contained in:
Zagrios
2024-06-03 21:42:48 +02:00
committed by MathieuG-P
parent 86c73239c9
commit d8cfad32a6
3 changed files with 8 additions and 7 deletions
BIN
View File
Binary file not shown.
+4 -1
View File
@@ -64,7 +64,10 @@
"target": [
"AppImage"
],
"category": "Development"
"category": "Development",
"extraResources": [
"./assets/scripts/DepotDownloader"
]
},
"directories": {
"app": "release/app",
@@ -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<boolean> {
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);