Remove codelite specific functions from bertos_utils module
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 2 Apr 2009 10:39:15 +0000 (10:39 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 2 Apr 2009 10:39:15 +0000 (10:39 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2464 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py
wizard/codelite_project.py

index ef49467b9b18b2e3801cb31b5cca43ec46beb5b3..dd876c283f09809542fa664ea05cb0df0d2d0f08 100644 (file)
@@ -77,9 +77,9 @@ def createBertosProject(project_info):
     open(prjdir + "/main.c", "w").write(main)
     ## Codelite project files
     if "codelite" in project_info.info("OUTPUT"):
-        workspace = codeliteWorkspaceGenerator(project_info)
+        workspace = codelite_project.codeliteWorkspaceGenerator(project_info)
         open(directory + "/" + os.path.basename(prjdir) + ".workspace", "w").write(workspace)
-        project = codeliteProjectGenerator(project_info)
+        project = codelite_project.codeliteProjectGenerator(project_info)
         open(directory + "/" + os.path.basename(prjdir) + ".project", "w").write(project)
 
 def mkGenerator(project_info, makefile):
@@ -183,23 +183,6 @@ def findModuleFiles(module, project_info):
             sfiles.append(path + "/" + filename)
     return cfiles, sfiles
 
-def codeliteProjectGenerator(project_info):
-    template = open("cltemplates/bertos.project").read()
-    filelist = "\n".join(codelite_project.clFiles(codelite_project.findSources(project_info.info("PROJECT_PATH")), project_info.info("PROJECT_PATH")))
-    while template.find("$filelist") != -1:
-        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)
-    return template
-
-def codeliteWorkspaceGenerator(project_info):
-    template = open("cltemplates/bertos.workspace").read()
-    project_name = os.path.basename(project_info.info("PROJECT_PATH"))
-    while template.find("$project") != -1:
-        template = template.replace("$project", project_name)
-    return template
-    
 def getSystemPath():
     path = os.environ["PATH"]
     if os.name == "nt":
index f2003f448d6646c0974a73b5ecbd50ae43529a4c..d6fe4d432e1cdd54a812a6c846d3c72cba03f00a 100644 (file)
@@ -35,3 +35,20 @@ def findSources(path):
                 if file.endswith(const.EXTENSION_FILTER):
                     file_dict[root]["files"].append(file)
     return file_dict
+
+def codeliteProjectGenerator(project_info):
+    template = open("cltemplates/bertos.project").read()
+    filelist = "\n".join(clFiles(findSources(project_info.info("PROJECT_PATH")), project_info.info("PROJECT_PATH")))
+    while template.find("$filelist") != -1:
+        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)
+    return template
+
+def codeliteWorkspaceGenerator(project_info):
+    template = open("cltemplates/bertos.workspace").read()
+    project_name = os.path.basename(project_info.info("PROJECT_PATH"))
+    while template.find("$project") != -1:
+        template = template.replace("$project", project_name)
+    return template