예제 #1
0
    def prepare_install(self, script_slug):
        install_script = None
        for script in self.scripts:
            if script["slug"] == script_slug:
                install_script = script
        if not install_script:
            raise ValueError("Could not find script %s" % script_slug)
        try:
            self.interpreter = interpreter.ScriptInterpreter(
                install_script, self)
        except MissingGameDependency as ex:
            dlg = QuestionDialog({
                "question":
                "This game requires %s. Do you want to install it?" % ex.slug,
                "title":
                "Missing dependency",
            })
            if dlg.result == Gtk.ResponseType.YES:
                InstallerWindow(
                    game_slug=ex.slug,
                    parent=self.parent,
                    application=self.application,
                )
            self.destroy()
            return

        self.title_label.set_markup(u"<b>Installing {}</b>".format(
            escape_gtk_label(self.interpreter.game_name)))
        self.select_install_folder()
예제 #2
0
    def prepare_install(self, script_slug):
        install_script = None
        for script in self.scripts:
            if script["slug"] == script_slug:
                install_script = script
        if not install_script:
            raise ValueError("Could not find script %s" % script_slug)
        try:
            self.interpreter = interpreter.ScriptInterpreter(install_script, self)
        except MissingGameDependency as ex:
            dlg = QuestionDialog(
                {
                    "question": "This game requires %s. Do you want to install it?" % ex.slug,
                    "title": "Missing dependency",
                }
            )
            if dlg.result == Gtk.ResponseType.YES:
                InstallerWindow(
                    game_slug=ex.slug,
                    parent=self.parent,
                    application=self.application,
                )
            self.destroy()
            return

        self.title_label.set_markup(
            u"<b>Installing {}</b>".format(
                escape_gtk_label(self.interpreter.game_name)
            )
        )
        self.select_install_folder()
예제 #3
0
 def prepare_install(self, script_slug):
     install_script = None
     for script in self.scripts:
         if script["slug"] == script_slug:
             install_script = script
     if not install_script:
         raise ValueError("Could not find script %s" % script_slug)
     self.interpreter = interpreter.ScriptInterpreter(install_script, self)
     self.title_label.set_markup(u"<b>Installing {}</b>".format(
         escape_gtk_label(self.interpreter.game_name)))
     self.select_install_folder()
예제 #4
0
 def choose_installer(self):
     """Stage where we choose an install script."""
     self.validate_scripts()
     base_script = self.scripts[0]
     self.title_label.set_markup("<b>Install %s</b>" % escape_gtk_label(base_script["name"]))
     installer_picker = InstallerPicker(self.scripts)
     installer_picker.connect("installer-selected", self.on_installer_selected)
     scrolledwindow = Gtk.ScrolledWindow(
         hexpand=True, vexpand=True, child=installer_picker
     )
     scrolledwindow.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
     self.widget_box.pack_end(scrolledwindow, True, True, 10)
     scrolledwindow.show()
예제 #5
0
 def choose_installer(self):
     """Stage where we choose an install script."""
     self.validate_scripts()
     base_script = self.scripts[0]
     self.title_label.set_markup("<b>Install %s</b>" % escape_gtk_label(base_script["name"]))
     installer_picker = InstallerPicker(self.scripts)
     installer_picker.connect("installer-selected", self.on_installer_selected)
     scrolledwindow = Gtk.ScrolledWindow(
         hexpand=True, vexpand=True, child=installer_picker
     )
     scrolledwindow.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
     self.widget_box.pack_end(scrolledwindow, True, True, 10)
     scrolledwindow.show()
예제 #6
0
파일: installer.py 프로젝트: xeddmc/lutris
 def __init__(self, text):
     super().__init__()
     self.set_line_wrap(True)
     self.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
     self.set_alignment(0, 0.5)
     self.set_markup(escape_gtk_label(text))