mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-23 15:52:41 +02:00
Add comments for missing features in launcher script
This commit is contained in:
1 parent
28bdccd322
commit
9ac8af6639
1 file changed
+26
-4
+26
-4
@@ -2,14 +2,36 @@
|
||||
import argparse
|
||||
import subprocess
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
xdg_data_home = os.environ["XDG_XATA_HOME"]
|
||||
|
||||
# Create data/saves/mods directories if needed
|
||||
for directory in ["data", "saves", "mods"]:
|
||||
abs_dir = os.path.join(os.environ["XDG_DATA_HOME"], directory
|
||||
abs_dir = os.path.join(xdg_data_home, directory)
|
||||
if not os.path.isdir(abs_dir):
|
||||
os.makedirs(abs_dir)
|
||||
|
||||
xdg_data_home = os.environ["XDG_XATA_HOME"]
|
||||
default_args = ["--basedir", f"{xdg_data_home}/data", "--savedir", f"{xdg_data_home}/saves"]
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
# TODO: Implement ability to select game ROM and choose correct executable based on that choice
|
||||
# - check for .z64 files in data path
|
||||
# - if none found, exit with error message
|
||||
# - if only one found:
|
||||
# - check filename or md5sum and run appropriate executable
|
||||
# - if no matches, exit with error message
|
||||
# - for each rom:
|
||||
# - if rom filename matches selected version, run game
|
||||
# - else:
|
||||
# - md5sum the roms one by one
|
||||
# - if one matches the selected version: use that one
|
||||
# - else error out
|
||||
|
||||
# TODO: implement mod loading
|
||||
# - if romdir parameter is relative, prefix with $XDG_DATA_HOME/mods
|
||||
# - else use as is
|
||||
|
||||
# TODO: implement arbitrary other parameters
|
||||
# - get unmatched arguments from ArgumentParser
|
||||
# - pass them through to executable
|
||||
|
||||
default_args = ["--basedir", f"{xdg_data_home}/data", "--savedir", f"{xdg_data_home}/saves"]
|
||||
subprocess.run(["pd"] + default_args)
|
||||
Reference in new issue
Block a user