Ejemplo n.º 1
0
def check_libs(all_components=False):
    """Checks that required libraries are installed on the system"""
    missing_libs = LINUX_SYSTEM.get_missing_libs()
    if all_components:
        components = LINUX_SYSTEM.requirements
    else:
        components = LINUX_SYSTEM.critical_requirements
    missing_vulkan_libs = []
    for req in components:
        for index, arch in enumerate(LINUX_SYSTEM.runtime_architectures):
            for lib in missing_libs[req][index]:
                if req == "VULKAN":
                    missing_vulkan_libs.append(arch)
                logger.error("%s %s missing (needed by %s)", arch, lib,
                             req.lower())

    if missing_vulkan_libs:
        setting = "dismiss-missing-vulkan-library-warning"
        if settings.read_setting(setting) != "True":
            DontShowAgainDialog(
                setting,
                "Missing vulkan libraries",
                secondary_message=
                "The Vulkan library for %s has not been found. "
                "This will prevent games using Vulkan (such as DXVK games) from running. "
                "To install it, please follow "
                "<a href='https://github.com/lutris/lutris/wiki/Installing-drivers'>"
                "the instructions on our Wiki</a>" %
                " and ".join(missing_vulkan_libs))
Ejemplo n.º 2
0
def check_libs(all_components=False):
    """Checks that required libraries are installed on the system"""
    missing_libs = LINUX_SYSTEM.get_missing_libs()
    if all_components:
        components = LINUX_SYSTEM.requirements
    else:
        components = LINUX_SYSTEM.critical_requirements
    missing_vulkan_libs = []
    for req in components:
        for index, arch in enumerate(LINUX_SYSTEM.runtime_architectures):
            for lib in missing_libs[req][index]:
                if req == "VULKAN":
                    missing_vulkan_libs.append(arch)
                logger.error("%s %s missing (needed by %s)", arch, lib, req.lower())

    if missing_vulkan_libs:
        setting = "dismiss-missing-vulkan-library-warning"
        if settings.read_setting(setting) != "True":
            DontShowAgainDialog(
                setting,
                _("Missing vulkan libraries"),
                secondary_message=_(
                    "Lutris was unable to detect Vulkan support for "
                    "the %s architecture.\n"
                    "This will prevent many games and programs from working.\n"
                    "To install it, please use the following guide: "
                    "<a href='%s'>Installing Graphics Drivers</a>"
                ) % (
                    _(" and ").join(missing_vulkan_libs),
                    settings.DRIVER_HOWTO_URL,
                )
            )
Ejemplo n.º 3
0
def check_donate():
    setting = "dont-support-lutris"
    if settings.read_setting(setting) != "True":
        DontShowAgainDialog(
            setting,
            "Please support Lutris!",
            secondary_message="Lutris is entirely funded by its community and will "
            "remain an independent gaming platform.\n"
            "For Lutris to survive and grow, the project needs your help.\n"
            "Please consider making a donation if you can. This will greatly help "
            "cover the costs of hosting the project and fund new features "
            "like cloud saves or a full-screen interface for the TV!\n"
            "<a href='https://lutris.net/donate'>SUPPORT US! https://lutris.net/donate</a>"
        )
Ejemplo n.º 4
0
def esync_display_version_warning(on_launch):
    setting = 'hide-wine-non-esync-version-warning'
    if on_launch:
        checkbox_message = "Launch anyway and do not show this message again."
    else:
        checkbox_message = "Enable anyway and do not show this message again."

    DontShowAgainDialog(setting,
                        "Incompatible Wine version detected",
                        secondary_message="The wine build you have selected "
                        "does not seem to support Esync.\n"
                        "Please switch to an esync-capable version.",
                        checkbox_message=checkbox_message)
    return settings.read_setting(setting) == 'True'
