From b3bff4ef3fae3e45a0928f549e5013b67e63f0bf Mon Sep 17 00:00:00 2001 From: Stelios Tsampas Date: Mon, 18 Dec 2023 10:44:47 +0200 Subject: [PATCH] Paths: Apply the executable rename in `pythonw` too Fixes launching the game launcher when Rare is installed through `pip` on Windows. Fixes: #339 --- rare/utils/paths.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rare/utils/paths.py b/rare/utils/paths.py index 1af6a67f..83083b37 100644 --- a/rare/utils/paths.py +++ b/rare/utils/paths.py @@ -156,8 +156,10 @@ def get_rare_executable() -> List[str]: executable.append(os.path.abspath(sys.argv[0])) if executable[0].endswith("python.exe"): - # be sure to start consoleless then + # be sure to start console-less then executable[0] = executable[0].replace("python.exe", "pythonw.exe") + + if executable[0].endswith("pythonw.exe"): if executable[1].endswith("rare"): executable[1] = executable[1] + ".exe" else: