if self.pageContent.projectPath.text() != "None":
self.setProjectInfo("PROJECT_PATH", unicode(self.pageContent.projectPath.text()))
self.setProjectInfo("PROJECT_NAME", os.path.basename(unicode(self.pageContent.projectPath.text())))
+ self.setProjectInfo("PROJECT_SRC_PATH", os.path.join(self.projectInfo("PROJECT_PATH"), self.projectInfo("PROJECT_NAME")))
self.setProjectInfo("ROUTE", self.next_page)
self.setProjectInfo("PROJECT_FROM_PRESET", self.from_preset)
return True
# 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"]
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):
# project_data["SOURCES_PATH"] = project_info.info("SOURCES_PATH")
project_data["SOURCES_PATH"] = directory
project_data["PROJECT_NAME"] = project_info.info("PROJECT_NAME", os.path.basename(directory))
+ project_data["PROJECT_SRC_PATH"] = project_info.info("PROJECT_SRC_PATH")
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")