Skip to content

Commit

Permalink
Allow running MultiMystery.py from source on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
black-sliver authored and Berserker66 committed Jun 27, 2021
1 parent 8b5d702 commit 50ed657
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions MultiMystery.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import argparse
import logging
import random
from shutil import which


def feedback(text: str):
Expand Down Expand Up @@ -76,8 +77,10 @@ def feedback(text: str):
basemysterycommand = "ArchipelagoMystery.exe" # compiled windows
elif os.path.exists("ArchipelagoMystery"):
basemysterycommand = "./ArchipelagoMystery" # compiled linux
elif which('py'):
basemysterycommand = f"py -{py_version} Mystery.py" # source windows
else:
basemysterycommand = f"py -{py_version} Mystery.py" # source
basemysterycommand = f"python3 Mystery.py" # source others

weights_file_path = os.path.join(player_files_path, weights_file_path)
if os.path.exists(weights_file_path):
Expand Down Expand Up @@ -210,8 +213,10 @@ def _handle_apmc_file(file: str):
baseservercommand = ["ArchipelagoServer.exe"] # compiled windows
elif os.path.exists("ArchipelagoServer"):
baseservercommand = ["./ArchipelagoServer"] # compiled linux
elif which('py'):
baseservercommand = ["py", f"-{py_version}", "MultiServer.py"] # source windows
else:
baseservercommand = ["py", f"-{py_version}", "MultiServer.py"] # source
baseservercommand = ["python3", "MultiServer.py"] # source others
# don't have a mac to test that. If you try to run compiled on mac, good luck.
subprocess.call(baseservercommand + ["--multidata", os.path.join(output_path, multidataname)])
except:
Expand Down

0 comments on commit 50ed657

Please sign in to comment.