コード例 #1
0
ファイル: steam.py プロジェクト: bsdf/lutris
 def add_installed_games(self):
     games = []
     steamapps_paths = get_steamapps_paths()
     for steamapps_path in steamapps_paths:
         for appmanifest_file in get_appmanifests(steamapps_path):
             app_manifest_path = os.path.join(steamapps_path, appmanifest_file)
             self.install_from_steam(AppManifest(app_manifest_path))
     return games
コード例 #2
0
 def get_platform(self):
     """Platform the game uses (linux or windows)"""
     steamapps_paths = get_steamapps_paths()
     if self.steamapps_path in steamapps_paths["linux"]:
         return "linux"
     if self.steamapps_path in steamapps_paths["windows"]:
         return "windows"
     raise ValueError("Can't find %s in %s" % (self.steamapps_path, steamapps_paths))
コード例 #3
0
ファイル: appmanifest.py プロジェクト: yurikoles/lutris
 def get_platform(self):
     steamapps_paths = get_steamapps_paths()
     if self.steamapps_path in steamapps_paths["linux"]:
         return "linux"
     elif self.steamapps_path in steamapps_paths["windows"]:
         return "windows"
     else:
         raise ValueError("Can't find %s in %s" %
                          (self.steamapps_path, steamapps_paths))
コード例 #4
0
 def load(self):
     """Return importable Steam games"""
     games = []
     steamapps_paths = get_steamapps_paths()
     for steamapps_path in steamapps_paths[self.platform]:
         for appmanifest_file in get_appmanifests(steamapps_path):
             app_manifest = AppManifest(os.path.join(steamapps_path, appmanifest_file))
             if SteamGame.is_importable(app_manifest):
                 games.append(SteamGame.new_from_steam_game(app_manifest))
     return games
コード例 #5
0
 def load(self, force_reload=False):
     """Return importable Steam games"""
     games = []
     steamapps_paths = get_steamapps_paths()
     for steamapps_path in steamapps_paths[self.platform]:
         for appmanifest_file in get_appmanifests(steamapps_path):
             app_manifest = AppManifest(os.path.join(steamapps_path, appmanifest_file))
             if SteamGame.is_importable(app_manifest):
                 games.append(SteamGame.new_from_steam_game(app_manifest))
     return games
コード例 #6
0
ファイル: application.py プロジェクト: tannisroot/lutris
 def print_steam_list(self, command_line):
     steamapps_paths = get_steamapps_paths()
     for path in steamapps_paths if steamapps_paths else []:
         appmanifest_files = get_appmanifests(path)
         for appmanifest_file in appmanifest_files:
             appmanifest = AppManifest(os.path.join(path, appmanifest_file))
             self._print(
                 command_line,
                 " {:8} | {:<60} | {}".format(
                     appmanifest.steamid,
                     appmanifest.name or "-",
                     ", ".join(appmanifest.states),
                 ),
             )
コード例 #7
0
ファイル: application.py プロジェクト: przerull/lutris
 def print_steam_list(self, command_line):
     steamapps_paths = get_steamapps_paths()
     for platform in ("linux", "windows"):
         for path in steamapps_paths[platform]:
             appmanifest_files = get_appmanifests(path)
             for appmanifest_file in appmanifest_files:
                 appmanifest = AppManifest(os.path.join(path, appmanifest_file))
                 self._print(
                     command_line,
                     "  {:8} | {:<60} | {:10} | {}".format(
                         appmanifest.steamid,
                         appmanifest.name or "-",
                         platform,
                         ", ".join(appmanifest.states),
                     ),
                 )
コード例 #8
0
 def print_steam_list(self, command_line):
     steamapps_paths = get_steamapps_paths()
     for platform in ("linux", "windows"):
         for path in steamapps_paths[platform]:
             appmanifest_files = get_appmanifests(path)
             for appmanifest_file in appmanifest_files:
                 appmanifest = AppManifest(os.path.join(path, appmanifest_file))
                 self._print(
                     command_line,
                     "  {:8} | {:<60} | {:10} | {}".format(
                         appmanifest.steamid,
                         appmanifest.name or "-",
                         platform,
                         ", ".join(appmanifest.states),
                     ),
                 )
コード例 #9
0
ファイル: steam.py プロジェクト: sourcery-ai-bot/lutris
 def load(self):
     """Return importable Steam games"""
     logger.debug("Loading Steam games from local install")
     games = []
     steamapps_paths = get_steamapps_paths()
     for platform in ('linux', 'windows'):
         for steamapps_path in steamapps_paths[platform]:
             for appmanifest_file in get_appmanifests(steamapps_path):
                 app_manifest = AppManifest(
                     os.path.join(steamapps_path, appmanifest_file))
                 if SteamGame.is_importable(app_manifest):
                     games.append(
                         SteamGame.new_from_steam_game(app_manifest))
     logger.debug("Saving Steam games...")
     for game in games:
         game.save()
     logger.debug("Steam games loaded")
     self.emit("service-games-loaded")
コード例 #10
0
ファイル: application.py プロジェクト: sonicpp/lutris
 def print_steam_folders(self, command_line):
     steamapps_paths = get_steamapps_paths()
     for platform in ("linux", "windows"):
         for path in steamapps_paths[platform]:
             self._print(command_line, path)
コード例 #11
0
ファイル: steam.py プロジェクト: meskobalazs/lutris
 def steamapps_paths(self):
     return get_steamapps_paths()
コード例 #12
0
 def print_steam_folders(self, command_line):
     steamapps_paths = get_steamapps_paths()
     for platform in ("linux", "windows"):
         for path in steamapps_paths[platform]:
             self._print(command_line, path)