X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fplugins%2Fcodelite.py;h=1638823304d0ad243fc2c7127496c63f45795126;hb=47219caf366ee98c051346d9e3fbdd30eca45827;hp=7f4daac885cb8d067ece5c27c01bbf879663ebf2;hpb=cf36efa296379eb024dd593fc2806a42093e6c97;p=bertos.git diff --git a/wizard/plugins/codelite.py b/wizard/plugins/codelite.py index 7f4daac8..16388233 100644 --- a/wizard/plugins/codelite.py +++ b/wizard/plugins/codelite.py @@ -103,15 +103,11 @@ def codeliteProjectGenerator(project_info): 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): @@ -120,6 +116,5 @@ def codeliteWorkspaceGenerator(project_info): """ 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