Exemplo n.º 1
0
    def __init__(self, installer, parent):
        super().__init__()
        self.target_path = None
        self.parent = parent
        self.service = parent.service if parent else None
        self.appid = parent.appid if parent else None
        self.game_dir_created = False  # Whether a game folder was created during the install
        # Extra files for installers, either None if the extras haven't been checked yet.
        # Or a list of IDs of extras to be downloaded during the install
        self.extras = None
        self.game_disc = None
        self.game_files = {}
        self.cancelled = False
        self.abort_current_task = None
        self.user_inputs = []
        self.current_command = 0  # Current installer command when iterating through them
        self.runners_to_install = []
        self.installer = LutrisInstaller(installer,
                                         self,
                                         service=self.service,
                                         appid=self.appid)
        if not self.installer.script:
            raise ScriptingError(
                _("This installer doesn't have a 'script' section"))
        script_errors = self.installer.get_errors()
        if script_errors:
            raise ScriptingError(
                _("Invalid script: \n{}").format("\n".join(script_errors)),
                self.installer.script)

        self.current_resolution = DISPLAY_MANAGER.get_current_resolution()
        self._check_binary_dependencies()
        self._check_dependency()
        if self.installer.creates_game_folder:
            self.target_path = self.get_default_target()
Exemplo n.º 2
0
    def __init__(self, installer, parent):
        super().__init__()
        self.target_path = None
        self.parent = parent
        self.game_dir_created = False  # Whether a game folder was created during the install
        self.game_disc = None
        self.game_files = {}
        self.cancelled = False
        self.abort_current_task = None
        self.user_inputs = []
        self.current_command = 0  # Current installer command when iterating through them
        self.runners_to_install = []
        self.installer = LutrisInstaller(installer, self)
        if not self.installer.script:
            raise ScriptingError("This installer doesn't have a 'script' section")
        script_errors = self.installer.get_errors()
        if script_errors:
            raise ScriptingError(
                "Invalid script: \n{}".format("\n".join(script_errors)), self.installer.script
            )

        self.current_resolution = DISPLAY_MANAGER.get_current_resolution()
        self._check_binary_dependencies()
        self._check_dependency()
        if self.installer.creates_game_folder:
            self.target_path = self.get_default_target()