1
0
Fork 0
mirror of synced 2024-05-21 04:52:51 +12:00

Fix game launch on windows

This commit is contained in:
lennard 2022-10-18 23:02:38 +02:00
parent 68868c6259
commit b6786171ae
No known key found for this signature in database
GPG key ID: AB6010FE63C7C2B1

View file

@ -169,7 +169,6 @@ def get_rare_executable() -> List[str]:
if "__compiled__" in globals(): if "__compiled__" in globals():
executable = [sys.executable] executable = [sys.executable]
elif platform.system() == "Linux" or platform.system() == "Darwin": elif platform.system() == "Linux" or platform.system() == "Darwin":
# TODO flatpak
if p := os.environ.get("APPIMAGE"): if p := os.environ.get("APPIMAGE"):
executable = [p] executable = [p]
else: else:
@ -186,6 +185,8 @@ def get_rare_executable() -> List[str]:
if executable[0].endswith("python.exe"): if executable[0].endswith("python.exe"):
# be sure to start consoleless then # be sure to start consoleless then
executable[0] = executable[0].replace("python.exe", "pythonw.exe") executable[0] = executable[0].replace("python.exe", "pythonw.exe")
if executable[1].endswith("rare"):
executable[1] = executable[1] + ".exe"
else: else:
executable = [sys.executable] executable = [sys.executable]