mirror of
https://github.com/FAUSheppy/homelab_gamevault
synced 2025-12-06 06:51:36 +01:00
wip: regfile install
This commit is contained in:
Binary file not shown.
@@ -1,3 +1,6 @@
|
|||||||
|
import subprocess
|
||||||
|
import os
|
||||||
|
|
||||||
def _template_registry_file(template_file, game_path=None):
|
def _template_registry_file(template_file, game_path=None):
|
||||||
'''Template the registry file before installation'''
|
'''Template the registry file before installation'''
|
||||||
pass
|
pass
|
||||||
@@ -9,6 +12,17 @@ def unpack_software(software_cache_path, target_path):
|
|||||||
def install_registry_file(registry_file, game_path=None):
|
def install_registry_file(registry_file, game_path=None):
|
||||||
'''Install a given registy file'''
|
'''Install a given registy file'''
|
||||||
|
|
||||||
|
# test path:
|
||||||
|
# ./example_software_root/FreeDink/registry_files/game_path_example_1.reg
|
||||||
|
|
||||||
|
# windows sucky sucky #
|
||||||
|
if not os.path.isabs(registry_file):
|
||||||
|
registry_file = os.path.join(os.getcwd(), registry_file)
|
||||||
|
p = subprocess.Popen(["python", "regedit.py", registry_file],
|
||||||
|
subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
|
||||||
|
|
||||||
|
print(p.communicate())
|
||||||
|
|
||||||
def install_extra_files(extra_files_list, path):
|
def install_extra_files(extra_files_list, path):
|
||||||
'''Copy/Install extra gamedata to a give location'''
|
'''Copy/Install extra gamedata to a give location'''
|
||||||
pass
|
pass
|
||||||
|
|||||||
14
regedit.py
Normal file
14
regedit.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
from pyuac.main_decorator import main_requires_admin
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
@main_requires_admin(return_output=True)
|
||||||
|
def main(registry_file):
|
||||||
|
p = subprocess.Popen(["regedit", registry_file],
|
||||||
|
subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
|
||||||
|
stdout, stderr = p.communicate()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
registry_file = sys.argv[-1]
|
||||||
|
rv = main(registry_file)
|
||||||
|
print(rv)
|
||||||
Reference in New Issue
Block a user