Add also files, when selecting the modules in the project loading process
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 8 Sep 2009 09:47:21 +0000 (09:47 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 8 Sep 2009 09:47:21 +0000 (09:47 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2900 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py

index 2520b109cff531be35b6e70308f9a6dc338f65f1..f509a4c2430055680334b2856fc9994389ee6fe8 100644 (file)
@@ -87,9 +87,17 @@ def loadBertosProject(project_file):
 
 def setEnabledModules(project_info, enabled_modules):
     modules = project_info.info("MODULES")
+    files = {}
     for module, information in modules.items():
         information["enabled"] = module in enabled_modules
+       for dependency in information["depends"]:
+            if not dependency in modules:
+               if dependency in files:
+                   files[dependency] += 1
+               else:
+                   files[dependency] = 1
     project_info.setInfo("MODULES", modules)
+    project_info.setInfo("FILES", files)
 
 def enabledModules(project_info):
     enabled_modules = []