Пример #1
0
 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")
Пример #2
0
 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")