ShellPkg: Support finding help message embedded in resource section.

UEFI Shell scandalizes the help message in spec level so that a standalone
UEFI shell application can never get "-?" switch, instead the Shell core
(interpreter) detects the "-?" and finds .MAN file for that shell
application in certain spec defined paths, then show the help extracted
from that .MAN file.

But it means distributing a UEFI shell application not only means
distributing a .EFI file but also distributing a .MAN file. If the text
formatted .MAN file is corrupted (edited by user by mistake), or is
missing (deleted by user by mistake), no help will be shown to user.

So this patch enhance the Shell to make it support finding help message
imbedded in resource section of application image.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
Qiu Shumin
2016-02-21 15:52:53 +08:00
parent 2a09778d6f
commit 8d4eec6d97
3 changed files with 260 additions and 18 deletions

View File

@@ -2,7 +2,7 @@
# This is the shell application
#
# (C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>
# Copyright (c) 2009 - 2015, 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
@@ -70,6 +70,7 @@
HiiLib
SortLib
HandleParsingLib
UefiHiiServicesLib
[Guids]
gShellVariableGuid ## CONSUMES ## GUID
@@ -93,6 +94,7 @@
gEfiComponentName2ProtocolGuid ## CONSUMES
gEfiUnicodeCollation2ProtocolGuid ## CONSUMES
gEfiDevicePathProtocolGuid ## CONSUMES
gEfiHiiPackageListProtocolGuid ## SOMETIMES_PRODUCES
[Pcd]
gEfiShellPkgTokenSpaceGuid.PcdShellSupportLevel ## CONSUMES