From: Niki Roo Date: Fri, 25 Apr 2025 15:53:21 +0000 (+0200) Subject: wine mode: allows opt X-Git-Url: http://git.nikiroo.be/?a=commitdiff_plain;h=2a4ccbb7845ae33ba92c47aa5005eba5e6fd67e3;p=gamiki.git wine mode: allows opt --- diff --git a/gamiki/support/commands.py b/gamiki/support/commands.py index ec0b07d..11b9ce1 100644 --- a/gamiki/support/commands.py +++ b/gamiki/support/commands.py @@ -52,8 +52,11 @@ def dosbox(dir: PurePath, link: PurePath, opt: str = None) -> int: def wine(dir: PurePath, link: PurePath, opt: str = None) -> int: - # TODO: wine-{opt}.bat - wine_bat = dir.joinpath("wine.bat") + if (opt): + wine_bat = dir.joinpath(f"wine-{opt}.bat") + else: + wine_bat = dir.joinpath("wine.bat") + wine_prefix = dir.joinpath("wine.prefix") cmd, env = custom.cmd("wine", wine_bat, link, wine_prefix) diff --git a/gamiki/support/support_win.py b/gamiki/support/support_win.py index 6446c95..8fc8ac4 100644 --- a/gamiki/support/support_win.py +++ b/gamiki/support/support_win.py @@ -14,7 +14,7 @@ class SupportWin(Support): if (not dir.joinpath("wine.prefix").exists()): raise RuntimeError("Windows game without a wine.prefix") - self._running(game) + self._running(game, opt) rep = wine(dir, game.library.dir.resolve(), opt) if (rep != 0): self._error(game, rep)