From d14ebb43742f411f2a013996b8e76bcab2420552 Mon Sep 17 00:00:00 2001 From: klu2 Date: Mon, 31 Jul 2006 18:55:26 +0000 Subject: [PATCH] Because Pcd entity, exception and some action package are shared by Building tools and Wizard Tools, so I move them to Tools/Source folder and generated PcdTools.jar, git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1160 6f19259b-4bc3-4df7-8a09-765794883524 --- Tools/Source/GenBuild/GenBuild.msa | 13 - Tools/Source/GenBuild/build.xml | 1 + .../tianocore/build/fpd/FpdParserTask.java | 2 +- .../tianocore/build/global/GlobalData.java | 2 +- .../build/pcd/action/CollectPCDAction.java | 31 +- .../build/pcd/action/PCDAutoGenAction.java | 50 +-- Tools/Source/PcdTools/PcdTools.msa | 45 +++ Tools/Source/PcdTools/build.xml | 52 +++ .../tianocore}/pcd/action/ActionMessage.java | 3 +- .../tianocore}/pcd/action/BuildAction.java | 10 +- .../pcd/entity/CommonDefinition.java | 354 ++++++++++++++++++ .../pcd/entity/DynamicTokenValue.java | 4 +- .../pcd/entity/MemoryDatabaseManager.java | 14 +- .../tianocore}/pcd/entity/SkuInstance.java | 2 +- .../org/tianocore}/pcd/entity/Token.java | 22 +- .../pcd/entity/UsageIdentification.java | 97 +++++ .../tianocore}/pcd/entity/UsageInstance.java | 46 +-- .../pcd/exception/BuildActionException.java | 2 +- .../pcd/exception/EntityException.java | 2 +- .../tianocore}/pcd/exception/UIException.java | 2 +- Tools/Tools.spd | 1 + Tools/build.xml | 3 + edksetup.bat | 2 + edksetup.sh | 3 +- 24 files changed, 645 insertions(+), 118 deletions(-) create mode 100644 Tools/Source/PcdTools/PcdTools.msa create mode 100644 Tools/Source/PcdTools/build.xml rename Tools/Source/{GenBuild/org/tianocore/build => PcdTools/org/tianocore}/pcd/action/ActionMessage.java (95%) rename Tools/Source/{GenBuild/org/tianocore/build => PcdTools/org/tianocore}/pcd/action/BuildAction.java (89%) create mode 100644 Tools/Source/PcdTools/org/tianocore/pcd/entity/CommonDefinition.java rename Tools/Source/{GenBuild/org/tianocore/build => PcdTools/org/tianocore}/pcd/entity/DynamicTokenValue.java (94%) rename Tools/Source/{GenBuild/org/tianocore/build => PcdTools/org/tianocore}/pcd/entity/MemoryDatabaseManager.java (93%) rename Tools/Source/{GenBuild/org/tianocore/build => PcdTools/org/tianocore}/pcd/entity/SkuInstance.java (93%) rename Tools/Source/{GenBuild/org/tianocore/build => PcdTools/org/tianocore}/pcd/entity/Token.java (94%) create mode 100644 Tools/Source/PcdTools/org/tianocore/pcd/entity/UsageIdentification.java rename Tools/Source/{GenBuild/org/tianocore/build => PcdTools/org/tianocore}/pcd/entity/UsageInstance.java (88%) rename Tools/Source/{GenBuild/org/tianocore/build => PcdTools/org/tianocore}/pcd/exception/BuildActionException.java (92%) rename Tools/Source/{GenBuild/org/tianocore/build => PcdTools/org/tianocore}/pcd/exception/EntityException.java (92%) rename Tools/Source/{GenBuild/org/tianocore/build => PcdTools/org/tianocore}/pcd/exception/UIException.java (92%) diff --git a/Tools/Source/GenBuild/GenBuild.msa b/Tools/Source/GenBuild/GenBuild.msa index 0fe46bb6cb..717550432d 100644 --- a/Tools/Source/GenBuild/GenBuild.msa +++ b/Tools/Source/GenBuild/GenBuild.msa @@ -66,21 +66,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. org/tianocore/build/id/PlatformIdentification.java org/tianocore/build/ModuleBuildFileGenerator.java org/tianocore/build/OutputDirSetup.java - org/tianocore/build/pcd/action/ActionMessage.java - org/tianocore/build/pcd/action/BuildAction.java org/tianocore/build/pcd/action/CollectPCDAction.java org/tianocore/build/pcd/action/PCDAutoGenAction.java - org/tianocore/build/pcd/action/ShowPCDDatabaseAction.java - org/tianocore/build/pcd/action/UIAction.java - org/tianocore/build/pcd/entity/DynamicTokenValue.java - org/tianocore/build/pcd/entity/MemoryDatabaseManager.java - org/tianocore/build/pcd/entity/SkuInstance.java - org/tianocore/build/pcd/entity/Token.java - org/tianocore/build/pcd/entity/UsageInstance.java - org/tianocore/build/pcd/exception/BuildActionException.java - org/tianocore/build/pcd/exception/EntityException.java - org/tianocore/build/pcd/exception/UIException.java - org/tianocore/build/pcd/ui/PCDDatabaseFrame.java org/tianocore/build/toolchain/ConfigReader.java org/tianocore/build/toolchain/ToolChainAttribute.java org/tianocore/build/toolchain/ToolChainConfig.java diff --git a/Tools/Source/GenBuild/build.xml b/Tools/Source/GenBuild/build.xml index e40e756aad..b61e2519c3 100644 --- a/Tools/Source/GenBuild/build.xml +++ b/Tools/Source/GenBuild/build.xml @@ -17,6 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + diff --git a/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java b/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java index 39d4d6f2d4..bd87b6e0f2 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java +++ b/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java @@ -39,7 +39,7 @@ import org.tianocore.build.global.SurfaceAreaQuery; import org.tianocore.build.id.FpdModuleIdentification; import org.tianocore.build.id.ModuleIdentification; import org.tianocore.build.id.PlatformIdentification; -import org.tianocore.build.pcd.action.ActionMessage; +import org.tianocore.pcd.action.ActionMessage; import org.tianocore.build.pcd.action.CollectPCDAction; import org.tianocore.build.toolchain.ToolChainAttribute; import org.tianocore.build.toolchain.ToolChainElement; diff --git a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java index a769816720..b02af3df66 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java +++ b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java @@ -35,7 +35,7 @@ import org.tianocore.build.id.FpdModuleIdentification; import org.tianocore.build.id.ModuleIdentification; import org.tianocore.build.id.PackageIdentification; import org.tianocore.build.id.PlatformIdentification; -import org.tianocore.build.pcd.entity.MemoryDatabaseManager; +import org.tianocore.pcd.entity.MemoryDatabaseManager; import org.tianocore.build.toolchain.ToolChainAttribute; import org.tianocore.build.toolchain.ToolChainConfig; import org.tianocore.build.toolchain.ToolChainElement; 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 8242a4c87c..e0a3eb6fd3 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java +++ b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java @@ -41,17 +41,19 @@ import org.tianocore.ModuleSADocument; import org.tianocore.PcdBuildDefinitionDocument; import org.tianocore.PcdBuildDefinitionDocument.PcdBuildDefinition; import org.tianocore.PlatformSurfaceAreaDocument; -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; -import org.tianocore.build.pcd.entity.DynamicTokenValue; -import org.tianocore.build.pcd.entity.MemoryDatabaseManager; -import org.tianocore.build.pcd.entity.SkuInstance; -import org.tianocore.build.pcd.entity.Token; -import org.tianocore.build.pcd.entity.UsageInstance; -import org.tianocore.build.pcd.exception.EntityException; +import org.tianocore.build.id.ModuleIdentification; +import org.tianocore.pcd.action.ActionMessage; +import org.tianocore.pcd.entity.CommonDefinition; +import org.tianocore.pcd.entity.DynamicTokenValue; +import org.tianocore.pcd.entity.MemoryDatabaseManager; +import org.tianocore.pcd.entity.SkuInstance; +import org.tianocore.pcd.entity.Token; +import org.tianocore.pcd.entity.UsageIdentification; +import org.tianocore.pcd.entity.UsageInstance; +import org.tianocore.pcd.exception.EntityException; /** CStructTypeDeclaration @@ -1893,6 +1895,8 @@ public class CollectPCDAction { String datum = null; int maxDatumSize = 0; String[] tokenSpaceStrRet = null; + UsageIdentification usageId = null; + ModuleIdentification moduleId = null; // // ---------------------------------------------- @@ -2112,10 +2116,17 @@ public class CollectPCDAction { // 2.1.4), Create an usage instance for this token. // ------------------------------------------------ // + moduleId = modules.get(index).getModuleId().getModule(); + usageId = new UsageIdentification (moduleId.getName(), + moduleId.getGuid(), + moduleId.getPackage().getName(), + moduleId.getPackage().getGuid(), + modules.get(index).getModuleId().getArch(), + moduleId.getVersion(), + moduleId.getModuleType()); usageInstance = new UsageInstance(token, - modules.get(index).getModuleId().getModule(), + usageId, pcdType, - modules.get(index).getModuleId().getArch(), datum, maxDatumSize); token.addUsageInstance(usageInstance); diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/PCDAutoGenAction.java b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/PCDAutoGenAction.java index 2707c5d1a8..40d2b32a9b 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/PCDAutoGenAction.java +++ b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/PCDAutoGenAction.java @@ -29,11 +29,14 @@ import org.apache.xmlbeans.XmlObject; import org.tianocore.build.global.GlobalData; import org.tianocore.build.global.SurfaceAreaQuery; import org.tianocore.build.id.ModuleIdentification; -import org.tianocore.build.pcd.entity.MemoryDatabaseManager; -import org.tianocore.build.pcd.entity.Token; -import org.tianocore.build.pcd.entity.UsageInstance; -import org.tianocore.build.pcd.exception.BuildActionException; -import org.tianocore.build.pcd.exception.EntityException; +import org.tianocore.pcd.entity.MemoryDatabaseManager; +import org.tianocore.pcd.entity.Token; +import org.tianocore.pcd.entity.UsageInstance; +import org.tianocore.pcd.exception.BuildActionException; +import org.tianocore.pcd.exception.EntityException; +import org.tianocore.pcd.entity.UsageIdentification; +import org.tianocore.pcd.action.BuildAction; +import org.tianocore.pcd.action.ActionMessage; /** This class is to manage how to generate the PCD information into Autogen.c and Autogen.h. @@ -44,9 +47,9 @@ public class PCDAutoGenAction extends BuildAction { /// private MemoryDatabaseManager dbManager; /// - /// The identification for a module. + /// The identification for a UsageInstance. /// - private ModuleIdentification moduleId; + private UsageIdentification usageId; /// /// The arch of current module /// @@ -72,17 +75,8 @@ public class PCDAutoGenAction extends BuildAction { @param moduleName the module name parameter. **/ - public void setModuleId(ModuleIdentification moduleId) { - this.moduleId = moduleId; - } - - /** - set Arch parameter. - - @param arch - **/ - public void setArch(String arch) { - this.arch = arch; + public void setUsageId(UsageIdentification usageId) { + this.usageId = usageId; } /** @@ -136,12 +130,18 @@ public class PCDAutoGenAction extends BuildAction { String arch, boolean isBuildUsedLibrary, String[] pcdNameArrayInMsa) { + UsageIdentification usageId = new UsageIdentification(moduleId.getName(), + moduleId.getGuid(), + moduleId.getPackage().getName(), + moduleId.getPackage().getGuid(), + arch, + moduleId.getVersion(), + moduleId.getModuleType()); dbManager = null; hAutoGenString = ""; cAutoGenString = ""; - setModuleId(moduleId); - setArch(arch); + setUsageId(usageId); setIsBuildUsedLibrary(isBuildUsedLibrary); setPcdNameArrayInMsa(pcdNameArrayInMsa); } @@ -151,7 +151,7 @@ public class PCDAutoGenAction extends BuildAction { @throws BuildActionException Bad parameter. **/ - void checkParameter() throws BuildActionException { + public void checkParameter() throws BuildActionException { } @@ -165,7 +165,7 @@ public class PCDAutoGenAction extends BuildAction { @throws BuildActionException Failed to execute this aciton class. **/ - void performAction() throws BuildActionException { + public void performAction() throws BuildActionException { ActionMessage.debug(this, "Starting PCDAutoGenAction to generate autogen.h and autogen.c!..."); // @@ -200,13 +200,13 @@ public class PCDAutoGenAction extends BuildAction { String[] guidStringArray = null; String guidStringCName = null; String guidString = null; - String moduleName = moduleId.getName(); + String moduleName = usageId.moduleName; UsageInstance usageInstance = null; boolean found = false; usageInstanceArray = null; if (!isBuildUsedLibrary) { - usageInstanceArray = dbManager.getUsageInstanceArrayByModuleName(moduleId, arch); + usageInstanceArray = dbManager.getUsageInstanceArrayByModuleName(usageId); dbManager.UsageInstanceContext = usageInstanceArray; dbManager.CurrentModuleName = moduleName; } else if ((pcdNameArrayInMsa != null) && (pcdNameArrayInMsa.length > 0)) { @@ -216,7 +216,7 @@ public class PCDAutoGenAction extends BuildAction { // these library should be used to autogen. // if (usageContext == null) { - usageInstanceArray = dbManager.getUsageInstanceArrayByModuleName(moduleId, arch); + usageInstanceArray = dbManager.getUsageInstanceArrayByModuleName(usageId); } else { usageInstanceArray = new ArrayList(); diff --git a/Tools/Source/PcdTools/PcdTools.msa b/Tools/Source/PcdTools/PcdTools.msa new file mode 100644 index 0000000000..3b47a92cbd --- /dev/null +++ b/Tools/Source/PcdTools/PcdTools.msa @@ -0,0 +1,45 @@ + + + + PcdTools + TOOL + 95506773-88f3-475a-91a1-14ce0c847353 + 2.0 + This is the EFI/Tiano PCD Tool Resources Module + + This Module provdes the entity, action and exception package for PCD + tools, This package will be shared for building tools or wizard tools. + + Copyright 2005-2006, Intel Corporation + +All rights reserved. +This program and the accompanying materials +are licensed and made available under the terms and conditions of the +BSD License which accompanies this distribution. The full text of the +license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052 + + + IA32 X64 IPF EBC + false + NULL + + + build.xml + org/tianocore/pcd/action/ActionMessage.java + org/tianocore/pcd/action/BuildAction.java + org/tianocore/pcd/entity/DynamicTokenValue.java + org/tianocore/pcd/entity/MemoryDatabaseManager.java + org/tianocore/pcd/entity/SkuInstance.java + org/tianocore/pcd/entity/Token.java + org/tianocore/pcd/entity/UsageInstance.java + org/tianocore/pcd/exception/BuildActionException.java + org/tianocore/pcd/exception/EntityException.java + org/tianocore/pcd/exception/UIException.java + + diff --git a/Tools/Source/PcdTools/build.xml b/Tools/Source/PcdTools/build.xml new file mode 100644 index 0000000000..c47032e9f5 --- /dev/null +++ b/Tools/Source/PcdTools/build.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/ActionMessage.java b/Tools/Source/PcdTools/org/tianocore/pcd/action/ActionMessage.java similarity index 95% rename from Tools/Source/GenBuild/org/tianocore/build/pcd/action/ActionMessage.java rename to Tools/Source/PcdTools/org/tianocore/pcd/action/ActionMessage.java index d993fab6ec..2b589e571a 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/ActionMessage.java +++ b/Tools/Source/PcdTools/org/tianocore/pcd/action/ActionMessage.java @@ -14,10 +14,9 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.build.pcd.action; +package org.tianocore.pcd.action; import org.apache.tools.ant.Task; -import org.tianocore.build.pcd.action.BuildAction; /** ActionMessage class take over all message for loging and waning. This class should dispatch message into different Action class according to instance diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/BuildAction.java b/Tools/Source/PcdTools/org/tianocore/pcd/action/BuildAction.java similarity index 89% rename from Tools/Source/GenBuild/org/tianocore/build/pcd/action/BuildAction.java rename to Tools/Source/PcdTools/org/tianocore/pcd/action/BuildAction.java index 3614547e8d..98068d97b9 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/BuildAction.java +++ b/Tools/Source/PcdTools/org/tianocore/pcd/action/BuildAction.java @@ -14,16 +14,16 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.build.pcd.action; +package org.tianocore.pcd.action; import org.apache.tools.ant.Task; import org.apache.tools.ant.Project; -import org.tianocore.build.pcd.exception.BuildActionException; +import org.tianocore.pcd.exception.BuildActionException; /** BuildAction is the parent class for all action related to ant Task. This class will define some common utility functionality, such as logMsg, warningMsg..etc. **/ -abstract class BuildAction extends Task { +public abstract class BuildAction extends Task { /// /// Original message level before this action. This value will /// be restored when quit this action. @@ -35,14 +35,14 @@ abstract class BuildAction extends Task { This function will be overrided by child class. **/ - abstract void checkParameter() throws BuildActionException; + public abstract void checkParameter() throws BuildActionException; /** performAction is to execute the detail action. This function will be overrided by child class. **/ - abstract void performAction() throws BuildActionException; + public abstract void performAction() throws BuildActionException; /** setMessageLevel function set current message for task instance object. diff --git a/Tools/Source/PcdTools/org/tianocore/pcd/entity/CommonDefinition.java b/Tools/Source/PcdTools/org/tianocore/pcd/entity/CommonDefinition.java new file mode 100644 index 0000000000..c16bb04f10 --- /dev/null +++ b/Tools/Source/PcdTools/org/tianocore/pcd/entity/CommonDefinition.java @@ -0,0 +1,354 @@ +/** @file + CommonDefinition class. + + This class is to define some common marcos and funcions, which used by AutoGen. + + Copyright (c) 2006, Intel Corporation + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + **/ +package org.tianocore.pcd.entity; + +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.Set; + +/** + CommonDefinition + + This class is to define some common marcos, which used by AutoGen. + +**/ +public class CommonDefinition { + public final static String spdSuffix = ".spd"; + public final static String mbdSuffix = ".mbd"; + public final static String msaSuffix = ".msa"; + public final static String LibraryStr = "LIBRARY"; + public final static String autoGenHbegin = "extern int __make_me_compile_correctly;\r\n"; + public final static String include = "#include"; + public final static String autoGenCLine1 = "\r\n"; + + public final static String autoGenCLine2 = "const UINT8 _gDebugPropertyMask " + + "= DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED" + + " | DEBUG_PROPERTY_DEBUG_PRINT_ENABLED" + + " | DEBUG_PROPERTY_DEBUG_CODE_ENABLED;\r\n"; + + public final static String autoGenCLine3 = "const UINTN _gModuleDefaultErrorLevel" + + " = EFI_D_ERROR | EFI_D_LOAD;\r\n"; + + public final static String autoGenHLine1 = "#define EFI_SPECIFICATION_VERSION 0x00020000\r\n"; + public final static String autoGenHVersionDefault = "#define EFI_SPECIFICATION_VERSION 0x00000000\r\n"; + public final static String autoGenHLine2 = "#define EDK_RELEASE_VERSION 0x00090000\r\n"; + public final static String autoGenHReleaseDefault = "#define EDK_RELEASE_VERSION 0x00000000\r\n"; + + public final static String includeAutogenH = "#include \r\n" ; + public final static String marcDefineStr = "#define "; + + public final static String gEfi = "gEfi"; + public final static String protocolGuid = "ProtocolGuid"; + public final static String ppiGuid = "PpiGuid"; + public final static String guidGuid = "Guid"; + + public final static String tianoR8FlashMapH = "TianoR8FlashMap.h"; + public final static String flashMapH = "FlashMap.h"; + + // + // AutoGen.h and AutoGen.c file's header + // + public final static String autogenHNotation = + "/**\r\n" + + " DO NOT EDIT\r\n" + + " FILE auto-generated by GenBuild tasks\r\n" + + " Module name:\r\n" + + " AutoGen.h\r\n" + + " Abstract:" + + " Auto-generated AutoGen.h for building module or library.\r\n" + + "**/\r\n\r\n"; + + public final static String autogenCNotation = + "/**\r\n" + + " DO NOT EDIT\r\n" + + " FILE auto-generated by GenBuild tasks\r\n" + + " Module name:\r\n" + + " AutoGen.c\r\n" + + " Abstract:" + + " Auto-generated AutoGen.c for building module or library.\r\n" + + "**/\r\n\r\n"; + + // + // module type + // + public final static int ModuleTypeBase = 0; + public final static int ModuleTypeSec = 1; + public final static int ModuleTypePeiCore = 2; + public final static int ModuleTypePeim = 3; + public final static int ModuleTypeDxeCore = 4; + public final static int ModuleTypeDxeDriver = 5; + public final static int ModuleTypeDxeRuntimeDriver = 6; + public final static int ModuleTypeDxeSmmDriver = 7; + public final static int ModuleTypeDxeSalDriver = 8; + public final static int ModuleTypeUefiDriver = 9; + public final static int ModuleTypeUefiApplication = 10; + public final static int ModuleTypeUnknown = 11; + + + // + // component type + // + public final static int ComponentTypeNull = 0; + public final static int ComponentTypeApriori = 1; + public final static int ComponentTypeSec = 2; + public final static int ComponentTypeLibrary = 3; + public final static int ComponentTypeFvImageFile = 4; + public final static int ComponentTypeBsDriver = 5; + public final static int ComponentTypeRtDriver = 6; + public final static int ComponentTypeSalRtDriver =7; + public final static int ComponentTypePe32Peim = 8; + public final static int ComponentTypePicPeim =9; + public final static int ComponentTypeCombinedPeimDriver =10; + public final static int ComponentTypePeiCore = 11; + public final static int ComponentTypeDxeCore = 12; + public final static int ComponentTypeApplication = 13; + public final static int ComponentTypeBsDriverEfi = 14; + public final static int ComponentTypeShellApp = 15; + public final static int ComponentTypeBinary =16; + public final static int ComponentTypeLogo = 17; + public final static int ComponentTypeCustomBuild = 18; + public final static int ComponentTypeUnknown = 19; + + + // + // Usaged style + // + public final static String AlwaysConsumed = "ALWAYS_CONSUMED"; + public final static String AlwaysProduced = "ALWAYS_PRODUCED"; + + + public static class MyEnum { + String moduleTypeStr; + int type; + + MyEnum (String str, int type) { + this.type = type; + this.moduleTypeStr = str; + } + + int ForInt(String str) { + if (str.equals(this.moduleTypeStr)) { + return this.type; + } else + return -1; + } + } + + // + // Module type + // + public static final MyEnum[] moduleEnum = new MyEnum[] { + new MyEnum("BASE", ModuleTypeBase), + new MyEnum("SEC", ModuleTypeSec), + new MyEnum("PEI_CORE", ModuleTypePeiCore), + new MyEnum("PEIM", ModuleTypePeim), + new MyEnum("DXE_CORE", ModuleTypeDxeCore), + new MyEnum("DXE_DRIVER", ModuleTypeDxeDriver), + new MyEnum("DXE_RUNTIME_DRIVER", ModuleTypeDxeRuntimeDriver), + new MyEnum("DXE_SAL_DRIVER", ModuleTypeDxeSalDriver), + new MyEnum("DXE_SMM_DRIVER", ModuleTypeDxeSmmDriver), + new MyEnum("UEFI_DRIVER", ModuleTypeUefiDriver), + new MyEnum("UEFI_APPLICATION", ModuleTypeUefiApplication) }; + + // + // Component type + // + public static final MyEnum[] componentEnum = new MyEnum[]{ + new MyEnum("APRIORI", ComponentTypeApriori), + new MyEnum("SEC", ComponentTypeSec), + new MyEnum("LIBRARY", ComponentTypeLibrary), + new MyEnum("FV_IMAGE_FILE", ComponentTypeFvImageFile), + new MyEnum("BS_DRIVER", ComponentTypeBsDriver), + new MyEnum("RT_DRIVER", ComponentTypeRtDriver), + new MyEnum("SAL_RT_DRIVER", ComponentTypeSalRtDriver), + new MyEnum("PE32_PEIM", ComponentTypePe32Peim), + new MyEnum("PIC_PEIM", ComponentTypePicPeim), + new MyEnum("COMBINED_PEIM_DRIVER", ComponentTypeCombinedPeimDriver), + new MyEnum("PEI_CORE", ComponentTypePeiCore), + new MyEnum("DXE_CORE", ComponentTypeDxeCore), + new MyEnum("APPLICATION", ComponentTypeApplication), + new MyEnum("BS_DRIVER_EFI", ComponentTypeBsDriverEfi), + new MyEnum("SHELLAPP", ComponentTypeShellApp), + new MyEnum("BINARY", ComponentTypeBinary), + new MyEnum("LOGO", ComponentTypeLogo), + new MyEnum("CUSTOM_BUILD", ComponentTypeCustomBuild) + }; + + /** + getModuleType + + This function get the module type value according module type string. + + @param moduleTypeStr String of modlue type. + @return + **/ + static public int getModuleType(String moduleTypeStr) { + int returnValue = -1; + for (int i = 0; i < CommonDefinition.moduleEnum.length; i++) { + returnValue = CommonDefinition.moduleEnum[i].ForInt(moduleTypeStr); + if (returnValue != -1) { + return returnValue; + } + } + return CommonDefinition.ModuleTypeUnknown; + } + + /** + getComponentType + + This function get the component type value according commponet type + string. + + @param componentTypeStr String of component type. + @return + **/ + static public int getComponentType (String componentTypeStr){ + int returnValue = -1; + for (int i = 0; i < CommonDefinition.componentEnum.length; i++) { + returnValue = CommonDefinition.componentEnum[i].ForInt(componentTypeStr); + if (returnValue != -1) { + return returnValue; + } + } + return CommonDefinition.ComponentTypeUnknown; + } + + /** + getComponentTypeString + + This function get the commponet type string according component type value. + + @param componentType Integer value of component type. + @return + **/ + static public String getComponentTypeString (int componentType) { + if ((componentType > CommonDefinition.ComponentTypeUnknown) || + (componentType < CommonDefinition.ComponentTypeNull)) { + return null; + } + for (int index = 0; index < CommonDefinition.componentEnum.length; index ++) { + if (componentType == CommonDefinition.componentEnum[index].type) { + return CommonDefinition.componentEnum[index].moduleTypeStr; + } + } + return null; + } + + /** + isLibraryComponent + + This function is to check does componet is library according to commponet + type value. + + @param componentType Integer value of component type. + @return + **/ + static public boolean isLibraryComponent (int componentType) { + if (ComponentTypeLibrary == componentType) { + return true; + } + return false; + } + + /** + * formateGuidName + * + * This function is to formate GUID to ANSI c form. + * + * @param guidNameCon + * String of GUID. + * @return Formated GUID. + */ + public static String formatGuidName(String guidNameConv) { + String[] strList; + String guid = ""; + int index = 0; + if (guidNameConv + .matches("[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}")) { + strList = guidNameConv.split("-"); + guid = "0x" + strList[0] + ", "; + guid = guid + "0x" + strList[1] + ", "; + guid = guid + "0x" + strList[2] + ", "; + guid = guid + "{"; + guid = guid + "0x" + strList[3].substring(0, 2) + ", "; + guid = guid + "0x" + strList[3].substring(2, 4); + + while (index < strList[4].length()) { + guid = guid + ", "; + guid = guid + "0x" + strList[4].substring(index, index + 2); + index = index + 2; + } + guid = guid + "}"; + return guid; + } else if (guidNameConv + .matches("0x[a-fA-F0-9]{1,8},( )*0x[a-fA-F0-9]{1,4},( )*0x[a-fA-F0-9]{1,4}(,( )*\\{)?(,?( )*0x[a-fA-F0-9]{1,2}){8}( )*(\\})?")) { + strList = guidNameConv.split(","); + + // + // chang Microsoft specific form to ANSI c form + // + for (int i = 0; i < 3; i++) { + guid = guid + strList[i] + ","; + } + guid = guid + "{"; + + for (int i = 3; i < strList.length; i++) { + if (i == strList.length - 1) { + guid = guid + strList[i]; + } else { + guid = guid + strList[i] + ","; + } + } + guid = guid + "}"; + return guid; + } else { + System.out + .println("Check GUID Value, it don't conform to the schema!!!"); + return "0"; + + } + } + + /** + * Remove deuplicat string in list + * + * This function is to duplicat string in list + * + * @param String[] + * String list. + * @return String[] String list which remove the duplicate string. + */ + public static String[] remDupString (String[] orgList){ + Set strList = new LinkedHashSet(); + String[] desList ; + if (orgList == null){ + return new String[0]; + } + for (int i = 0; i < orgList.length; i++){ + strList.add(orgList[i]); + } + desList = new String[strList.size()]; + Iterator item = strList.iterator(); + int index = 0; + while (item.hasNext()){ + desList[index] = (String)item.next(); + index++; + } + return desList; + } + +} \ No newline at end of file diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/DynamicTokenValue.java b/Tools/Source/PcdTools/org/tianocore/pcd/entity/DynamicTokenValue.java similarity index 94% rename from Tools/Source/GenBuild/org/tianocore/build/pcd/entity/DynamicTokenValue.java rename to Tools/Source/PcdTools/org/tianocore/pcd/entity/DynamicTokenValue.java index 533bd51920..e8fb8e837d 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/DynamicTokenValue.java +++ b/Tools/Source/PcdTools/org/tianocore/pcd/entity/DynamicTokenValue.java @@ -13,12 +13,12 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.build.pcd.entity; +package org.tianocore.pcd.entity; import java.util.List; import java.util.UUID; -import org.tianocore.build.pcd.exception.EntityException; +import org.tianocore.pcd.exception.EntityException; /** This class is to descript a value type of dynamic PCD. For a dynamic or dynamicEx type PCD data, the value type can be: diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/MemoryDatabaseManager.java b/Tools/Source/PcdTools/org/tianocore/pcd/entity/MemoryDatabaseManager.java similarity index 93% rename from Tools/Source/GenBuild/org/tianocore/build/pcd/entity/MemoryDatabaseManager.java rename to Tools/Source/PcdTools/org/tianocore/pcd/entity/MemoryDatabaseManager.java index 636be3adaf..7a87469967 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/MemoryDatabaseManager.java +++ b/Tools/Source/PcdTools/org/tianocore/pcd/entity/MemoryDatabaseManager.java @@ -13,7 +13,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.build.pcd.entity; +package org.tianocore.pcd.entity; import java.util.ArrayList; import java.util.HashMap; @@ -21,8 +21,8 @@ import java.util.List; import java.util.Map; import java.util.UUID; -import org.tianocore.build.id.ModuleIdentification; -import org.tianocore.build.pcd.exception.EntityException; +import org.tianocore.pcd.entity.UsageIdentification; +import org.tianocore.pcd.exception.EntityException; /** Database hold all PCD information comes from SPD, MSA, FPD file in memory. **/ @@ -224,15 +224,13 @@ public class MemoryDatabaseManager { Get all PCD record for a module according to module's name, module's GUID, package name, package GUID, arch, version information. - @param moduleId the id of module. - @param arch the architecture + @param usageId the id of UsageInstance. @return all usage instance for this module in memory database. **/ - public List getUsageInstanceArrayByModuleName(ModuleIdentification moduleId, - String arch) { + public List getUsageInstanceArrayByModuleName(UsageIdentification usageId) { - String primaryKey = UsageInstance.getPrimaryKey(moduleId, arch); + String primaryKey = UsageInstance.getPrimaryKey(usageId); return getUsageInstanceArrayByKeyString(primaryKey); } diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/SkuInstance.java b/Tools/Source/PcdTools/org/tianocore/pcd/entity/SkuInstance.java similarity index 93% rename from Tools/Source/GenBuild/org/tianocore/build/pcd/entity/SkuInstance.java rename to Tools/Source/PcdTools/org/tianocore/pcd/entity/SkuInstance.java index 6df155157c..181e321b0a 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/SkuInstance.java +++ b/Tools/Source/PcdTools/org/tianocore/pcd/entity/SkuInstance.java @@ -13,7 +13,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.build.pcd.entity; +package org.tianocore.pcd.entity; /** Sku instance contains ID and value, A pcd token maybe contains more than one Sku instance. **/ diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/Token.java b/Tools/Source/PcdTools/org/tianocore/pcd/entity/Token.java similarity index 94% rename from Tools/Source/GenBuild/org/tianocore/build/pcd/entity/Token.java rename to Tools/Source/PcdTools/org/tianocore/pcd/entity/Token.java index 20b4f4e01a..2e2a297aa0 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/Token.java +++ b/Tools/Source/PcdTools/org/tianocore/pcd/entity/Token.java @@ -13,7 +13,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.build.pcd.entity; +package org.tianocore.pcd.entity; import java.math.BigInteger; import java.util.ArrayList; @@ -22,8 +22,8 @@ import java.util.List; import java.util.Map; import java.util.UUID; -import org.tianocore.build.id.ModuleIdentification; -import org.tianocore.build.pcd.exception.EntityException; +import org.tianocore.pcd.entity.UsageIdentification; +import org.tianocore.pcd.exception.EntityException; /** This class is to descript a PCD token object. The information of a token mainly comes from MSA, SPD and setting produced by platform developer. @@ -118,8 +118,6 @@ public class Token { @param tokenSpaceName The name of token space, it is a guid string **/ public Token(String cName, String tokenSpaceName) { - UUID nullUUID = new UUID(0, 0); - this.cName = cName; this.tokenSpaceName = tokenSpaceName; this.tokenNumber = 0; @@ -283,12 +281,12 @@ public class Token { public boolean addUsageInstance(UsageInstance usageInstance) throws EntityException { String exceptionStr; - if (isUsageInstanceExist(usageInstance.moduleId, usageInstance.arch)) { + if (isUsageInstanceExist(usageInstance.usageId)) { exceptionStr = String.format("[PCD Collection Tool Exception] PCD %s for module %s has already exist in database, Please check all PCD build entries "+ "in modules %s in to make sure no duplicated definitions in FPD file!", usageInstance.parentToken.cName, - usageInstance.moduleId.getName(), - usageInstance.moduleId.getName()); + usageInstance.usageId.moduleName, + usageInstance.usageId.moduleName); throw new EntityException(exceptionStr); } @@ -303,14 +301,12 @@ public class Token { /** Judge whether exist an usage instance for this token - @param moduleId The module identification for usage instance - @param arch the architecture string + @param usageId The UsageInstance identification for usage instance @return boolean whether exist an usage instance for this token. */ - public boolean isUsageInstanceExist(ModuleIdentification moduleId, - String arch) { - String keyStr = UsageInstance.getPrimaryKey(moduleId, arch); + public boolean isUsageInstanceExist(UsageIdentification usageId) { + String keyStr = UsageInstance.getPrimaryKey(usageId); return (consumers.get(keyStr) != null); } diff --git a/Tools/Source/PcdTools/org/tianocore/pcd/entity/UsageIdentification.java b/Tools/Source/PcdTools/org/tianocore/pcd/entity/UsageIdentification.java new file mode 100644 index 0000000000..0f52b22d78 --- /dev/null +++ b/Tools/Source/PcdTools/org/tianocore/pcd/entity/UsageIdentification.java @@ -0,0 +1,97 @@ +/** @file + UsageIdentification class. + + This class an identification for a PCD UsageInstance. + +Copyright (c) 2006, Intel Corporation +All rights reserved. This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +package org.tianocore.pcd.entity; + +/** + +**/ +public class UsageIdentification { + /// + /// The module CName: one key of Identification + /// + public String moduleName; + /// + /// The module Guid String: one key of Identification + /// + public String moduleGuid; + /// + /// The package CName: one key of Identification + /// + public String packageName; + /// + /// The package Guid: one key of Identification + /// + public String packageGuid; + /// + /// Module's Arch: one key of Identification + /// + public String arch; + /// + /// Module's version: one key of Identification + /// + public String version; + /// + /// Module's type + /// + public String moduleType; + + /** + Constructor function for UsageIdentification class. + + @param moduleName The key of module's name + @param moduleGuid The key of module's GUID string + @param packageName The key of package's name + @param packageGuid The key of package's Guid + @param arch The architecture string + @param version The version String + @param moduleType The module type + **/ + public UsageIdentification (String moduleName, + String moduleGuid, + String packageName, + String packageGuid, + String arch, + String version, + String moduleType) { + this.moduleName = moduleName; + this.moduleGuid = moduleGuid; + this.packageName = packageName; + this.packageGuid = packageGuid; + this.arch = arch; + this.version = version; + this.moduleType = moduleType; + } + + /** + Generate the string for UsageIdentification + + @return the string value for UsageIdentification + **/ + public String toString() { + // + // Because currently transition schema not require write moduleGuid, package Name, Packge GUID in + // section, So currently no expect all paramter must be valid. + // BUGBUG: Because currently we can not get version from MSA, So ignore verison. + // + return(moduleName + "_" + + ((moduleGuid != null) ? moduleGuid.toLowerCase() : "NullModuleGuid") + "_" + + ((packageName != null) ? packageName : "NullPackageName") + "_" + + ((packageGuid != null) ? packageGuid.toLowerCase() : "NullPackageGuid") + "_" + + ((arch != null) ? arch : "NullArch") + "_" + + "NullVersion"); + } +} diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java b/Tools/Source/PcdTools/org/tianocore/pcd/entity/UsageInstance.java similarity index 88% rename from Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java rename to Tools/Source/PcdTools/org/tianocore/pcd/entity/UsageInstance.java index 2f7d5ae523..a961d8807d 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java +++ b/Tools/Source/PcdTools/org/tianocore/pcd/entity/UsageInstance.java @@ -15,15 +15,15 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.build.pcd.entity; +package org.tianocore.pcd.entity; import java.util.UUID; import org.tianocore.ModuleTypeDef; -import org.tianocore.build.autogen.CommonDefinition; -import org.tianocore.build.id.ModuleIdentification; -import org.tianocore.build.pcd.exception.EntityException; +import org.tianocore.pcd.entity.CommonDefinition; +import org.tianocore.pcd.entity.UsageIdentification; +import org.tianocore.pcd.exception.EntityException; /** This class indicate an usage instance for a PCD token. This instance maybe a module @@ -39,7 +39,7 @@ public class UsageInstance { /// /// ModuleIdentification for Usage Instance /// - public ModuleIdentification moduleId; + public UsageIdentification usageId; /// /// Arch also is a key for a UsageInstance @@ -84,15 +84,13 @@ public class UsageInstance { instance. **/ public UsageInstance(Token parentToken, - ModuleIdentification moduleId, + UsageIdentification usageId, Token.PCD_TYPE modulePcdType, - String arch, String value, int maxDatumSize) { this.parentToken = parentToken; - this.moduleId = moduleId; + this.usageId = usageId; this.modulePcdType = modulePcdType; - this.arch = arch; this.datum = value; this.maxDatumSize = maxDatumSize; } @@ -100,30 +98,12 @@ public class UsageInstance { /** Get the primary key for usage instance array for every token. - @param moduleId The module Identification for generating primary key - @param arch Arch string + @param usageId The identification of UsageInstance @retval String The primary key for this usage instance **/ - public static String getPrimaryKey(ModuleIdentification moduleId, - String arch) { - String moduleName = moduleId.getName(); - String moduleGuid = moduleId.getGuid(); - String packageName = moduleId.getPackage().getName(); - String packageGuid = moduleId.getPackage().getGuid(); - String version = moduleId.getVersion(); - - // - // Because currently transition schema not require write moduleGuid, package Name, Packge GUID in - // section, So currently no expect all paramter must be valid. - // BUGBUG: Because currently we can not get version from MSA, So ignore verison. - // - return(moduleName + "_" + - ((moduleGuid != null) ? moduleGuid.toLowerCase() : "NullModuleGuid") + "_" + - ((packageName != null) ? packageName : "NullPackageName") + "_" + - ((packageGuid != null) ? packageGuid.toLowerCase() : "NullPackageGuid") + "_" + - ((arch != null) ? arch : "NullArch") + "_" + - "NullVersion"); + public static String getPrimaryKey(UsageIdentification usageId) { + return usageId.toString(); } /** @@ -132,7 +112,7 @@ public class UsageInstance { @return String primary key string **/ public String getPrimaryKey() { - return UsageInstance.getPrimaryKey(moduleId, arch); + return UsageInstance.getPrimaryKey(usageId); } /** @@ -141,7 +121,7 @@ public class UsageInstance { @return boolean whether current module is PEI driver **/ public boolean isPeiPhaseComponent() { - int moduleType = CommonDefinition.getModuleType(moduleId.getModuleType()); + int moduleType = CommonDefinition.getModuleType(usageId.moduleType); if ((moduleType == CommonDefinition.ModuleTypePeiCore) || (moduleType == CommonDefinition.ModuleTypePeim)) { @@ -156,7 +136,7 @@ public class UsageInstance { @return boolean whether current module is DXE driver **/ public boolean isDxePhaseComponent() { - int moduleType = CommonDefinition.getModuleType(moduleId.getModuleType()); + int moduleType = CommonDefinition.getModuleType(usageId.moduleType); if ((moduleType == CommonDefinition.ModuleTypeDxeDriver) || (moduleType == CommonDefinition.ModuleTypeDxeRuntimeDriver) || diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/exception/BuildActionException.java b/Tools/Source/PcdTools/org/tianocore/pcd/exception/BuildActionException.java similarity index 92% rename from Tools/Source/GenBuild/org/tianocore/build/pcd/exception/BuildActionException.java rename to Tools/Source/PcdTools/org/tianocore/pcd/exception/BuildActionException.java index 357ebf017a..9cd4e63fef 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/exception/BuildActionException.java +++ b/Tools/Source/PcdTools/org/tianocore/pcd/exception/BuildActionException.java @@ -13,7 +13,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.build.pcd.exception; +package org.tianocore.pcd.exception; import org.apache.tools.ant.BuildException; diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/exception/EntityException.java b/Tools/Source/PcdTools/org/tianocore/pcd/exception/EntityException.java similarity index 92% rename from Tools/Source/GenBuild/org/tianocore/build/pcd/exception/EntityException.java rename to Tools/Source/PcdTools/org/tianocore/pcd/exception/EntityException.java index 070c2db5d7..ca25810855 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/exception/EntityException.java +++ b/Tools/Source/PcdTools/org/tianocore/pcd/exception/EntityException.java @@ -13,7 +13,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.build.pcd.exception; +package org.tianocore.pcd.exception; /** The class handle the exception throwed by entity class. diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/exception/UIException.java b/Tools/Source/PcdTools/org/tianocore/pcd/exception/UIException.java similarity index 92% rename from Tools/Source/GenBuild/org/tianocore/build/pcd/exception/UIException.java rename to Tools/Source/PcdTools/org/tianocore/pcd/exception/UIException.java index 96575a1450..377a8a4b1d 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/exception/UIException.java +++ b/Tools/Source/PcdTools/org/tianocore/pcd/exception/UIException.java @@ -13,7 +13,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -package org.tianocore.build.pcd.exception; +package org.tianocore.pcd.exception; /** The class handle the exception throwed by UI action class. diff --git a/Tools/Tools.spd b/Tools/Tools.spd index c9bb0f3bab..ed78d1be8b 100644 --- a/Tools/Tools.spd +++ b/Tools/Tools.spd @@ -44,6 +44,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ToolResources.msa JavaResources.msa Source/Common/Common.msa + Source/PcdTools/PcdTools.msa Source/Cpptasks/CppTasks.msa Source/FrameworkTasks/FrameworkTasks.msa Source/FrameworkWizard/FrameworkWizard.msa diff --git a/Tools/build.xml b/Tools/build.xml index 1afe6edb0c..305dad848c 100644 --- a/Tools/build.xml +++ b/Tools/build.xml @@ -31,6 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -95,6 +97,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Source/Cpptasks/build.xml Source/FrameworkTasks/build.xml Source/GenBuild/build.xml + Source/PcdTools/build.xml Source/Common/build.xml Source/SurfaceArea/build.xml "/> diff --git a/edksetup.bat b/edksetup.bat index 4a5abcc586..90e92e6a76 100644 --- a/edksetup.bat +++ b/edksetup.bat @@ -172,6 +172,7 @@ call ant -f %WORKSPACE%\Tools\build.xml JavaCode @REM using the cpp-tasks to create our tools @REM set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\Common.jar +set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\PcdTools.jar set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\GenBuild.jar set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\cpptasks.jar set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\frameworktasks.jar @@ -235,6 +236,7 @@ set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\resolver.jar set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\SurfaceArea.jar set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\Common.jar +set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\PcdTools.jar set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\GenBuild.jar set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\cpptasks.jar set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\frameworktasks.jar diff --git a/edksetup.sh b/edksetup.sh index 0c0265a378..08e62bc877 100644 --- a/edksetup.sh +++ b/edksetup.sh @@ -30,7 +30,7 @@ then else # These should be ok as they are. -export CLASSPATH=$WORKSPACE/Tools/Jars/SurfaceArea.jar:$WORKSPACE/Tools/Jars/frameworktasks.jar:$WORKSPACE/Tools/Jars/cpptasks.jar:$WORKSPACE/Tools/Jars/GenBuild.jar:$XMLBEANS_HOME/lib/resolver.jar:$XMLBEANS_HOME/lib/xbean.jar:$XMLBEANS_HOME/lib/xmlpublic.jar:$XMLBEANS_HOME/lib/jsr173_1.0_api.jar:$XMLBEANS_HOME/lib/saxon8.jar:$XMLBEANS_HOME/lib/xbean_xpath.jar +export CLASSPATH=$WORKSPACE/Tools/Jars/SurfaceArea.jar:$WORKSPACE/Tools/Jars/frameworktasks.jar:$WORKSPACE/Tools/Jars/cpptasks.jar:$WORKSPACE/Tools/Jars/PcdTools.jar:$WORKSPACE/Tools/Jars/GenBuild.jar:$XMLBEANS_HOME/lib/resolver.jar:$XMLBEANS_HOME/lib/xbean.jar:$XMLBEANS_HOME/lib/xmlpublic.jar:$XMLBEANS_HOME/lib/jsr173_1.0_api.jar:$XMLBEANS_HOME/lib/saxon8.jar:$XMLBEANS_HOME/lib/xbean_xpath.jar export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Jars/Common.jar export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Bin/FrameworkWizard.jar export FRAMEWORK_TOOLS_PATH=$WORKSPACE/Tools/bin @@ -54,6 +54,7 @@ if [ \ "$1" = Rebuild -o \ "$1" = ForceRebuild -o \ ! -e "$WORKSPACE/Tools/Jars/Common.jar" -o \ + ! -e "$WORKSPACE/Tools/Jars/PcdTools.jar" -o \ ! -e "$WORKSPACE/Tools/Jars/GenBuild.jar" -o \ ! -e "$WORKSPACE/Tools/Jars/SurfaceArea.jar" -o \ ! -e "$WORKSPACE/Tools/Jars/cpptasks.jar" -o \ -- 2.39.2