# Author: Lorenzo Berni <duplo@develer.com>
#
+import os
+
from PyQt4.QtGui import *
from BWizardPage import *
self.pageContent.summaryTree.clear()
topLevel = []
folderTitle = QTreeWidgetItem(QStringList([self.tr("Project folder")]))
- folderItem = QTreeWidgetItem(folderTitle, QStringList([self._projectInfoRetrieve("PROJECT_PATH")]))
+ folderItem = QTreeWidgetItem(folderTitle, QStringList([os.path.normpath(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]))
+ sourcePath = QTreeWidgetItem(versionTitle, QStringList([self.tr("path: ") + os.path.normpath(sources_path)]))
topLevel.append(versionTitle)
cpuTitle = QTreeWidgetItem(QStringList([self.tr("CPU")]))
cpuName = QTreeWidgetItem(cpuTitle, QStringList([self.tr("cpu name: ") + self._projectInfoRetrieve("CPU_NAME")]))
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"])]))
+ toolchainPath = QTreeWidgetItem(toolchainTitle, QStringList([self.tr("path: " + os.path.normpath(toolchainInfo["path"]))]))
topLevel.append(toolchainTitle)
moduleTitle = QTreeWidgetItem(QStringList([self.tr("Modules")]))
configurations = self._projectInfoRetrieve("CONFIGURATIONS")
self._setProjectPath()
def _directoryChanged(self, directory):
- self._destinationFolder = str(directory)
+ self._destinationFolder = str(QDir.toNativeSeparators(directory))
self._setProjectPath()
def _setProjectPath(self):
if self._destinationFolder != "" and self._projectName <> "":
if not self._destinationFolder.endswith(os.sep):
- self._destinationFolder += os.sep
- self.pageContent.projectPath.setText(self._destinationFolder + self._projectName)
+ self._destinationFolder += "/"
+ self.pageContent.projectPath.setText(QDir.toNativeSeparators(self._destinationFolder + self._projectName))
if os.path.exists(self._destinationFolder + self._projectName):
self.pageContent.warningLabel.setVisible(True)
self.pageContent.warningLabel.setText(self.tr("<font color='#FF0000'>Warning: the selected directory exists, \
if self.pageContent.toolchainList.currentIndex != -1:
infos = collections.defaultdict(lambda: unicode("not defined"))
infos.update(qvariant_converter.getStringDict(self.pageContent.toolchainList.currentItem().data(Qt.UserRole)))
- self.pageContent.infoLabel.setText("GCC " + infos["version"] + " (" + infos["build"] + ")\nTarget: " + infos["target"] + "\nPath: " + infos["path"])
+ self.pageContent.infoLabel.setText("GCC " + infos["version"] + " (" + infos["build"] + ")\nTarget: " + infos["target"] + "\nPath: " + os.path.normpath(infos["path"]))
self.pageContent.infoLabel.setVisible(True)
self.emit(SIGNAL("completeChanged()"))
# Author: Lorenzo Berni <duplo@develer.com>
#
+import os
+
from PyQt4.QtGui import *
from BWizardPage import *
import bertos_utils
def _insertListElement(self, directory):
if bertos_utils.isBertosDir(directory):
- item = QListWidgetItem(QIcon(":/images/ok.png"), bertos_utils.bertosVersion(directory) + " (\"" + directory + "\")")
+ item = QListWidgetItem(QIcon(":/images/ok.png"), bertos_utils.bertosVersion(directory) + " (\"" + os.path.normpath(directory) + "\")")
item.setData(Qt.UserRole, qvariant_converter.convertString(directory))
self.pageContent.versionList.addItem(item)
elif len(directory) > 0:
- item = QListWidgetItem(QIcon(":/images/warning.png"), "UNKNOWN" + " (\"" + directory + "\")")
+ item = QListWidgetItem(QIcon(":/images/warning.png"), "UNKNOWN" + " (\"" + os.path.normpath(directory) + "\")")
item.setData(Qt.UserRole, qvariant_converter.convertString(directory))
self.pageContent.versionList.addItem(item)