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 toggle_dxvk(self, enable, version=None, dxvk_manager: dxvk.DXVKManager = None): # manual version only sets the dlls to native if version.lower() != "manual": if enable: if not dxvk_manager.is_available(): dxvk_manager.download() dxvk_manager.enable() else: dxvk_manager.disable() if enable: for dll in dxvk_manager.dxvk_dlls: # We have to make sure that the dll exists before setting it to native if dxvk_manager.dxvk_dll_exists(dll): self.dll_overrides[dll] = "n"
def toggle_dxvk(self, enable, version=None, dxvk_manager: dxvk.DXVKManager = None): # manual version only sets the dlls to native if version.lower() != "manual": if enable: if not dxvk_manager.is_available(): dxvk_manager.download() dxvk_manager.enable() else: dxvk_manager.disable() if enable: for dll in dxvk_manager.dxvk_dlls: # We have to make sure that the dll exists before setting it to native if dxvk_manager.dxvk_dll_exists(dll): self.dll_overrides[dll] = "n"