mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-09 11:42:21 +03:00
refactor: use path join in yml file
This commit is contained in:
parent
729f3995fa
commit
54e29c12d4
@ -1,13 +1,14 @@
|
||||
import { Document as YMLDocument } from 'yaml';
|
||||
import { Game } from '@main/entity';
|
||||
import path from "node:path";
|
||||
|
||||
export function generateYML(game: Game) {
|
||||
const slugfiedName = game.title.replace(/\s/g, '-').toLocaleLowerCase();
|
||||
const slugfiedGameTitle = game.title.replace(/\s/g, '-').toLocaleLowerCase();
|
||||
|
||||
const doc = new YMLDocument({
|
||||
name: game.title,
|
||||
game_slug: slugfiedName,
|
||||
slug: `${slugfiedName}-installer`,
|
||||
game_slug: slugfiedGameTitle,
|
||||
slug: `${slugfiedGameTitle}-installer`,
|
||||
version: 'Installer',
|
||||
runner: 'wine',
|
||||
script: {
|
||||
@ -19,7 +20,7 @@ export function generateYML(game: Game) {
|
||||
}
|
||||
}, {
|
||||
task: {
|
||||
executable: `${game.downloadPath}/${game.folderName}/setup.exe`,
|
||||
executable: path.join(game.downloadPath, game.folderName, 'setup.exe'),
|
||||
name: "wineexec",
|
||||
prefix: "$GAMEDIR/prefix"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user