Add new _wizard_version for differentiate the newest ones that use "BERTOS_PATH"...
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 26 Apr 2010 13:53:31 +0000 (13:53 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 26 Apr 2010 13:53:31 +0000 (13:53 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3516 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BProject.py
wizard/_wizard_version.py

index decb64686c62cc59988b52beb7839ba4f1ead265..310d060216075a4e5b5c9e53dfa6b4159f7b6cf6 100644 (file)
@@ -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))
index c262e383820429b70a81cb0f3e65b51f70730ae8..16df0baff992edcaea1eff8307f80d912014b508 100644 (file)
@@ -44,4 +44,4 @@
 
 
 # NOTE: Change this variable may cause the wizard to not work properly. 
-WIZARD_VERSION = 1
+WIZARD_VERSION = 2