diff --git a/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java b/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java index 3788d239c7..ffbd919a72 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java +++ b/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java @@ -147,7 +147,11 @@ public class FpdParserTask extends Task { // Parse FPD file // parseFpdFile(); - + + getProject().setProperty("PLATFORM", platformId.getName()); + getProject().setProperty("PLATFORM_DIR", platformId.getFpdFile().getParent().replaceAll("(\\\\)", "/")); + getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/")); + // // Pcd Collection. Call CollectPCDAction to collect pcd info. // @@ -361,9 +365,6 @@ public class FpdParserTask extends Task { // platformId = SurfaceAreaQuery.getFpdHeader(); platformId.setFpdFile(fpdFile); - getProject().setProperty("PLATFORM", platformId.getName()); - getProject().setProperty("PLATFORM_DIR", platformId.getFpdFile().getParent().replaceAll("(\\\\)", "/")); - getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/")); // // Build mode. User-defined output dir. diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java index c576363074..29819dd0d7 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java +++ b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java @@ -42,6 +42,7 @@ import org.tianocore.PcdBuildDefinitionDocument; import org.tianocore.ModuleSADocument; import org.tianocore.PcdBuildDefinitionDocument.PcdBuildDefinition; import org.tianocore.build.autogen.CommonDefinition; +import org.tianocore.build.fpd.FpdParserTask; import org.tianocore.build.global.GlobalData; import org.tianocore.build.id.FpdModuleIdentification; import org.tianocore.build.pcd.action.ActionMessage; @@ -2768,11 +2769,14 @@ public class CollectPCDAction { **/ public static void main(String argv[]) throws EntityException { CollectPCDAction ca = new CollectPCDAction(); - ca.setWorkspacePath("m:/tianocore/edk2"); - ca.setFPDFilePath("m:/tianocore/edk2/EdkNt32Pkg/Nt32.fpd"); + ca.setWorkspacePath("f:/tianocore/edk2"); + ca.setFPDFilePath("f:/tianocore/edk2/EdkNt32Pkg/Nt32.fpd"); ca.setActionMessageLevel(ActionMessage.MAX_MESSAGE_LEVEL); -// GlobalData.initInfo("Tools" + File.separator + "Conf" + File.separator + "FrameworkDatabase.db", -// "m:/tianocore/edk2"); -// ca.execute(); + GlobalData.initInfo("Tools" + File.separator + "Conf" + File.separator + "FrameworkDatabase.db", + "f:/tianocore/edk2", + "tools_def.txt"); + FpdParserTask fpt = new FpdParserTask(); + fpt.parseFpdFile(new File("f:/tianocore/edk2/EdkNt32Pkg/Nt32.fpd")); + ca.execute(); } }