Ejemplo n.º 5
0
def check_driver():
    """Report on the currently running driver"""
    driver_info = {}
    if drivers.is_nvidia():
        driver_info = drivers.get_nvidia_driver_info()
        # pylint: disable=logging-format-interpolation
        logger.info("Using {vendor} drivers {version} for {arch}".format(
            **driver_info["nvrm"]))
        gpus = drivers.get_nvidia_gpu_ids()
        for gpu_id in gpus:
            gpu_info = drivers.get_nvidia_gpu_info(gpu_id)
            logger.info("GPU: %s", gpu_info.get("Model"))
    elif LINUX_SYSTEM.glxinfo:
        # pylint: disable=no-member
        if hasattr(LINUX_SYSTEM.glxinfo, "GLX_MESA_query_renderer"):
            logger.info(
                "Running %s Mesa driver %s on %s",
                LINUX_SYSTEM.glxinfo.opengl_vendor,
                LINUX_SYSTEM.glxinfo.GLX_MESA_query_renderer.version,
                LINUX_SYSTEM.glxinfo.GLX_MESA_query_renderer.device,
            )
    else:
        logger.warning(
            "glxinfo is not available on your system, unable to detect driver version"
        )

    for card in drivers.get_gpus():
        # pylint: disable=logging-format-interpolation
        try:
            logger.info(
                "GPU: {PCI_ID} {PCI_SUBSYS_ID} ({DRIVER} drivers)".format(
                    **drivers.get_gpu_info(card)))
        except KeyError:
            logger.error("Unable to get GPU information from '%s'", card)

    if drivers.is_outdated():
        setting = "hide-outdated-nvidia-driver-warning"
        if settings.read_setting(setting) != "True":
            DontShowAgainDialog(
                setting,
                _("Your NVIDIA driver is outdated."),
                secondary_message=_(
                    "You are currently running driver %s which does not "
                    "fully support all features for Vulkan and DXVK games.\n"
                    "Please upgrade your driver as described in our "
                    "<a href='%s'>installation guide</a>") % (
                        driver_info["nvrm"]["version"],
                        settings.DRIVER_HOWTO_URL,
                    ))
Ejemplo n.º 6
0
def display_vulkan_error(on_launch):
    if on_launch:
        checkbox_message = "Launch anyway and do not show this message again."
    else:
        checkbox_message = "Enable anyway and do not show this message again."

    setting = 'hide-no-vulkan-warning'
    DontShowAgainDialog(
        setting,
        "Vulkan is not installed or is not supported by your system",
        secondary_message="If you have compatible hardware, please follow "
        "the installation procedures as described in\n"
        "<a href='https://github.com/lutris/lutris/wiki/How-to:-DXVK'>"
        "How-to:-DXVK (https://github.com/lutris/lutris/wiki/How-to:-DXVK)</a>",
        checkbox_message=checkbox_message)
    return settings.read_setting(setting) == 'True'
Ejemplo n.º 7
0
def fsync_display_version_warning(on_launch=False):
    setting = "hide-wine-non-fsync-version-warning"
    if on_launch:
        checkbox_message = _(
            "Launch anyway and do not show this message again.")
    else:
        checkbox_message = _(
            "Enable anyway and do not show this message again.")

    DontShowAgainDialog(
        setting,
        _("Incompatible Wine version detected"),
        secondary_message=_("The Wine build you have selected "
                            "does not support Fsync.\n"
                            "Please switch to an Fsync-capable version."),
        checkbox_message=checkbox_message,
    )
    return settings.read_setting(setting) == "True"
Ejemplo n.º 8
0
def display_vulkan_error(option, on_launch):
    if option == vulkan_available.NONE:
        message = "No Vulkan loader was detected."
    if option == vulkan_available.SIXTY_FOUR:
        message = "32-bit Vulkan loader was not detected."
    if option == vulkan_available.THIRTY_TWO:
        message = "64-bit Vulkan loader was not detected."

    if on_launch:
        checkbox_message = "Launch anyway and do not show this message again."
    else:
        checkbox_message = "Enable anyway and do not show this message again."

    setting = 'hide-no-vulkan-warning'
    DontShowAgainDialog(
        setting,
        message,
        secondary_message="Please follow the installation "
        "procedures as described in\n"
        "<a href='https://github.com/lutris/lutris/wiki/How-to:-DXVK'>"
        "How-to:-DXVK (https://github.com/lutris/lutris/wiki/How-to:-DXVK)</a>",
        checkbox_message=checkbox_message)
    return settings.read_setting(setting) == 'True'