- topLevel = []
- folderTitle = QTreeWidgetItem(QStringList([self.tr("Project folder")]))
- folderItem = QTreeWidgetItem(folderTitle, QStringList([self._projectInfoRetrieve("PROJECT_PATH")]))
- topLevel.append(folderTitle)
- versionTitle = QTreeWidgetItem(QStringList([self.tr("BeRTOS version")]))
- sources_path = self._projectInfoRetrieve("SOURCES_PATH")
- version = QTreeWidgetItem(versionTitle, QStringList([self.tr("version: ") + bertos_utils.bertosVersion(sources_path)]))
- sourcePath = QTreeWidgetItem(versionTitle, QStringList([self.tr("path: ") + sources_path]))
- topLevel.append(versionTitle)
- cpuTitle = QTreeWidgetItem(QStringList([self.tr("CPU")]))
- cpuName = QTreeWidgetItem(cpuTitle, QStringList([self.tr("cpu name: ") + self._projectInfoRetrieve("CPU_NAME")]))
- topLevel.append(cpuTitle)
- toolchainTitle = QTreeWidgetItem(QStringList([self.tr("Toolchain")]))
- toolchainInfo = self._projectInfoRetrieve("TOOLCHAIN")
- if "target" in toolchainInfo.keys():
- toolchainTarget = QTreeWidgetItem(toolchainTitle, QStringList([self.tr("target: " + toolchainInfo["target"])]))
- if "version" in toolchainInfo.keys():
- toolchainTarget = QTreeWidgetItem(toolchainTitle, QStringList([self.tr("version: " + "GCC " + toolchainInfo["version"] + " (" + toolchainInfo["build"] + ")")]))
- toolchainPath = QTreeWidgetItem(toolchainTitle, QStringList([self.tr("path: " + toolchainInfo["path"])]))
- topLevel.append(toolchainTitle)
- moduleTitle = QTreeWidgetItem(QStringList([self.tr("Modules")]))
- configurations = self._projectInfoRetrieve("CONFIGURATIONS")
- moduleCategories = {}
- for module, information in self._projectInfoRetrieve("MODULES").items():
+ top_level = []
+ folder_title = QTreeWidgetItem(QStringList([self.tr("Project folder")]))
+ folder_item = QTreeWidgetItem(folder_title, QStringList([os.path.normpath(self.projectInfo("PROJECT_PATH"))]))
+ top_level.append(folder_title)
+ version_title = QTreeWidgetItem(QStringList([self.tr("BeRTOS version")]))
+ sources_path = self.projectInfo("BERTOS_PATH")
+ version = QTreeWidgetItem(version_title, QStringList([self.tr("version: ") + bertos_utils.bertosVersion(sources_path)]))
+ source_path = QTreeWidgetItem(version_title, QStringList([self.tr("path: ") + os.path.normpath(sources_path)]))
+ top_level.append(version_title)
+ cpu_title = QTreeWidgetItem(QStringList([self.tr("CPU")]))
+ cpu_name = QTreeWidgetItem(cpu_title, QStringList([self.tr("cpu name: ") + self.projectInfo("CPU_NAME")]))
+ cpu_freq = QTreeWidgetItem(cpu_title, QStringList([self.tr("frequency: ") + self.projectInfo("SELECTED_FREQ") + "Hz"]))
+ top_level.append(cpu_title)
+ toolchain_title = QTreeWidgetItem(QStringList([self.tr("Toolchain")]))
+ toolchain_info = self.projectInfo("TOOLCHAIN")
+ if "target" in toolchain_info:
+ toolchain_target = QTreeWidgetItem(toolchain_title, QStringList([self.tr("target: " + toolchain_info["target"].strip())]))
+ version = ""
+ if "version" in toolchain_info:
+ version += "version: " + "GCC " + toolchain_info["version"].strip() + " "
+ if "build" in toolchain_info:
+ version += "(" + toolchain_info["build"].strip() + ")"
+ if "version" in toolchain_info:
+ toolchain_target = QTreeWidgetItem(toolchain_title, QStringList([version]))
+ toolchain_path = QTreeWidgetItem(toolchain_title, QStringList([self.tr("path: " + os.path.normpath(toolchain_info["path"]))]))
+ top_level.append(toolchain_title)
+ module_title = QTreeWidgetItem(QStringList([self.tr("Selected modules")]))
+ configurations = self.projectInfo("CONFIGURATIONS")
+ module_categories = {}
+ for module, information in self.projectInfo("MODULES").items():