-public class ModuleInfo {\r
- ModuleInfo(String modulepath) throws Exception {\r
- this.modulepath = modulepath;\r
- \r
- if (ModuleInfo.defaultoutput) {\r
- this.outputpath = this.modulepath.replaceAll(Common.strseparate, "$1");\r
- } else {\r
- ModuleInfo.ui.println("Choose where to place the result");\r
- if ((outputpath = ModuleInfo.ui.getFilepath()) == null) {\r
- outputpath = modulepath; \r
- }\r
- ModuleInfo.ui.println("Output to: " + outputpath);\r
- }\r
- }\r
-\r
- public String modulepath = null;\r
- \r
- public String outputpath = null;\r
- \r
- public String modulename = null;\r
- public String guidvalue = null;\r
- public String moduletype = null;\r
- public String entrypoint = null;\r
- \r
- public Set<String> localmodulesources = new HashSet<String>(); //contains both .c and .h\r
- public Set<String> preprocessedccodes = new HashSet<String>();\r
- public Set<String> msaorinf = new HashSet<String>(); //only a little, hash may be too big for this\r
- \r
- public Set<String> hashfuncc = new HashSet<String>();\r
- public Set<String> hashfuncd = new HashSet<String>();\r
- public Set<String> hashnonlocalfunc = new HashSet<String>();\r
- public Set<String> hashnonlocalmacro = new HashSet<String>();\r
- public Set<String> hashEFIcall = new HashSet<String>();\r
- public Set<String> hashr8only = new HashSet<String>();\r
- \r
- public Set<String> hashrequiredr9libs = new HashSet<String>(); // hashrequiredr9libs is now all added in SourceFileReplacer \r
- public Set<String> guid = new HashSet<String>();\r
- public Set<String> protocol = new HashSet<String>();\r
- public Set<String> ppi = new HashSet<String>();\r
-\r
- public final void enroll(String filepath) throws Exception {\r
- String[] temp;\r
- if (filepath.contains(".c") || filepath.contains(".C") || filepath.contains(".h") || \r
- filepath.contains(".H") || filepath.contains(".dxs") || filepath.contains(".uni")) {\r
- temp = filepath.split("\\\\");\r
- localmodulesources.add(temp[temp.length - 1]);\r
- } else if (filepath.contains(".inf") || filepath.contains(".msa")) {\r
- temp = filepath.split("\\\\");\r
- msaorinf.add(temp[temp.length - 1]);\r
- }\r
- }\r
-\r
- public static final boolean isModule(String path) {\r
- String[] list = new File(path).list();\r
- for (int i = 0 ; i < list.length ; i++) {\r
- if (!new File(list[i]).isDirectory()) {\r
- if (list[i].contains(".inf") || list[i].contains(".msa")) {\r
- return true;\r
- }\r
- }\r
- }\r
- return false;\r
- }\r