Remove svn id tags.
[bertos.git] / wizard / plugins / codelite.py
index f6555a8be406c8e823c2c6c514d4dfa7232287a0..cff2c60791cb7c68c8f4cbcb1e71c90c8726dd7e 100644 (file)
@@ -28,7 +28,6 @@
 #
 # Copyright 2008 Develer S.r.l. (http://www.develer.com/)
 #
-# $Id$
 #
 # Author: Lorenzo Berni <duplo@develer.com>
 #
@@ -99,27 +98,22 @@ def codeliteProjectGenerator(project_info):
     """
     Returns the string rapresenting the codelite project.
     """
-    template = open("cltemplates/bertos.project", "r").read()
+    template = open(os.path.join(const.DATA_DIR, "cltemplates/bertos.project"), "r").read()
     filelist = "\n".join(clFiles(findSources(project_info.info("PROJECT_PATH")), ""))
     debugger_path = project_info.info("TOOLCHAIN")["path"].replace("gcc", "gdb")
     init_script = project_info.info("CPU_INFOS")["GDB_INIT_SCRIPT"]
-    while template.find("$filelist") != -1:
-        template = template.replace("$filelist", filelist)
+    template = template.replace("$filelist", filelist)
     project_name = os.path.basename(project_info.info("PROJECT_PATH"))
-    while template.find("$project") != -1:
-        template = template.replace("$project", project_name)
-    while template.find("$debuggerpath") != -1:
-        template = template.replace("$debuggerpath", debugger_path)
-    while template.find("$initscript") != -1:
-        template = template.replace("$initscript", init_script)
+    template = template.replace("$project", project_name)
+    template = template.replace("$debuggerpath", debugger_path)
+    template = template.replace("$initscript", init_script)
     return template
 
 def codeliteWorkspaceGenerator(project_info):
     """
     Returns the string rapresentig the codelite workspace.
     """
-    template = open("cltemplates/bertos.workspace", "r").read()
+    template = open(os.path.join(const.DATA_DIR, "cltemplates/bertos.workspace"), "r").read()
     project_name = os.path.basename(project_info.info("PROJECT_PATH"))
-    while template.find("$project") != -1:
-        template = template.replace("$project", project_name)
+    template = template.replace("$project", project_name)
     return template