-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from fhilipecrash/feat/add-wine-lutris-integra…
…tion Added modal to warning user if Wine or Lutris is not installed
- Loading branch information
Showing
13 changed files
with
140 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,8 @@ out/ | |
|
||
.vscode/ | ||
|
||
.venv | ||
|
||
dev.db | ||
|
||
__pycache__ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Document as YMLDocument } from "yaml"; | ||
import { Game } from "@main/entity"; | ||
import path from "node:path"; | ||
|
||
export const generateYML = (game: Game) => { | ||
const slugifiedGameTitle = game.title.replace(/\s/g, "-").toLocaleLowerCase(); | ||
|
||
const doc = new YMLDocument({ | ||
name: game.title, | ||
game_slug: slugifiedGameTitle, | ||
slug: `${slugifiedGameTitle}-installer`, | ||
version: "Installer", | ||
runner: "wine", | ||
script: { | ||
game: { | ||
prefix: "$GAMEDIR", | ||
arch: "win64", | ||
working_dir: "$GAMEDIR" | ||
}, | ||
installer: [{ | ||
task: { | ||
name: "create_prefix", | ||
arch: "win64", | ||
prefix: "$GAMEDIR" | ||
} | ||
}, { | ||
task: { | ||
executable: path.join(game.downloadPath, game.folderName, "setup.exe"), | ||
name: "wineexec", | ||
prefix: "$GAMEDIR" | ||
} | ||
}] | ||
} | ||
}); | ||
|
||
return doc.toString(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/renderer/pages/shared-modals/binary-not-found-modal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Modal } from "@renderer/components" | ||
import { useTranslation } from "react-i18next"; | ||
|
||
interface BinaryNotFoundModalProps { | ||
visible: boolean; | ||
onClose: () => void; | ||
} | ||
|
||
export const BinaryNotFoundModal = ({ | ||
visible, | ||
onClose | ||
}: BinaryNotFoundModalProps) => { | ||
const { t } = useTranslation("binary_not_found_modal"); | ||
|
||
return ( | ||
<Modal | ||
visible={visible} | ||
title={t("title")} | ||
description={t("description")} | ||
onClose={onClose} | ||
> | ||
{t("instructions")} | ||
</Modal> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters