mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-26 06:54:56 +03:00
fix: game installing do not reach linux steps
This commit is contained in:
parent
f1f98de03a
commit
de4307e2a5
@ -15,9 +15,9 @@ const openGameInstaller = async (
|
|||||||
) => {
|
) => {
|
||||||
const game = await gameRepository.findOne({ where: { id: gameId } });
|
const game = await gameRepository.findOne({ where: { id: gameId } });
|
||||||
|
|
||||||
if (!game) return true;
|
if (!game || !game.folderName) return true;
|
||||||
|
|
||||||
const gamePath = path.join(
|
let gamePath = path.join(
|
||||||
game.downloadPath ?? (await getDownloadsPath()),
|
game.downloadPath ?? (await getDownloadsPath()),
|
||||||
game.folderName
|
game.folderName
|
||||||
);
|
);
|
||||||
@ -28,13 +28,12 @@ const openGameInstaller = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
const setupPath = path.join(gamePath, "setup.exe");
|
const setupPath = path.join(gamePath, "setup.exe");
|
||||||
if (!fs.existsSync(setupPath)) {
|
if (fs.existsSync(setupPath)) {
|
||||||
shell.openPath(gamePath);
|
gamePath = setupPath;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
shell.openPath(setupPath);
|
shell.openPath(gamePath);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +45,7 @@ const openGameInstaller = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (spawnSync("which", ["wine"]).status === 0) {
|
if (spawnSync("which", ["wine"]).status === 0) {
|
||||||
exec(`wine "${setupPath}"`);
|
exec(`wine "${gamePath}"`);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user