Use relative path for BERTOS_PATH parameter.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 3 May 2010 10:24:11 +0000 (10:24 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 3 May 2010 10:24:11 +0000 (10:24 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3592 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py

index f3df83d187811530bf06ea4059dd38bf0b465216..1aeaef7a78c0c29bb74fae1095a735b90b532141 100644 (file)
@@ -114,11 +114,11 @@ def projectFileGenerator(project_info):
     if project_info.info("PRESET"):
         # For presets save again the BERTOS_PATH into project file
         project_data["PRESET"] = True
-        project_data["BERTOS_PATH"] = project_info.info("BERTOS_PATH")
+        project_data["BERTOS_PATH"] = relpath.relpath(project_info.info("BERTOS_PATH"), directory)
     else:
         # Use the local BeRTOS version instead of the original one
         # project_data["BERTOS_PATH"] = project_info.info("BERTOS_PATH")
-        project_data["BERTOS_PATH"] = directory
+        project_data["BERTOS_PATH"] = "."
     project_data["PROJECT_NAME"] = project_info.info("PROJECT_NAME", os.path.basename(directory))
     project_src_relpath = relpath.relpath(project_info.info("PROJECT_SRC_PATH"), directory)
     project_data["PROJECT_SRC_PATH"] = project_src_relpath