예제 #1
0
  def __init__(self):
    self.validated_base_environment = False
    self.validated_configuration = False
    self.logger = IceLogger()
    self.logger.debug("Initializing Ice")
    config_data_path = Configuration.path_for_data_file("config.txt")
    consoles_data_path = Configuration.path_for_data_file("consoles.txt")
    emulators_data_path = Configuration.path_for_data_file("emulators.txt")
    self.config = Configuration(
        ConfigFileBackingStore(config_data_path),
        ConfigFileBackingStore(consoles_data_path),
        ConfigFileBackingStore(emulators_data_path),
    )
    self.steam = Steam()
    # TODO: Query the list of users some other way
    self.users = self.steam.local_users()

    filesystem = Filesystem()
    parser = ROMParser(self.logger)
    self.rom_finder = ROMFinder(self.config, filesystem, parser)
    archive_data_path = Configuration.path_for_data_file("archive.json")
    managed_rom_archive = ManagedROMArchive(archive_data_path)
    self.shortcut_synchronizer = SteamShortcutSynchronizer(managed_rom_archive, self.logger)

    provider = CombinedProvider(
        LocalProvider(self.logger),
        ConsoleGridProvider(self.logger),
    )
    self.grid_updater = SteamGridUpdater(provider, self.logger)
예제 #2
0
    def __init__(self):
        self.validated_base_environment = False
        self.validated_configuration = False
        self.logger = IceLogger()
        self.logger.debug("Initializing Ice")
        config_data_path = Configuration.path_for_data_file("config.txt")
        consoles_data_path = Configuration.path_for_data_file("consoles.txt")
        emulators_data_path = Configuration.path_for_data_file("emulators.txt")
        self.config = Configuration(
            ConfigFileBackingStore(config_data_path),
            ConfigFileBackingStore(consoles_data_path),
            ConfigFileBackingStore(emulators_data_path),
        )
        self.steam = Steam()
        # TODO: Query the list of users some other way
        self.users = self.steam.local_users()

        filesystem = Filesystem()
        parser = ROMParser(self.logger)
        self.rom_finder = ROMFinder(self.config, filesystem, parser)
        archive_data_path = Configuration.path_for_data_file("archive.json")
        managed_rom_archive = ManagedROMArchive(archive_data_path)
        self.shortcut_synchronizer = SteamShortcutSynchronizer(
            managed_rom_archive, self.logger)

        provider = CombinedProvider(
            LocalProvider(self.logger),
            ConsoleGridProvider(self.logger),
        )
        self.grid_updater = SteamGridUpdater(provider, self.logger)
예제 #3
0
    def __init__(self, options):
        """Valid options for creating an IceEngine are as follows:

    * config    - The path to the config file to use. Searches the default paths
                  for 'config.txt' otherwise
    * consoles  - The path to the consoles file to use. Searches the default
                  paths for 'consoles.txt' if none is provided
    * emulators - The path to the emulators file to use. Searches the default
                  paths for 'emulators.txt' if none is provided
    * verbose   - Turn on debug logging.
    """
        self.validated_base_environment = False
        self.validated_configuration = False
        self.logger = IceLogger(verbose=options.verbose)
        self.logger.debug("Initializing Ice")
        config_data_path = _path_with_override(options.config, "config.txt")
        consoles_data_path = _path_with_override(options.consoles,
                                                 "consoles.txt")
        emulators_data_path = _path_with_override(options.emulators,
                                                  "emulators.txt")
        self.config = Configuration(
            ConfigFileBackingStore(config_data_path),
            ConfigFileBackingStore(consoles_data_path),
            ConfigFileBackingStore(emulators_data_path),
        )
        self.steam = Steam()
        # TODO: Query the list of users some other way
        self.users = self.steam.local_users()

        filesystem = Filesystem()
        parser = ROMParser(self.logger)
        self.rom_finder = ROMFinder(self.config, filesystem, parser)
        archive_data_path = Configuration.path_for_data_file("archive.json")
        managed_rom_archive = ManagedROMArchive(archive_data_path)
        self.shortcut_synchronizer = SteamShortcutSynchronizer(
            managed_rom_archive, self.logger)

        provider = CombinedProvider(
            LocalProvider(self.logger),
            ConsoleGridProvider(self.logger),
        )
        self.grid_updater = SteamGridUpdater(provider, self.logger)
예제 #4
0
파일: ice_engine.py 프로젝트: piccaruse/Ice
  def __init__(self, steam, filesystem, options):
    """Valid options for creating an IceEngine are as follows:

    * config    - The path to the config file to use. Searches the default paths
                  for 'config.txt' otherwise
    * consoles  - The path to the consoles file to use. Searches the default
                  paths for 'consoles.txt' if none is provided
    * emulators - The path to the emulators file to use. Searches the default
                  paths for 'emulators.txt' if none is provided
    * verbose   - Turn on debug logging.
    """
    self.validated_base_environment = False
    self.validated_configuration = False
    self.filesystem = filesystem
    self.logger = IceLogger(verbose=options.verbose)
    self.logger.debug("Initializing Ice")
    config_data_path = _path_with_override(options.config, "config.txt")
    consoles_data_path = _path_with_override(options.consoles, "consoles.txt")
    emulators_data_path = _path_with_override(options.emulators, "emulators.txt")
    self.config = Configuration(
        ConfigFileBackingStore(config_data_path),
        ConfigFileBackingStore(consoles_data_path),
        ConfigFileBackingStore(emulators_data_path),
        self.logger,
        filesystem,
    )
    self.steam = steam

    parser = ROMParser(self.logger)
    self.rom_finder = ROMFinder(self.logger, self.config, filesystem, parser)
    archive_data_path = Configuration.path_for_data_file("archive.json")
    managed_rom_archive = ManagedROMArchive(archive_data_path)
    self.shortcut_synchronizer = SteamShortcutSynchronizer(managed_rom_archive, self.logger)

    provider = CombinedProvider(
        LocalProvider(self.logger),
        ConsoleGridProvider(self.logger),
    )
    self.grid_updater = SteamGridUpdater(provider, self.logger)
예제 #5
0
def _path_with_override(path_override, default_name):
    if path_override is not None:
        return path_override
    return Configuration.path_for_data_file(default_name)
예제 #6
0
파일: ice_engine.py 프로젝트: piccaruse/Ice
def _path_with_override(path_override, default_name):
  if path_override is not None:
    return path_override
  return Configuration.path_for_data_file(default_name)