+ //---------------------------------------------------------------------------//\r
+ \r
+ private static final void manipulate(ModuleInfo mi) throws Exception {\r
+ \r
+ ModuleReader.ModuleScan(mi);\r
+ \r
+ SourceFileReplacer.flush(mi); // some adding library actions are taken here,so it must be put before "MsaWriter"\r
+ \r
+ // show result\r
+ if (ModuleInfo.printModuleInfo) {\r
+ ModuleInfo.ui.println("\nModule Information : ");\r
+ ModuleInfo.ui.println("Entrypoint : " + mi.entrypoint);\r
+ show(mi.protocol, "Protocol : ");\r
+ show(mi.ppi, "Ppi : ");\r
+ show(mi.guid, "Guid : ");\r
+ show(mi.hashfuncc, "call : ");\r
+ show(mi.hashfuncd, "def : ");\r
+ show(mi.hashEFIcall, "EFIcall : ");\r
+ show(mi.hashnonlocalmacro, "macro : ");\r
+ show(mi.hashnonlocalfunc, "nonlocal : ");\r
+ show(mi.hashr8only, "hashr8only : ");\r
+ }\r
+ \r
+ new MsaWriter(mi).flush();\r
+\r
+ if (ModuleInfo.doCritic) {\r
+ Critic.fireAt(mi.outputpath + File.separator + "Migration_" + mi.modulename);\r
+ }\r
+ \r
+ Common.deleteDir(mi.modulepath + File.separator + "temp");\r
+ \r
+ ModuleInfo.ui.println("Errors Left : " + ModuleInfo.db.error);\r
+ ModuleInfo.ui.println("Complete!");\r
+ //ModuleInfo.ui.println("Your R9 module was placed here: " + mi.modulepath + File.separator + "result");\r
+ //ModuleInfo.ui.println("Your logfile was placed here: " + mi.modulepath);\r
+ }\r
+ \r
+ private static final void show(Set<String> hash, String show) {\r
+ ModuleInfo.ui.println(show + hash.size());\r
+ ModuleInfo.ui.println(hash);\r
+ }\r
+ \r
+ public static final void seekModule(String filepath) throws Exception {\r
+ if (ModuleInfo.isModule(filepath)) {\r
+ manipulate(new ModuleInfo(filepath));\r
+ }\r
+ }\r
+\r