From: duplo Date: Mon, 26 Apr 2010 13:53:31 +0000 (+0000) Subject: Add new _wizard_version for differentiate the newest ones that use "BERTOS_PATH"... X-Git-Tag: 2.5.0~392 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=716c361541c07c384087a0e3473255b43736a37b;p=bertos.git Add new _wizard_version for differentiate the newest ones that use "BERTOS_PATH" from the older ones that use "SOURCES_PATH". git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3516 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BProject.py b/wizard/BProject.py index decb6468..310d0602 100644 --- a/wizard/BProject.py +++ b/wizard/BProject.py @@ -92,9 +92,12 @@ class BProject(object): self.infos["PROJECT_SRC_PATH"] = os.path.join(self.infos["PROJECT_PATH"], self.infos["PROJECT_NAME"]) wizard_version = project_data.get("WIZARD_VERSION", 0) - if wizard_version < 1: + if wizard_version == 0: # Ignore the BERTOS_PATH inside the project file for older project project_data["BERTOS_PATH"] = project_dir + elif wizard_version == 1: + # Use SOURCES_PATH instead of BERTOS_PATH for backward compatibility + project_data["BERTOS_PATH"] = project_data["SOURCES_PATH"] else: linked_sources_path = project_data["BERTOS_PATH"] sources_abspath = os.path.abspath(os.path.join(project_dir, linked_sources_path)) diff --git a/wizard/_wizard_version.py b/wizard/_wizard_version.py index c262e383..16df0baf 100644 --- a/wizard/_wizard_version.py +++ b/wizard/_wizard_version.py @@ -44,4 +44,4 @@ # NOTE: Change this variable may cause the wizard to not work properly. -WIZARD_VERSION = 1 +WIZARD_VERSION = 2