Ejemplo n.º 1
0
 def __init__(self, FileName, WorkSpace=None, PackagePath='', Skip=False):
     ModuleObject.__init__(self)
     self.Parser = None
     self.FileName = FileName
     self.WorkSpace = WorkSpace
     self.CombinePath = ''
     self.LibModuleTypeList = []
     self.FullPath = ''
     self.ModulePath = ''
     self.WorkspaceDir = " "
     self.CustomMakefile = []
     self.UniFileClassObject = None
     self.SetPackagePath(PackagePath)
     #
     # Call GenInfPomObjects function to fill POM object.
     #
     if Skip:
         OrigConfig = Logger.SUPRESS_ERROR
         Logger.SUPRESS_ERROR = True
         try:
             self._GenInfPomObjects(Skip)
         finally:
             Logger.SUPRESS_ERROR = OrigConfig
     else:
         self._GenInfPomObjects(Skip)
Ejemplo n.º 2
0
 def __init__(self, FileName, WorkSpace=None, PackagePath='', Skip=False):
     ModuleObject.__init__(self)
     self.Parser = None
     self.FileName = FileName
     self.WorkSpace = WorkSpace
     self.CombinePath = ''
     self.LibModuleTypeList = []
     self.FullPath = ''
     self.ModulePath = ''
     self.WorkspaceDir = " "
     self.CustomMakefile = []
     self.UniFileClassObject = None
     self.SetPackagePath(PackagePath)
     #
     # Call GenInfPomObjects function to fill POM object.
     #
     if Skip:
         OrigConfig = Logger.SUPRESS_ERROR
         Logger.SUPRESS_ERROR = True
         try:
             self._GenInfPomObjects(Skip)
         finally:
             Logger.SUPRESS_ERROR = OrigConfig
     else:
         self._GenInfPomObjects(Skip)
Ejemplo n.º 3
0
    def FromXml(self, Item, Key, IsRequiredCheck=False, IsStandAlongModule=False):
        if not Item and IsRequiredCheck:
            XmlTreeLevel = []
            if IsStandAlongModule:
                XmlTreeLevel = ['DistributionPackage', 'ModuleSurfaceArea']
            else:
                XmlTreeLevel = ['DistributionPackage', 'PackageSurfaceArea', 'ModuleSurfaceArea']
            CheckDict = {'Header':''}
            IsRequiredItemListNull(CheckDict, XmlTreeLevel)
        self.Name = XmlElement(Item, '%s/Name' % Key)
        self.BaseName = XmlAttribute(XmlNode(Item, '%s/Name' % Key), 'BaseName')
        self.GUID = XmlElement(Item, '%s/GUID' % Key)
        self.Version = XmlAttribute(XmlNode(Item, '%s/GUID' % Key), 'Version')
        self.Copyright = XmlElement(Item, '%s/Copyright' % Key)
        self.License = XmlElement(Item, '%s/License' % Key)
        self.Abstract = XmlElement(Item, '%s/Abstract' % Key)
        self.Description = XmlElement(Item, '%s/Description' % Key)

        ModuleHeader = ModuleObject()
        ModuleHeader.SetName(self.Name)
        ModuleHeader.SetBaseName(self.BaseName)
        ModuleHeader.SetGuid(self.GUID)
        ModuleHeader.SetVersion(self.Version)
        ModuleHeader.SetCopyright(self.Copyright)
        ModuleHeader.SetLicense(self.License)
        ModuleHeader.SetAbstract(self.Abstract)
        ModuleHeader.SetDescription(self.Description)

        return ModuleHeader
Ejemplo n.º 4
0
    def FromXml(self, Item, Key, Header=None):
        self.CommonDefines.FromXml(Item, Key)
        self.ModuleType = XmlElement(Item, '%s/ModuleType' % Key)
        self.Path = XmlElement(Item, '%s/Path' % Key)
        self.PcdIsDriver = XmlElement(Item, '%s/PcdIsDriver' % Key)
        self.UefiSpecificationVersion = XmlElement(
            Item, '%s/UefiSpecificationVersion' % Key)
        self.PiSpecificationVersion = XmlElement(
            Item, '%s/PiSpecificationVersion' % Key)
        for SubItem in XmlList(Item, '%s/Specification' % Key):
            Specification = XmlElement(SubItem, '/Specification')
            Version = XmlAttribute(XmlNode(SubItem, '/Specification'),
                                   'Version')
            self.SpecificationList.append((Specification, Version))
        for SubItem in XmlList(Item, '%s/BootMode' % Key):
            Axml = BootModeXml()
            BootMode = Axml.FromXml(SubItem, 'BootMode')
            self.BootModes.append(BootMode)
        for SubItem in XmlList(Item, '%s/Event' % Key):
            Axml = EventXml()
            Event = Axml.FromXml(SubItem, 'Event')
            self.Events.append(Event)
        for SubItem in XmlList(Item, '%s/HOB' % Key):
            Axml = HobXml()
            Hob = Axml.FromXml(SubItem, 'HOB')
            self.HOBs.append(Hob)

        if Header == None:
            Header = ModuleObject()

        Header.SetModuleType(self.ModuleType)
        Header.SetSupArchList(self.CommonDefines.SupArchList)
        Header.SetModulePath(self.Path)

        Header.SetPcdIsDriver(self.PcdIsDriver)
        Header.SetUefiSpecificationVersion(self.UefiSpecificationVersion)
        Header.SetPiSpecificationVersion(self.PiSpecificationVersion)
        Header.SetSpecList(self.SpecificationList)

        return Header, self.BootModes, self.Events, self.HOBs