def __init__(self, config_override=None, consoles_override=None, emulators_override=None): self.validated_base_environment = False self.validated_configuration = False self.logger = IceLogger() self.logger.debug("Initializing Ice") config_data_path = _path_with_override(config_override, "config.txt") consoles_data_path = _path_with_override(consoles_override, "consoles.txt") emulators_data_path = _path_with_override(emulators_override, "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)
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)