Add information about project source path.
[bertos.git] / wizard / BProject.py
index 06bdc43272567c83587290874d0fa870e5942780..1aee84549a762aedc3ccea79ef3533e7ba05b826 100644 (file)
@@ -82,10 +82,13 @@ class BProject(object):
         # NOTE: this can throw an Exception if the user has changed the directory containing the project
         self.infos["PROJECT_NAME"] = project_data.get("PROJECT_NAME", os.path.basename(project_dir))
         self.infos["PROJECT_PATH"] = os.path.dirname(project_file)
+        project_src_path = project_data.get("PROJECT_SRC_PATH", None)
+        if project_src_path:
+            self.infos["PROJECT_SRC_PATH"] = project_src_path
 
-        preset = project_data.get("PRESET", False)
-        if not preset:
-            # Ignore the SOURCES_PATH inside the project file if it's not setted as 'preset'
+        wizard_version = project_data.get("WIZARD_VERSION", 0)
+        if wizard_version < 1:
+            # Ignore the SOURCES_PATH inside the project file for older project
             project_data["SOURCES_PATH"] = project_dir
         else:
             linked_sources_path = project_data["SOURCES_PATH"]
@@ -94,7 +97,7 @@ class BProject(object):
         
         self._loadBertosSourceStuff(project_data["SOURCES_PATH"], info_dict.get("SOURCES_PATH", None))
         
-        self.infos["PRESET"] = preset
+        self.infos["PRESET"] = project_data.get("PRESET", False)
 
         # For those projects that don't have a VERSION file create a dummy one.
         if not isBertosDir(project_dir):