def init_lutris(): """Run full initialization of Lutris""" logger.info("Initializing lutris") runners.inject_runners(load_json_runners()) # Load runner names runners.RUNNER_NAMES = runners.get_runner_names() init_dirs() try: syncdb() except sqlite3.DatabaseError: raise RuntimeError( "Failed to open database file in %s. Try renaming this file and relaunch Lutris" % settings.PGA_DB) for service in DEFAULT_SERVICES: if not settings.read_setting(service, section="services"): settings.write_setting(service, True, section="services") if os.environ.get("LUTRIS_SKIP_INIT"): logger.info("Skipping initialization") return runtime_updater = RuntimeUpdater() components_to_update = runtime_updater.update() if components_to_update: while runtime_updater.current_updates: time.sleep(0.3) fetch_dxvk_versions() dxvk_manager = DXVKManager() if not dxvk_manager.is_available(): logger.info("DXVK %s not available, downloading...", dxvk_manager.version) dxvk_manager.download() logger.info("Runtime updated. Initialization complete.")
def init_lutris(): """Run full initialization of Lutris""" logger.info("Initializing lutris") runners.inject_runners(load_json_runners()) # Load runner names runners.RUNNER_NAMES = runners.get_runner_names() init_dirs() try: syncdb() except sqlite3.DatabaseError: raise RuntimeError( "Failed to open database file in %s. Try renaming this file and relaunch Lutris" % settings.PGA_DB) runtime_updater = RuntimeUpdater() components_to_update = runtime_updater.update() if components_to_update: while runtime_updater.current_updates: time.sleep(0.3) fetch_dxvk_versions() dxvk_manager = DXVKManager() if not dxvk_manager.is_available(): logger.info("DXVK %s not available, downloading...", dxvk_manager.version) dxvk_manager.download() logger.info("Runtime updated. Initialization complete.")
def setUp(self): super(TestMigration, self).setUp() schema.syncdb() self.tablename = "basetable" self.schema = [{ 'name': 'id', 'type': 'INTEGER', 'indexed': True }, { 'name': 'name', 'type': 'TEXT', }]
def init_lutris(): """Run full initialization of Lutris""" runners.inject_runners(load_json_runners()) # Load runner names runners.RUNNER_NAMES = runners.get_runner_names() init_dirs() try: syncdb() except sqlite3.DatabaseError: raise RuntimeError( "Failed to open database file in %s. Try renaming this file and relaunch Lutris" % settings.PGA_DB)
def init_lutris(): """Run full initialization of Lutris""" logger.info("Starting Lutris %s", settings.VERSION) runners.inject_runners(load_json_runners()) # Load runner names and platforms runners.RUNNER_NAMES = runners.get_runner_names() runners.RUNNER_PLATFORMS = runners.get_platforms() init_dirs() try: syncdb() except sqlite3.DatabaseError: raise RuntimeError( "Failed to open database file in %s. Try renaming this file and relaunch Lutris" % settings.PGA_DB) for service in DEFAULT_SERVICES: if not settings.read_setting(service, section="services"): settings.write_setting(service, True, section="services")
def init_lutris(): """Run full initialization of Lutris""" logger.info("Initializing lutris") runners.inject_runners(load_json_runners()) # Load runner names runners.RUNNER_NAMES = runners.get_runner_names() init_dirs() try: syncdb() except sqlite3.DatabaseError: raise RuntimeError( "Failed to open database file in %s. Try renaming this file and relaunch Lutris" % settings.PGA_DB) runtime_updater = RuntimeUpdater() components_to_update = runtime_updater.update() if not components_to_update: logger.info("Runtime up-to-date. Initialization complete.") return while runtime_updater.current_updates: time.sleep(0.3) init_dxvk_versions() logger.info("Runtime updated. Initialization complete.")
def setUp(self): if os.path.exists(settings.PGA_DB): os.remove(settings.PGA_DB) schema.syncdb()
def setup_test_environment(): """Sets up a system to be able to run tests""" os.environ["LUTRIS_SKIP_INIT"] = "1" schema.syncdb() startup.init_lutris()
def setUp(self): schema.PGA_DB = TEST_PGA_PATH games_db.PGA_DB = TEST_PGA_PATH if os.path.exists(TEST_PGA_PATH): os.remove(TEST_PGA_PATH) schema.syncdb()