]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Eot/Eot.py
BaseTools: use set instead of list for a variable to be used with in
[mirror_edk2.git] / BaseTools / Source / Python / Eot / Eot.py
index 815907dfdda9dccb2f30a06b9630274da4d9dd55..96c339613476d3005eaa587e2b9bee25259935dd 100644 (file)
@@ -1,8 +1,8 @@
 ## @file\r
 # This file is used to be the main entrance of EOT tool\r
 #\r
-# Copyright (c) 2008 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
@@ -14,7 +14,7 @@
 ##\r
 # Import Modules\r
 #\r
-import os, time, glob\r
+import Common.LongFilePathOs as os, time, glob\r
 import Common.EdkLogger as EdkLogger\r
 import EotGlobalData\r
 from optparse import OptionParser\r
@@ -27,8 +27,9 @@ import Database
 from FvImage import *\r
 from array import array\r
 from Report import Report\r
-from Common.Misc import ParseConsoleLog\r
+from Common.BuildVersion import gBUILD_VERSION\r
 from Parser import ConvertGuid\r
+from Common.LongFilePathSupport import OpenLongFilePath as open\r
 \r
 ## Class Eot\r
 #\r
@@ -45,7 +46,7 @@ class Eot(object):
                  IncludeDirList=None, DecFileList=None, GuidList=None, LogFile=None,\r
                  FvFileList="", MapFileList="", Report='Report.html', Dispatch=None):\r
         # Version and Copyright\r
-        self.VersionNumber = "0.02"\r
+        self.VersionNumber = ("0.02" + " " + gBUILD_VERSION)\r
         self.Version = "%prog Version " + self.VersionNumber\r
         self.Copyright = "Copyright (c) 2008 - 2010, Intel Corporation  All rights reserved."\r
         self.Report = Report\r
@@ -338,14 +339,6 @@ class Eot(object):
             GuidMacro2 = ''\r
             GuidValue = ''\r
 \r
-            # Find value for hardcode guid macro\r
-            if GuidName in EotGlobalData.gGuidMacroDict:\r
-                GuidMacro = EotGlobalData.gGuidMacroDict[GuidName][0]\r
-                GuidValue = EotGlobalData.gGuidMacroDict[GuidName][1]\r
-                SqlCommand = """update Report set GuidMacro = '%s', GuidValue = '%s' where GuidName = '%s'""" %(GuidMacro, GuidValue, GuidName)\r
-                EotGlobalData.gDb.TblReport.Exec(SqlCommand)\r
-                continue\r
-\r
             # Find guid value defined in Dec file\r
             if GuidName in EotGlobalData.gGuidDict:\r
                 GuidValue = EotGlobalData.gGuidDict[GuidName]\r
@@ -577,11 +570,11 @@ class Eot(object):
     #  @param Option: The option list including log level setting\r
     #\r
     def SetLogLevel(self, Option):\r
-        if Option.verbose != None:\r
+        if Option.verbose is not None:\r
             EdkLogger.SetLevel(EdkLogger.VERBOSE)\r
-        elif Option.quiet != None:\r
+        elif Option.quiet is not None:\r
             EdkLogger.SetLevel(EdkLogger.QUIET)\r
-        elif Option.debug != None:\r
+        elif Option.debug is not None:\r
             EdkLogger.SetLevel(Option.debug + 1)\r
         else:\r
             EdkLogger.SetLevel(EdkLogger.INFO)\r