def get_path_for_version(self, version): if version in WINE_PATHS.keys(): return system.find_executable(WINE_PATHS[version]) if "Proton" in version: 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 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")