<?xml version="1.0" encoding="UTF-8"?>\r
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
<MsaHeader>\r
- <ModuleName>Hello World UEFI Application</ModuleName>\r
+ <ModuleName>Hello_World_UEFI_Application</ModuleName>\r
<ModuleType>UEFI_APPLICATION</ModuleType>\r
<GuidValue>6987936E-ED34-44db-AE97-1FA5E4ED2116</GuidValue>\r
<Version>1.0</Version>\r
<ModuleEntryPoint>UefiMain</ModuleEntryPoint>\r
</Extern>\r
</Externs>\r
-</ModuleSurfaceArea>
\ No newline at end of file
+</ModuleSurfaceArea>\r
// If find more than one FPD files, report error. \r
//\r
File buildFile = null;\r
- if (msaFiles.size() > 1) {\r
- throw new BuildException("Found " + msaFiles.size() + " MSA files in current dir. ");\r
- } else if (msaFiles.size() == 1 && activePlatform == null) {\r
- throw new BuildException("If trying to build a single module, please set ACTIVE_PLATFORM in file [" + targetFilename + "]. ");\r
- } else if (msaFiles.size() == 1 && activePlatform != null) {\r
+ if (msaFiles.size() > 0) {\r
+ if (activePlatform == null) {\r
+ throw new BuildException("If trying to build a single module, please set ACTIVE_PLATFORM in file [" + targetFilename + "]. ");\r
+ }\r
//\r
// Build the single module\r
//\r
}\r
File tmpFile = new File(GlobalData.getWorkspacePath() + File.separatorChar + activePlatform);\r
EdkLog.log(this, "Using the FPD file [" + tmpFile.getPath() + "] for the active platform. ");\r
- EdkLog.log(this, "Processing the MSA file [" + buildFile.getPath() + "] ..>> ");\r
- GenBuildTask genBuildTask = new GenBuildTask();\r
- genBuildTask.setSingleModuleBuild(true);\r
- genBuildTask.setType(type);\r
- getProject().setProperty("PLATFORM_FILE", activePlatform);\r
- if( !multithread) {\r
- originalProperties.put("PLATFORM_FILE", activePlatform);\r
+\r
+ File[] moduleFiles = msaFiles.toArray(new File[msaFiles.size()]);\r
+ for (int i = 0; i < moduleFiles.length; ++i) {\r
+ EdkLog.log(this, "Processing the MSA file [" + moduleFiles[i].getPath() + "] ..>> ");\r
+ GenBuildTask genBuildTask = new GenBuildTask();\r
+ genBuildTask.setSingleModuleBuild(true);\r
+ genBuildTask.setType(type);\r
+ getProject().setProperty("PLATFORM_FILE", activePlatform);\r
+ if( !multithread) {\r
+ originalProperties.put("PLATFORM_FILE", activePlatform);\r
+ }\r
+ genBuildTask.setProject(getProject());\r
+ genBuildTask.setMsaFile(moduleFiles[i]);\r
+ genBuildTask.perform();\r
}\r
- genBuildTask.setProject(getProject());\r
- genBuildTask.setMsaFile(buildFile);\r
- genBuildTask.perform();\r
}\r
}\r
\r
}\r
}\r
\r
+ if (archList.length == 0) {\r
+ EdkLog.log(this, EdkLog.EDK_WARNING, "Warning: " + moduleId + " was not found in current platform FPD file!\n");\r
+ }\r
+\r
for (int k = 0; k < archList.length; k++) {\r
\r
getProject().setProperty("ARCH", archList[k]);\r
getProject().setProperty("VERSION", moduleId.getVersion());\r
getProject().setProperty("MODULE_TYPE", moduleId.getModuleType());\r
getProject().setProperty("MODULE_DIR", moduleId.getMsaFile().getParent().replaceAll("(\\\\)", "/"));\r
- getProject().setProperty("MODULE_RELATIVE_DIR", moduleId.getModuleRelativePath().replaceAll("(\\\\)", "/"));\r
+ getProject().setProperty("MODULE_RELATIVE_DIR", moduleId.getModuleRelativePath().replaceAll("(\\\\)", "/") + File.separatorChar + moduleId.getName());\r
\r
//\r
// SUBSYSTEM\r