BaseTools: Allow decimal values in the EDK II meta-data file
Because the EDK II meta-data specifications already allow using decimal values in the EDK II Meta-data file [Defines] section, this patch update code to allow this usage. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18746 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1955,7 +1955,13 @@ class InfBuildData(ModuleBuildClassObject):
|
||||
RecordList = self._RawData[MODEL_META_DATA_HEADER, self._Arch, self._Platform]
|
||||
for Record in RecordList:
|
||||
if Record[1] == TAB_INF_DEFINES_INF_VERSION:
|
||||
self._AutoGenVersion = int(Record[2], 0)
|
||||
if '.' in Record[2]:
|
||||
ValueList = Record[2].split('.')
|
||||
Major = '%04o' % int(ValueList[0], 0)
|
||||
Minor = '%04o' % int(ValueList[1], 0)
|
||||
self._AutoGenVersion = int('0x' + Major + Minor, 0)
|
||||
else:
|
||||
self._AutoGenVersion = int(Record[2], 0)
|
||||
break
|
||||
if self._AutoGenVersion == None:
|
||||
self._AutoGenVersion = 0x00010000
|
||||
|
Reference in New Issue
Block a user