- for comment in commentList:
- index = comment.find("$WIZARD_MODULE")
- if index != -1:
- exec(comment[index + 1:])
- moduleInfos[WIZARD_MODULE["name"]] = {"depends": WIZARD_MODULE["depends"],
- "configuration": WIZARD_MODULE["configuration"],
- "description": "",
- "enabled": False}
- return moduleInfos
- return {}
+ if len(commentList) > 0:
+ comment = commentList[0]
+ if comment.find("$WIZARD_MODULE") != -1:
+ index = comment.find("$WIZARD_MODULE")
+ if index != -1:
+ # 14 is the length of "$WIZARD_MODULE"
+ if len(comment[index + 14:].strip()) > 0:
+ exec(comment[index + 1:])
+ moduleInfos[WIZARD_MODULE["name"]] = {"depends": WIZARD_MODULE["depends"],
+ "configuration": WIZARD_MODULE["configuration"],
+ "description": "",
+ "enabled": False}
+ index = comment.find("\\brief")
+ if index != -1:
+ description = comment[index + 7:]
+ description = description[:description.find(" * ")]
+ moduleInfos[WIZARD_MODULE["name"]]["description"] = description
+ if "configuration" in WIZARD_MODULE.keys() and len(WIZARD_MODULE["configuration"]) > 0:
+ configurationsInfos[WIZARD_MODULE["configuration"]] = {}
+ listInfos.update(loadDefineLists(path))
+ return moduleInfos, listInfos, configurationsInfos