Use generic plugins
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 22 Apr 2009 10:47:14 +0000 (10:47 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 22 Apr 2009 10:47:14 +0000 (10:47 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2620 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py

index 191aad32f3643ef722ca67c4e044d49c0511bf0f..5d08f54db01d1ebbadf9cf9d0cbd160572a5d7c8 100644 (file)
@@ -19,7 +19,7 @@ import copytree
 import pickle
 
 import const
-from plugins import codelite
+import plugins
 import DefineException
 
 def isBertosDir(directory):
@@ -94,9 +94,10 @@ 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.createProject(project_info)
+    # Files for selected plugins
+    for plugin in project_info.info("OUTPUT"):
+        module = getattr(__import__("plugins", {}, {}, [plugin]), plugin)
+        module.createProject(project_info)
 
 def mkGenerator(project_info, makefile):
     """