def get_runtime_env(self): """Return runtime environment variables with path to wine for Lutris builds""" wine_path = self.get_executable() wine_root = None if WINE_DIR: wine_root = os.path.dirname(os.path.dirname(wine_path)) for proton_path in get_proton_paths(): if proton_path in wine_path: wine_root = os.path.dirname(os.path.dirname(wine_path)) return runtime.get_env( version="Ubuntu-18.04", prefer_system_libs=self.system_config.get("prefer_system_libs", True), wine_path=wine_root, )
def get_path_for_version(self, version): """Return the absolute path of a wine executable for a given version""" if version in WINE_PATHS: return system.find_executable(WINE_PATHS[version]) if "Proton" in version: for proton_path in get_proton_paths(): if os.path.isfile(os.path.join(proton_path, version, "dist/bin/wine")): return os.path.join(proton_path, version, "dist/bin/wine") if version.startswith("PlayOnLinux"): version, arch = version.split()[1].rsplit("-", 1) return os.path.join(POL_PATH, "wine", "linux-" + arch, version, "bin/wine") if version == "custom": return self.runner_config.get("custom_wine_path", "") return os.path.join(WINE_DIR, version, "bin/wine")
def get_path_for_version(self, version): """Return the absolute path of a wine executable for a given version""" # logger.debug("Getting path for Wine %s", version) if version in WINE_PATHS.keys(): return system.find_executable(WINE_PATHS[version]) if "Proton" in version: for proton_path in get_proton_paths(): if os.path.isfile(os.path.join(proton_path, version, "dist/bin/wine")): return os.path.join(proton_path, version, "dist/bin/wine") if version.startswith("PlayOnLinux"): version, arch = version.split()[1].rsplit("-", 1) return os.path.join(POL_PATH, "wine", "linux-" + arch, version, "bin/wine") if version == "custom": return self.runner_config.get("custom_wine_path", "") return os.path.join(WINE_DIR, version, "bin/wine")
def get_path_for_version(self, version): # logger.debug("Getting path for Wine %s", version) if version in WINE_PATHS.keys(): return system.find_executable(WINE_PATHS[version]) if "Proton" in version: for proton_path in get_proton_paths(): if os.path.isfile( os.path.join(proton_path, version, "dist/bin/wine")): return os.path.join(proton_path, version, "dist/bin/wine") if version.startswith("PlayOnLinux"): version, arch = version.split()[1].rsplit("-", 1) return os.path.join(POL_PATH, "wine", "linux-" + arch, version, "bin/wine") if version == "custom": return self.runner_config.get("custom_wine_path", "") return os.path.join(WINE_DIR, version, "bin/wine")
def get_runtime_env(self): """Return runtime environment variables with path to wine for Lutris builds""" wine_path = self.get_executable() wine_root = None if WINE_DIR: wine_root = os.path.dirname(os.path.dirname(wine_path)) for proton_path in get_proton_paths(): if proton_path in wine_path: wine_root = os.path.dirname(os.path.dirname(wine_path)) if "-4." in wine_path or "/4." in wine_path: version = "Ubuntu-18.04" else: version = "legacy" return runtime.get_env( version=version, prefer_system_libs=self.system_config.get("prefer_system_libs", True), wine_path=wine_root )