mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 00:33:49 +03:00
feat: look for a single alternative setup when installing
This commit is contained in:
parent
f88cd61a23
commit
95a0d55426
@ -54,12 +54,14 @@ const openGameInstaller = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
const gamePathFileNames = fs.readdirSync(gamePath);
|
const gamePathFileNames = fs.readdirSync(gamePath);
|
||||||
const gameAlternativeSetupPath = gamePathFileNames.find(
|
const gamePathExecutableFiles = gamePathFileNames.filter(
|
||||||
(fileName: string) => path.extname(fileName).toLowerCase() === ".exe"
|
(fileName: string) => path.extname(fileName).toLowerCase() === ".exe"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (gameAlternativeSetupPath) {
|
if (gamePathExecutableFiles.length === 1) {
|
||||||
return executeGameInstaller(path.join(gamePath, gameAlternativeSetupPath));
|
return executeGameInstaller(
|
||||||
|
path.join(gamePath, gamePathExecutableFiles[0])
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spawnSync("which", ["lutris"]).status === 0) {
|
if (spawnSync("which", ["lutris"]).status === 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user