コード例 #1
0
    def prelaunch(self):
        """Verify that the current game can be launched."""
        if not self.runner.is_installed():
            installed = self.runner.install_dialog()
            if not installed:
                return False

        if self.runner.use_runtime():
            runtime_updater = runtime.RuntimeUpdater()
            if runtime_updater.is_updating():
                logger.warning("Runtime updates: {}".format(
                    runtime_updater.current_updates)
                )
                dialogs.ErrorDialog("Runtime currently updating",
                                    "Game might not work as expected")
        if "wine" in self.runner_name and not wine.get_system_wine_version():
            dialogs.DontShowAgainDialog(
                'hide-wine-systemwide-install-warning',
                "Wine is not installed on your system.",
                secondary_message="Having Wine installed on your system guarantees that "
                "Wine builds from Lutris will have all required dependencies. Please "
                "follow the instructions given in the <a "
                "href='https://github.com/lutris/lutris/wiki/Wine'>Lutris Wiki</a> to "
                "install Wine"
            )
        return True
コード例 #2
0
ファイル: game.py プロジェクト: wolfmanx/lutris
    def prelaunch(self):
        """Verify that the current game can be launched."""
        if not self.runner.is_installed():
            installed = self.runner.install_dialog()
            if not installed:
                return False

        if self.runner.use_runtime():
            runtime_updater = runtime.RuntimeUpdater()
            if runtime_updater.is_updating():
                logger.warning("Runtime updates: %s", runtime_updater.current_updates)
                dialogs.ErrorDialog(
                    "Runtime currently updating", "Game might not work as expected"
                )
        if (
                "wine" in self.runner_name
                and not wine.get_system_wine_version()
                and not LINUX_SYSTEM.is_flatpak
        ):

            # TODO find a reference to the root window or better yet a way not
            # to have Gtk dependent code in this class.
            root_window = None
            dialogs.WineNotInstalledWarning(parent=root_window)
        return True
コード例 #3
0
ファイル: game.py プロジェクト: libgradev/lutris
    def prelaunch(self):
        """Verify that the current game can be launched."""
        if not self.runner.is_installed():
            installed = self.runner.install_dialog()
            if not installed:
                return False

        if self.runner.use_runtime():
            runtime_updater = runtime.RuntimeUpdater()
            if runtime_updater.is_updating():
                logger.warning("Runtime updates: {}".format(
                    runtime_updater.current_updates))
                dialogs.ErrorDialog("Runtime currently updating",
                                    "Game might not work as expected")
        return True
コード例 #4
0
    def is_launchable(self):
        """Verify that the current game can be launched."""
        if not self.is_installed:
            dialogs.ErrorDialog(_("Tried to launch a game that isn't installed. (Who'd you do that?)"))
            return False
        if not self.runner:
            dialogs.ErrorDialog(_("Invalid game configuration: Missing runner"))
            return False
        if not self.runner.is_installed():
            installed = self.runner.install_dialog()
            if not installed:
                dialogs.ErrorDialog(_("Runner not installed."))
                return False

        if self.runner.use_runtime():
            runtime_updater = runtime.RuntimeUpdater()
            if runtime_updater.is_updating():
                dialogs.ErrorDialog(_("Runtime currently updating"), _("Game might not work as expected"))
        if ("wine" in self.runner_name and not wine.get_wine_version() and not LINUX_SYSTEM.is_flatpak):
            dialogs.WineNotInstalledWarning(parent=None)
        return True