if (platformName == null) {\r
throw new BuildException("FpdParserTask parameter error. Please specify platform name or FPD file. ");\r
}\r
- platformId = GlobalData.getPlatform(platformName);\r
+ platformId = GlobalData.getPlatformByName(platformName);\r
fpdFile = platformId.getFpdFile();\r
}\r
\r
//\r
parseFpdFile();\r
\r
- //\r
- // Pcd Collection. Call CollectPCDAction to collect pcd info.\r
- //\r
- try {\r
- System.out.println("Begin PCD collecttion!");\r
- CollectPCDAction ca = new CollectPCDAction();\r
- ca.perform(GlobalData.getWorkspacePath(),platformId.getFpdFile().getPath(),ActionMessage.NULL_MESSAGE_LEVEL);\r
- System.out.println("End PCD collection!"); \r
- } catch (Exception e){\r
- throw new BuildException(e.getMessage());\r
- }\r
- \r
//\r
// Prepare BUILD_DIR\r
//\r
Map<String, XmlObject> map = new HashMap<String, XmlObject>();\r
map.put("PlatformSurfaceArea", doc);\r
SurfaceAreaQuery.setDoc(map);\r
- \r
+ SurfaceAreaQuery.getFpdUserExtension();\r
//\r
// Initialize\r
//\r
platformId = SurfaceAreaQuery.getFpdHeader();\r
platformId.setFpdFile(fpdFile);\r
getProject().setProperty("PLATFORM", platformId.getName());\r
+ getProject().setProperty("PLATFORM_FILE", platformId.getRelativeFpdFile().replaceAll("(\\\\)", "/"));\r
getProject().setProperty("PLATFORM_DIR", platformId.getFpdFile().getParent().replaceAll("(\\\\)", "/"));\r
getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));\r
\r
parseToolChainOptions();\r
\r
SurfaceAreaQuery.setDoc(map);\r
+ \r
+ //\r
+ // Pcd Collection. Call CollectPCDAction to collect pcd info.\r
+ //\r
+ try {\r
+ CollectPCDAction ca = new CollectPCDAction();\r
+ ca.perform(GlobalData.getWorkspacePath(),platformId.getFpdFile().getPath(),ActionMessage.NULL_MESSAGE_LEVEL);\r
+ } catch (Exception e){\r
+ throw new BuildException(e.getMessage());\r
+ }\r
} catch (Exception e) {\r
e.printStackTrace();\r
throw new BuildException("Load FPD file [" + fpdFile.getPath() + "] error. \n" + e.getMessage());\r