Use the local BeRTOS version instead of the original one
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 29 Mar 2010 10:46:24 +0000 (10:46 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 29 Mar 2010 10:46:24 +0000 (10:46 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3292 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BEditingDialog.py
wizard/BVersionPage.py
wizard/bertos_utils.py

index 4fae34231e1bc1557158bcde35dcb875a91a86a9..1c3ed0d184dadf7a3da32fe6a87f72517885af7b 100644 (file)
@@ -206,7 +206,7 @@ class BVersionDialog(QDialog):
         QDialog.__init__(self)
        self.setWindowIcon(QIcon(":/images/appicon.png"))
         layout = QVBoxLayout()
-        version_page = BVersionPage()
+        version_page = BVersionPage(edit=True)
         version_page.reloadData()
        self.version_page = version_page
         layout.addWidget(version_page)
index d11d1ff8b219d808e9839ce3347376f95e427d84..8842289d9aec4bb5cb4199f44946a9df02df266b 100644 (file)
@@ -48,7 +48,8 @@ class BVersionPage(BWizardPage):
     to use. This page show some pieces of information about the version.
     """
     
-    def __init__(self):
+    def __init__(self, edit=False):
+        self._edit = edit
         BWizardPage.__init__(self, UI_LOCATION + "/bertos_versions.ui")
         self.setTitle(self.tr("Select the BeRTOS directory"))
         self.setSubTitle(self.tr("The project created will be based on the BeRTOS version found"))
@@ -183,6 +184,8 @@ class BVersionPage(BWizardPage):
         Fills the version list with all the BeRTOS versions founded in the QSettings.
         """
         versions = set([])
+        if self._edit:
+            versions.add(self.projectInfo("SOURCES_PATH"))
         if os.name == "nt":
             import winreg_importer
             versions |= set([os.path.normpath(dir) for dir in winreg_importer.getBertosDirs()])
index 48cbbbf0a4e3bc7c578614d0353ef4c114d36940..dc2172d7f78f29b3d899bef8e6f877599cae31a4 100644 (file)
@@ -135,7 +135,9 @@ def projectFileGenerator(project_info):
         if information["enabled"]:
             enabled_modules.append(module)
     project_data["ENABLED_MODULES"] = enabled_modules
-    project_data["SOURCES_PATH"] = project_info.info("SOURCES_PATH")
+    # Use the local BeRTOS version instead of the original one
+    # project_data["SOURCES_PATH"] = project_info.info("SOURCES_PATH")
+    project_data["SOURCES_PATH"] = directory
     project_data["TOOLCHAIN"] = project_info.info("TOOLCHAIN")
     project_data["CPU_NAME"] = project_info.info("CPU_NAME")
     project_data["SELECTED_FREQ"] = project_info.info("SELECTED_FREQ")