wine mode: allows opt
authorNiki Roo <niki@nikiroo.be>
Fri, 25 Apr 2025 15:53:21 +0000 (17:53 +0200)
committerNiki Roo <niki@nikiroo.be>
Fri, 25 Apr 2025 15:53:21 +0000 (17:53 +0200)
gamiki/support/commands.py
gamiki/support/support_win.py

index ec0b07d460f2cb5c2a0408f5f827561b36e896c2..11b9ce17d54c058b6e89054c4ce1175d0ff8b00d 100644 (file)
@@ -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)
index 6446c95e712f1f81294f3069af82eef2a6a4b061..8fc8ac412916e116c31b5c3c8149945e7453c96d 100644 (file)
@@ -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)