wip: implement dependencies & install

This commit is contained in:
Yannik Schmidt
2024-02-25 01:05:53 +01:00
parent d9d63bfe01
commit 2f3050df47
9 changed files with 171 additions and 61 deletions

View File

@@ -27,9 +27,22 @@ def install_extra_files(extra_files_list, path):
'''Copy/Install extra gamedata to a give location'''
pass
def launch_software(path, synchronous=False):
def run_exe(path, synchronous=False):
'''Launches a given software'''
pass
if synchronous:
raise NotImplementedError("SYNC not yet implemented")
print("Executing:", path)
try:
subprocess.Popen(path)
except OSError as e:
if "WinError 740" in str(e):
p = subprocess.Popen(["python", "adminrun.py", path],
subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
print(p.communicate())
else:
raise e
def remove_software(path):
'''Remove a software at the target location'''