示例#1
0
文件: wine.py 项目: xnick/lutris
 def prefix_path(self):
     """Return the absolute path of the Wine prefix"""
     _prefix_path = self.game_config.get("prefix") \
         or os.environ.get("WINEPREFIX") \
         or find_prefix(self.game_exe)
     if not _prefix_path:
         logger.warning("Wine prefix not provided, defaulting to ~/.wine."
                        " This is probably not the intended behavior.")
         _prefix_path = "~/.wine"
     return os.path.expanduser(_prefix_path)
示例#2
0
 def prefix_path(self):
     """Return the absolute path of the Wine prefix"""
     _prefix_path = self.game_config.get("prefix") \
         or os.environ.get("WINEPREFIX")
     if not _prefix_path and self.game_config.get("exe"):
         # Find prefix from game if we have one
         _prefix_path = find_prefix(self.game_exe)
     if not _prefix_path:
         _prefix_path = DEFAULT_WINE_PREFIX
     return os.path.expanduser(_prefix_path)