GenFds Tool: Add FdfClassObject.
[people/mcb30/basetools.git] / Source / Python / GenFds / FfsInfStatement.py
index 9e09cfb..03ebd40 100644 (file)
@@ -7,19 +7,20 @@ import sys
 import Section\r
 import RuleSimpleFile\r
 import RuleComplexFile\r
-import Common.TargetTxtClassObject\r
+from CommonDataClass.FdfClassObject import FfsInfStatementClassObject\r
 \r
 #from String import *\r
 \r
-class FfsInfStatement(Ffs.Ffs):\r
+class FfsInfStatement(FfsInfStatementClassObject):\r
     def __init__(self):\r
-        Ffs.Ffs.__init__(self)\r
-        self.Rule = None\r
-        self.ver = None\r
-        self.Ui = None\r
-        self.InfFileName = None\r
-        self.BuildNum = ''\r
-        self.KeyStringList = []\r
+##        Ffs.Ffs.__init__(self)\r
+##        self.Rule = None\r
+##        self.ver = None\r
+##        self.Ui = None\r
+##        self.InfFileName = None\r
+##        self.BuildNum = ''\r
+##        self.KeyStringList = []\r
+        FfsInfStatementClassObject.__init__(self)\r
 \r
     def __infParse__(self):\r
         #\r
@@ -155,6 +156,7 @@ class FfsInfStatement(Ffs.Ffs):
         else:\r
             targetArchList = set(GenFdsGlobalVariable.WorkSpace.SupArchList) & set(targetArchList)\r
             \r
+        #activePlatform = GenFdsGlobalVariable.WorkSpace.TargetTxt.TargetTxtDictionary.get('ACTIVE_PLATFORM')[0]\r
         dscArchList = []\r
         if self.InfFileName in (GenFdsGlobalVariable.WorkSpace.Build.get('IA32').PlatformDatabase[GenFdsGlobalVariable.ActivePlatform].Modules):\r
             dscArchList.append ('IA32')\r
@@ -182,13 +184,12 @@ class FfsInfStatement(Ffs.Ffs):
             if len(ArchList) == 1:\r
                 Arch = ArchList[0]\r
             elif len(ArchList) > 1:\r
-                raise Exception("Module %s has too many bulid Arch !" %self.InfFileName)\r
+                raise Exception("Module %s has too many bulid Arch !" %self.InfFileNames)\r
             else:\r
-                raise Exception("Don't find legal Arch in Module %s !" %self.InfFileName)\r
+                raise Exception("Don't find legal Arch in Module %s !" %self.InfFileNames)\r
         elif len(curArchList) == 1 :\r
             Arch = curArchList.pop()\r
-        else:\r
-            raise Exception("Don't find legal Arch in Module %s !" %self.InfFileName)\r
+            \r
         OutputPath = os.path.join(GenFdsGlobalVariable.OuputDir,\r
                                   Arch ,\r
                                   ModulePath,\r