示例#1
0
        elif Type == TAB_PPIS:
            ListMember = self.Module.Ppis

        for Key in Lists.keys():
            ListClass = GuidProtocolPpiCommonClass()
            ListClass.CName = Key[0]
            ListClass.SupArchList = Lists[Key]
            ListClass.FeatureFlag = Key[1]
            ListMember.append(ListClass)


##
#
# This acts like the main() function for the script, unless it is 'import'ed into another
# script.
#
if __name__ == '__main__':
    EdkLogger.Initialize()
    EdkLogger.SetLevel(EdkLogger.DEBUG_0)

    W = os.getenv('WORKSPACE')
    F = os.path.join(W, 'MdeModulePkg/Application/HelloWorld/HelloWorld.inf')

    Db = Database.Database('Inf.db')
    Db.InitDatabase()

    P = Inf(os.path.normpath(F), True, True, W, Db)
    P.ShowModule()

    Db.Close()
            ListMember = self.Module.Protocols
        elif Type == TAB_PPIS:
            ListMember = self.Module.Ppis

        RecordSet = self.RecordSet[Section[Type.upper()]]
        for Record in RecordSet:
            (Name, Value) = GetGuidsProtocolsPpisOfInf(Record[0], Type, ContainerFile, Record[2])
            ListClass = GuidProtocolPpiCommonClass()
            ListClass.CName = Name
            ListClass.SupArchList = Record[1]
            ListClass.FeatureFlag = Value
            if GenerateHelpText(Record[5], ''):
                ListClass.HelpTextList.append(GenerateHelpText(Record[5], ''))
            ListMember.append(ListClass)
       
##
#
# This acts like the main() function for the script, unless it is 'import'ed into another
# script.
#
if __name__ == '__main__':
    EdkLogger.Initialize()
    EdkLogger.SetLevel(EdkLogger.QUIET)
        
    W = os.getenv('WORKSPACE')
    F = os.path.join(W, 'MdeModulePkg/Application/HelloWorld/HelloWorld.inf')
    
    P = Inf(os.path.normpath(F), True, W, 'MdeModulePkg')
    P.ShowModule()
    print P.ModuleToInf(P.Module)