From cf2b2bdef3d6b5c64b5aa528bb255db81c13d965 Mon Sep 17 00:00:00 2001 From: Hess Chen Date: Wed, 3 Sep 2014 08:25:10 +0000 Subject: BaseTools/UPT: Replace os.linesep with '\r\n' when generating UNI files. Replace os.linesep with '\r\n' when generating UNI files to make sure all files are under DOS format. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen Reviewed-by: Gao, Liming git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16041 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py') diff --git a/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py b/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py index 0daa96af25..2a11204f7d 100644 --- a/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py +++ b/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py @@ -230,22 +230,22 @@ def GenModuleUNIEncodeFile(ModuleObject, UniFileHeader='', Encoding=DT.TAB_ENCOD if not os.path.exists(os.path.dirname(ModuleObject.GetFullPath())): os.makedirs(os.path.dirname(ModuleObject.GetFullPath())) - Content = UniFileHeader + os.linesep - Content += DT.END_OF_LINE + Content = UniFileHeader + '\r\n' + Content += '\r\n' - Content += FormatUniEntry('#string ' + DT.TAB_INF_ABSTRACT, ModuleObject.GetAbstract(), ContainerFile) + os.linesep + Content += FormatUniEntry('#string ' + DT.TAB_INF_ABSTRACT, ModuleObject.GetAbstract(), ContainerFile) + '\r\n' Content += FormatUniEntry('#string ' + DT.TAB_INF_DESCRIPTION, ModuleObject.GetDescription(), ContainerFile) \ - + os.linesep + + '\r\n' BinaryAbstractString = FormatUniEntry('#string ' + DT.TAB_INF_BINARY_ABSTRACT, BinaryAbstract, ContainerFile) if BinaryAbstractString: - Content += BinaryAbstractString + os.linesep + Content += BinaryAbstractString + '\r\n' BinaryDescriptionString = FormatUniEntry('#string ' + DT.TAB_INF_BINARY_DESCRIPTION, BinaryDescription, \ ContainerFile) if BinaryDescriptionString: - Content += BinaryDescriptionString + os.linesep + Content += BinaryDescriptionString + '\r\n' if not os.path.exists(ContainerFile): File = codecs.open(ContainerFile, 'wb', Encoding) -- cgit v1.2.3