fix: Issues with launching and installation on the steam deck
This commit is contained in:
parent
dc0f2d150a
commit
ccc5a05ed7
19 changed files with 247 additions and 80 deletions
|
|
@ -9,7 +9,7 @@ import { getOrCachedGithubRelease } from "../cache";
|
|||
import Seven from 'node-7z';
|
||||
import fs from "node:fs/promises";
|
||||
import { Downloader } from "@/bun/utils/downloader";
|
||||
import { move } from "fs-extra";
|
||||
import { ensureDir, move } from "fs-extra";
|
||||
import { simulateProgress } from "@/bun/utils";
|
||||
|
||||
type EmulatorDownloadStates = "download" | "extract";
|
||||
|
|
@ -82,7 +82,7 @@ export class EmulatorDownloadJob implements IJob<z.infer<typeof EmulatorDownload
|
|||
{
|
||||
if (isArchive)
|
||||
{
|
||||
if (await downloader.start() && destinationPaths[0])
|
||||
if (destinationPaths[0])
|
||||
{
|
||||
let destinationPath = destinationPaths[0];
|
||||
await new Promise((resolve, reject) =>
|
||||
|
|
@ -108,6 +108,13 @@ export class EmulatorDownloadJob implements IJob<z.infer<typeof EmulatorDownload
|
|||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
await ensureDir(emulatorsFolder);
|
||||
for (const destPath of destinationPaths)
|
||||
{
|
||||
await fs.rename(destPath, path.join(emulatorsFolder, path.basename(destPath)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue