BaseTools/Scripts: Porting PackageDocumentTools code to use Python3

Porting PackageDocumentTools code to Python3
DoxyGen 1.8.6
wxpython 4.0.3

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yunhua Feng
2018-08-28 17:00:24 +08:00
committed by Yonghong Zhu
parent c9486c8c9d
commit 9d7e1e56a7
12 changed files with 62 additions and 67 deletions

View File

@ -12,12 +12,11 @@
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
from __future__ import print_function
import os, sys, logging, traceback, subprocess
from optparse import OptionParser
import plugins.EdkPlugins.edk2.model.baseobject as baseobject
import plugins.EdkPlugins.edk2.model.doxygengen as doxygengen
from .plugins.EdkPlugins.edk2.model import baseobject
from .plugins.EdkPlugins.edk2.model import doxygengen
gArchMarcoDict = {'ALL' : 'MDE_CPU_IA32 MDE_CPU_X64 MDE_CPU_EBC MDE_CPU_IPF _MSC_EXTENSIONS __GNUC__ __INTEL_COMPILER',
'IA32_MSFT': 'MDE_CPU_IA32 _MSC_EXTENSIONS',
@ -38,7 +37,7 @@ def parseCmdArgs():
help='Specify the absolute path of doxygen tools installation. For example: C:\\Program Files\\doxygen\bin\doxygen.exe')
parser.add_option('-o', '--output', action='store', dest='OutputPath',
help='Specify the document output path. For example: c:\\docoutput')
parser.add_option('-a', '--arch', action='store', dest='Arch', choices=gArchMarcoDict.keys(),
parser.add_option('-a', '--arch', action='store', dest='Arch', choices=list(gArchMarcoDict.keys()),
help='Specify the architecture used in preprocess package\'s source. For example: -a IA32_MSFT')
parser.add_option('-m', '--mode', action='store', dest='DocumentMode', choices=['CHM', 'HTML'],
help='Specify the document mode from : CHM or HTML')