while (mtrinfequation.find()) {\r
if (mtrinfequation.group(1).matches("IMAGE_ENTRY_POINT")) {\r
mi.entrypoint = mtrinfequation.group(2);\r
- mi.hashrequiredr9libs.add("EntryPointLib");\r
}\r
if (mtrinfequation.group(1).matches("DPX_SOURCE")) {\r
if (!mi.localmodulesources.contains(mtrinfequation.group(2))) {\r
\r
private final void preProcessModule() throws Exception {\r
// according to .inf file, add extraordinary includes and sourcefiles\r
- Common.dirCopy(mi.modulepath, mi.modulepath + File.separator + "temp"); // collect all Laplace.namechange to here???\r
+ Common.dirCopy(mi.modulepath, mi.temppath); // collect all Laplace.namechange to here???\r
\r
if (!mi.infincludes.isEmpty()) {\r
Iterator<String> it = mi.infincludes.iterator();\r
if (tempincludename.contains("..")) {\r
Matcher mtr = Common.PTNSEPARATER.matcher(tempincludename);\r
if (mtr.find() && !mtr.group(2).matches(".")) {\r
- Common.oneLevelDirCopy(mi.modulepath.replaceAll(Common.STRSEPARATER, "$1") + File.separator + mtr.group(2), mi.modulepath + File.separator + "temp", ".h");\r
+ Common.oneLevelDirCopy(mi.modulepath.replaceAll(Common.STRSEPARATER, "$1") + File.separator + mtr.group(2), mi.temppath, ".h");\r
} else {\r
- Common.oneLevelDirCopy(mi.modulepath.replaceAll(Common.STRSEPARATER, "$1"), mi.modulepath + File.separator + "temp", ".h");\r
+ Common.oneLevelDirCopy(mi.modulepath.replaceAll(Common.STRSEPARATER, "$1"), mi.temppath, ".h");\r
}\r
}\r
}\r
while (it.hasNext()) {\r
tempsourcename = it.next();\r
if (tempsourcename.contains("..")) {\r
- Common.ensureDir(mi.modulepath + File.separator + "temp" + File.separator + "MT_Parent_Sources");\r
+ Common.ensureDir(mi.temppath + File.separator + "MT_Parent_Sources");\r
Matcher mtr = Common.PTNSEPARATER.matcher(tempsourcename);\r
if (mtr.find()) {\r
- Common.fileCopy(mi.modulepath.replaceAll(Common.STRSEPARATER, "$1") + File.separator + mtr.group(2), mi.modulepath + File.separator + "temp" + File.separator + "MT_Parent_Sources" + File.separator + mtr.group(2));\r
+ Common.fileCopy(mi.modulepath.replaceAll(Common.STRSEPARATER, "$1") + File.separator + mtr.group(2), mi.temppath + File.separator + "MT_Parent_Sources" + File.separator + mtr.group(2));\r
}\r
}\r
}\r
}\r
\r
//CommentOutNonLocalHFile();\r
- Common.toDoAll(mi.modulepath + File.separator + "temp", this, Common.FILE);\r
+ Common.toDoAll(mi.temppath, this, Common.FILE);\r
\r
parsePreProcessedSourceCode();\r
\r
ii = mi.preprocessedccodes.iterator();\r
\r
Pattern patefifuncc = Pattern.compile("g?(BS|RT)\\s*->\\s*([a-zA-Z_]\\w*)",Pattern.MULTILINE);\r
- Pattern patentrypoint = Pattern.compile("EFI_([A-Z]*)_ENTRY_POINT\\s*\\(([^\\(\\)]*)\\)",Pattern.MULTILINE);\r
Matcher matguid;\r
Matcher matfuncc;\r
Matcher matfuncd;\r
Matcher matenclosereplace;\r
Matcher matefifuncc;\r
- Matcher matentrypoint;\r
Matcher matmacro;\r
\r
while (ii.hasNext()) {\r
StringBuffer wholefile = new StringBuffer();\r
ifile = ii.next();\r
- rd = new BufferedReader(new FileReader(mi.modulepath + File.separator + "temp" + File.separator + ifile));\r
+ rd = new BufferedReader(new FileReader(mi.temppath + File.separator + ifile));\r
while ((line = rd.readLine()) != null) {\r
wholefile.append(line + '\n');\r
}\r
line = wholefile.toString();\r
\r
- // if this is a Pei phase module , add these library class to .msa\r
- matentrypoint = patentrypoint.matcher(line);\r
- if (matentrypoint.find()) {\r
- mi.entrypoint = matentrypoint.group(2);\r
- if (matentrypoint.group(1).matches("PEIM")) {\r
- mi.hashrequiredr9libs.add("PeimEntryPoint");\r
- } else {\r
- mi.hashrequiredr9libs.add("UefiDriverEntryPoint");\r
- }\r
- }\r
- \r
// find guid\r
matguid = Guid.ptnguid.matcher(line); // several ways to implement this , which one is faster ? :\r
while (matguid.find()) { // 1.currently , find once , then call to identify which is it\r
\r
//-----------------------------------ForDoAll-----------------------------------//\r
public void run(String filepath) throws Exception {\r
- String name = mi.modulepath + File.separator + "temp" + File.separator + filepath.replace(mi.modulepath + File.separator + "temp" + File.separator, "");\r
+ String name = mi.temppath + File.separator + filepath.replace(mi.temppath + File.separator, "");\r
commentlaplace.transform(name, name);\r
}\r
\r