def run_tool(self, args): start_time = time.perf_counter() arch = args.arch tool_name = args.tool_name os_name = args.host output_dir = args.outputdir sevenzip = self._set_sevenzip(args) version = args.version mirror = args.base self._run_common_part(output_dir, mirror) if not self._check_tools_arg_combination(os_name, tool_name, arch): self.logger.warning( "Specified target combination is not valid: {} {} {}".format( os_name, tool_name, arch)) try: tool_archives = ToolArchives(os_name, tool_name, version, arch, mirror=mirror, logging=self.logger) except ArchiveDownloadError or ArchiveListError: exit(1) else: installer = QtInstaller(tool_archives, logging=self.logger, command=sevenzip, target_dir=output_dir) installer.install() self.logger.info("Finished installation") self.logger.info("Time elasped: {time:.8f} second".format( time=time.perf_counter() - start_time))
def run_install(self, args): start_time = time.perf_counter() arch = args.arch target = args.target os_name = args.host qt_version = args.qt_version output_dir = args.outputdir arch = self._set_arch(args, arch, os_name, target, qt_version) modules = args.modules sevenzip = self._set_sevenzip(args) mirror = args.base archives = args.archives self._run_common_part(output_dir, mirror) if not self._check_qt_arg_versions(qt_version): self.logger.warning( "Specified Qt version is unknown: {}.".format(qt_version)) if not self._check_qt_arg_combination(qt_version, os_name, target, arch): self.logger.warning( "Specified target combination is not valid or unknown: {} {} {}" .format(os_name, target, arch)) all_extra = True if modules is not None and 'all' in modules else False if not all_extra and not self._check_modules_arg(qt_version, modules): self.logger.warning("Some of specified modules are unknown.") try: qt_archives = QtArchives(os_name, target, qt_version, arch, subarchives=archives, modules=modules, mirror=mirror, logging=self.logger, all_extra=all_extra) except ArchiveDownloadError or ArchiveListError: exit(1) else: installer = QtInstaller(qt_archives, logging=self.logger, command=sevenzip, target_dir=output_dir) installer.install() installer.finalize() self.logger.info("Finished installation") self.logger.info("Time elasped: {time:.8f} second".format( time=time.perf_counter() - start_time))
def _run_src_doc_examples(self, flavor, args): start_time = time.perf_counter() target = args.target os_name = args.host qt_version = args.qt_version output_dir = args.outputdir mirror = args.base sevenzip = self._set_sevenzip(args) if flavor in ['doc', 'examples']: modules = args.modules archives = args.archives else: modules = None archives = None self._run_common_part(output_dir, mirror) all_extra = True if modules is not None and 'all' in modules else False if not self._check_qt_arg_versions(qt_version): self.logger.warning( "Specified Qt version is unknown: {}.".format(qt_version)) try: srcdocexamples_archives = SrcDocExamplesArchives( flavor, os_name, target, qt_version, subarchives=archives, modules=modules, mirror=mirror, logging=self.logger, all_extra=all_extra) except ArchiveDownloadError or ArchiveListError: exit(1) else: installer = QtInstaller(srcdocexamples_archives, logging=self.logger, command=sevenzip, target_dir=output_dir) installer.install() self.logger.info("Finished installation") self.logger.info("Time elasped: {time:.8f} second".format( time=time.perf_counter() - start_time))