BaseTools-Source: Update displayed version information
Standardize the --version and --help text command-line options Updated tools to correctly display the Build number when using command-line option --version and exit successfully after termination. Ecc was also updated to print informational messages after the options are parsed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Larry Hauch <larry.hauch@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
# file of PCD layout for use during the build when the platform integrator selects to use
|
||||
# automatic offset calculation.
|
||||
#
|
||||
# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -33,7 +33,7 @@ import StringTable as st
|
||||
import GenVpd
|
||||
|
||||
PROJECT_NAME = st.LBL_BPDG_LONG_UNI
|
||||
VERSION = (st.LBL_BPDG_VERSION + " " + gBUILD_VERSION)
|
||||
VERSION = (st.LBL_BPDG_VERSION + " Build " + gBUILD_VERSION)
|
||||
|
||||
## Tool entrance method
|
||||
#
|
||||
@@ -91,7 +91,7 @@ def MyOptionParser():
|
||||
#
|
||||
# Process command line firstly.
|
||||
#
|
||||
parser = OptionParser(version="%s - Version %s\n" % (PROJECT_NAME, VERSION),
|
||||
parser = OptionParser(version="%s - Version %s" % (PROJECT_NAME, VERSION),
|
||||
description='',
|
||||
prog='BPDG',
|
||||
usage=st.LBL_BPDG_USAGE
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# This file is used to define strings used in the BPDG tool
|
||||
#
|
||||
# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -32,7 +32,7 @@ MAP_FILE_COMMENT_TEMPLATE = \
|
||||
#
|
||||
# This file lists all VPD informations for a platform fixed/adjusted by BPDG tool.
|
||||
#
|
||||
# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2010 -2016, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -46,14 +46,14 @@ MAP_FILE_COMMENT_TEMPLATE = \
|
||||
|
||||
|
||||
LBL_BPDG_LONG_UNI = (u"Intel(r) Binary Product Data Generation Tool (Intel(r) BPDG)")
|
||||
LBL_BPDG_VERSION = (u"0.1")
|
||||
LBL_BPDG_VERSION = (u"1.0")
|
||||
LBL_BPDG_USAGE = \
|
||||
(
|
||||
"""
|
||||
BPDG options -o Filename.bin -m Filename.map Filename.txt
|
||||
Intel(r) Binary Product Data Generation Tool (Intel(r) BPDG)
|
||||
Copyright (c) 2010 Intel Corporation All Rights Reserved.
|
||||
"""BPDG options -o Filename.bin -m Filename.map Filename.txt
|
||||
Copyright (c) 2010 - 2016, Intel Corporation All Rights Reserved.
|
||||
|
||||
Intel(r) Binary Product Data Generation Tool (Intel(r) BPDG)
|
||||
|
||||
Required Flags:
|
||||
-o BIN_FILENAME, --vpd-filename=BIN_FILENAME
|
||||
Specify the file name for the VPD binary file
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# This file is used to be the main entrance of ECC tool
|
||||
#
|
||||
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -49,9 +49,9 @@ from Common.MultipleWorkspace import MultipleWorkspace as mws
|
||||
class Ecc(object):
|
||||
def __init__(self):
|
||||
# Version and Copyright
|
||||
self.VersionNumber = ("0.01" + " " + gBUILD_VERSION)
|
||||
self.VersionNumber = ("1.0" + " Build " + gBUILD_VERSION)
|
||||
self.Version = "%prog Version " + self.VersionNumber
|
||||
self.Copyright = "Copyright (c) 2009 - 2010, Intel Corporation All rights reserved."
|
||||
self.Copyright = "Copyright (c) 2009 - 2016, Intel Corporation All rights reserved."
|
||||
|
||||
self.InitDefaultConfigIni()
|
||||
self.OutputFile = 'output.txt'
|
||||
@@ -65,6 +65,7 @@ class Ecc(object):
|
||||
|
||||
# Parse the options and args
|
||||
self.ParseOption()
|
||||
EdkLogger.info(time.strftime("%H:%M:%S, %b.%d %Y ", time.localtime()) + "[00:00]" + "\n")
|
||||
|
||||
#
|
||||
# Check EFI_SOURCE (Edk build convention). EDK_SOURCE will always point to ECP
|
||||
@@ -104,7 +105,7 @@ class Ecc(object):
|
||||
GlobalData.gGlobalDefines["EDK_SOURCE"] = EdkSourceDir
|
||||
GlobalData.gGlobalDefines["ECP_SOURCE"] = EcpSourceDir
|
||||
|
||||
|
||||
EdkLogger.info("Loading ECC configuration ... done")
|
||||
# Generate checkpoints list
|
||||
EccGlobalData.gConfig = Configuration(self.ConfigFile)
|
||||
|
||||
@@ -327,7 +328,6 @@ class Ecc(object):
|
||||
# Parse options
|
||||
#
|
||||
def ParseOption(self):
|
||||
EdkLogger.quiet("Loading ECC configuration ... done")
|
||||
(Options, Target) = self.EccOptionParser()
|
||||
|
||||
if Options.Workspace:
|
||||
@@ -437,7 +437,6 @@ if __name__ == '__main__':
|
||||
# Initialize log system
|
||||
EdkLogger.Initialize()
|
||||
EdkLogger.IsRaiseError = False
|
||||
EdkLogger.quiet(time.strftime("%H:%M:%S, %b.%d %Y ", time.localtime()) + "[00:00]" + "\n")
|
||||
|
||||
StartTime = time.clock()
|
||||
Ecc = Ecc()
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# This file is used to define strings used in the UPT tool
|
||||
#
|
||||
# Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials are licensed and made available
|
||||
# under the terms and conditions of the BSD License which accompanies this
|
||||
@@ -39,10 +39,10 @@ MSG_USAGE_STRING = _("\n"
|
||||
##
|
||||
# Version and Copyright
|
||||
#
|
||||
MSG_VERSION_NUMBER = _("1.0")
|
||||
MSG_VERSION_NUMBER = _("1.1")
|
||||
MSG_VERSION = _("UEFI Packaging Tool (UEFIPT) - Revision " + \
|
||||
MSG_VERSION_NUMBER)
|
||||
MSG_COPYRIGHT = _("Copyright (c) 2011 - 2015 Intel Corporation All Rights Reserved.")
|
||||
MSG_COPYRIGHT = _("Copyright (c) 2011 - 2016 Intel Corporation All Rights Reserved.")
|
||||
MSG_VERSION_COPYRIGHT = _("\n %s\n %s" % (MSG_VERSION, MSG_COPYRIGHT))
|
||||
MSG_USAGE = _("%s [options]\n%s" % ("UPT", MSG_VERSION_COPYRIGHT))
|
||||
MSG_DESCRIPTION = _("The UEFIPT is used to create, " + \
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This file is the main entry for UPT
|
||||
#
|
||||
# Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials are licensed and made available
|
||||
# under the terms and conditions of the BSD License which accompanies this
|
||||
@@ -99,7 +99,7 @@ def SetLogLevel(Opt):
|
||||
def Main():
|
||||
Logger.Initialize()
|
||||
|
||||
Parser = OptionParser(version=(MSG_VERSION + ' ' + gBUILD_VERSION), description=MSG_DESCRIPTION,
|
||||
Parser = OptionParser(version=(MSG_VERSION + ' Build ' + gBUILD_VERSION), description=MSG_DESCRIPTION,
|
||||
prog="UPT.exe", usage=MSG_USAGE)
|
||||
|
||||
Parser.add_option("-d", "--debug", action="store", type="int", dest="debug_level", help=ST.HLP_PRINT_DEBUG_INFO)
|
||||
|
Reference in New Issue
Block a user