Esempio n. 1
0
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.")
Esempio n. 2
0
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()
    init_db()
Esempio n. 3
0
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.")
Esempio n. 4
0
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)
Esempio n. 5
0
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")
Esempio n. 6
0
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.")