X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fbertos_utils.py;h=17c3a18f50bf2aa50f85cbb3d0aa3adfb1a17225;hb=ff9e3c69aa5e11915f056f45f6200009dd29127c;hp=2bb749ff2ec7baa6494a094edcaa0ecb81b47498;hpb=3475446433a31b89ab480cd19bbdbe8473c3d7fe;p=bertos.git diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 2bb749ff..17c3a18f 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -19,7 +19,7 @@ import copytree import pickle import const -from plugins import codelite_project +import plugins import DefineException def isBertosDir(directory): @@ -94,10 +94,19 @@ def createBertosProject(project_info): # Destination main.c file main = open("srctemplates/main.c", "r").read() open(prjdir + "/main.c", "w").write(main) - # Codelite project files - if "codelite" in project_info.info("OUTPUT"): - codelite_project.createProject(project_info) - + # Files for selected plugins + relevants_files = {} + for plugin in project_info.info("OUTPUT"): + module = loadPlugin(plugin) + relevants_files[plugin] = module.createProject(project_info) + project_info.setInfo("RELEVANT_FILES", relevants_files) + +def loadPlugin(plugin): + """ + Returns the given plugin module. + """ + return getattr(__import__("plugins", {}, {}, [plugin]), plugin) + def mkGenerator(project_info, makefile): """ Generates the mk file for the current project.