def get_steam_path(self, prefix=None): """Return Steam exe's path""" custom_path = self.runner_config.get('steam_path') or '' if custom_path: custom_path = os.path.join(custom_path, 'Steam.exe') if os.path.exists(custom_path): return custom_path candidates = [self.get_default_prefix(), os.path.expanduser("~/.wine")] for prefix in candidates: # Try the default install path steam_path = os.path.join(prefix, "drive_c/Program Files/Steam/Steam.exe") if os.path.exists(steam_path): return steam_path # Try from the registry key user_reg = os.path.join(prefix, "user.reg") if not os.path.exists(user_reg): continue registry = WineRegistry(user_reg) steam_path = registry.query("Software/Valve/Steam", "SteamExe") if not steam_path: steam_path = self.get_open_command(registry) if not steam_path: continue path = registry.get_unix_path(steam_path) path = system.fix_path_case(path) if path: return path
def get_steam_path(self, prefix=None): """Return Steam exe's path""" custom_path = self.runner_config.get('steam_path') or '' if custom_path: custom_path = os.path.expanduser( os.path.join(custom_path, 'Steam.exe')) if os.path.exists(custom_path): return custom_path candidates = [ self.get_default_prefix(arch='win32'), self.get_default_prefix(arch='win64'), os.path.expanduser("~/.wine") ] for prefix in candidates: # Try the default install path steam_path = os.path.join(prefix, "drive_c/Program Files/Steam/Steam.exe") if os.path.exists(steam_path): return steam_path # Try from the registry key user_reg = os.path.join(prefix, "user.reg") if not os.path.exists(user_reg): continue registry = WineRegistry(user_reg) steam_path = registry.query("Software/Valve/Steam", "SteamExe") if not steam_path: steam_path = self.get_open_command(registry) if not steam_path: continue path = registry.get_unix_path(steam_path) path = system.fix_path_case(path) if path: return path
def steam_path(self, prefix=None): """Return Steam exe's path""" if not prefix: prefix = os.path.expanduser("~/.wine") user_reg = os.path.join(prefix, "user.reg") if not os.path.exists(user_reg): return registry = WineRegistry(user_reg) steam_path = registry.query("Software/Valve/Steam", "SteamExe") if not steam_path: steam_path = self.get_open_command(registry) if not steam_path: return path = registry.get_unix_path(steam_path) return fix_path_case(path)
def steam_path(self, prefix=None): """Return Steam exe's path""" if not prefix: prefix = os.path.expanduser("~/.wine") user_reg = os.path.join(prefix, "user.reg") if not os.path.exists(user_reg): return registry = WineRegistry(user_reg) steam_path = registry.query("Software/Valve/Steam", "SteamExe") if not steam_path: steam_path = self.get_open_command(registry) if not steam_path: return path = registry.get_unix_path(steam_path) return fix_path_case(path)