From 1be2ed90a20618d71ddf34b8a07d038da0b36854 Mon Sep 17 00:00:00 2001 From: Hess Chen Date: Fri, 15 Aug 2014 03:06:48 +0000 Subject: =?UTF-8?q?There=20is=20a=20limitation=20on=20WINDOWS=20OS=20for?= =?UTF-8?q?=20the=20length=20of=20entire=20file=20path=20can=E2=80=99t=20b?= =?UTF-8?q?e=20larger=20than=20255.=20There=20is=20an=20OS=20API=20provide?= =?UTF-8?q?d=20by=20Microsoft=20to=20add=20=E2=80=9C\\=3F\=E2=80=9D=20befo?= =?UTF-8?q?re=20the=20path=20header=20to=20support=20the=20long=20file=20p?= =?UTF-8?q?ath.=20Enable=20this=20feature=20on=20basetools.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen Reviewed-by: Yingke Liu git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15809 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/Ecc/Check.py | 4 ++-- BaseTools/Source/Python/Ecc/CodeFragmentCollector.py | 4 ++-- BaseTools/Source/Python/Ecc/Configuration.py | 3 ++- BaseTools/Source/Python/Ecc/Database.py | 4 ++-- BaseTools/Source/Python/Ecc/Ecc.py | 3 ++- BaseTools/Source/Python/Ecc/EccGlobalData.py | 4 ++-- BaseTools/Source/Python/Ecc/Exception.py | 4 ++-- BaseTools/Source/Python/Ecc/FileProfile.py | 5 +++-- BaseTools/Source/Python/Ecc/MetaDataParser.py | 4 ++-- BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py | 4 ++-- BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py | 5 +++-- BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py | 3 ++- BaseTools/Source/Python/Ecc/c.py | 4 ++-- 13 files changed, 28 insertions(+), 23 deletions(-) (limited to 'BaseTools/Source/Python/Ecc') diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python/Ecc/Check.py index c1ac07e852..4e7ffe7aca 100644 --- a/BaseTools/Source/Python/Ecc/Check.py +++ b/BaseTools/Source/Python/Ecc/Check.py @@ -1,7 +1,7 @@ ## @file # This file is used to define checkpoints used by ECC tool # -# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.
+# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.
# 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 @@ -10,7 +10,7 @@ # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -import os +import Common.LongFilePathOs as os import re from CommonDataClass.DataClass import * from Common.DataType import SUP_MODULE_LIST_STRING, TAB_VALUE_SPLIT diff --git a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py index 134b15f81e..171600feeb 100644 --- a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py +++ b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py @@ -1,7 +1,7 @@ ## @file # preprocess source file # -# Copyright (c) 2007, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -17,7 +17,7 @@ # import re -import os +import Common.LongFilePathOs as os import sys import antlr3 diff --git a/BaseTools/Source/Python/Ecc/Configuration.py b/BaseTools/Source/Python/Ecc/Configuration.py index 4f93d79661..72bfbc709b 100644 --- a/BaseTools/Source/Python/Ecc/Configuration.py +++ b/BaseTools/Source/Python/Ecc/Configuration.py @@ -14,10 +14,11 @@ ## # Import Modules # -import os +import Common.LongFilePathOs as os import Common.EdkLogger as EdkLogger from Common.DataType import * from Common.String import * +from Common.LongFilePathSupport import OpenLongFilePath as open ## Configuration # diff --git a/BaseTools/Source/Python/Ecc/Database.py b/BaseTools/Source/Python/Ecc/Database.py index f3e2b5934a..2041175124 100644 --- a/BaseTools/Source/Python/Ecc/Database.py +++ b/BaseTools/Source/Python/Ecc/Database.py @@ -1,7 +1,7 @@ ## @file # This file is used to create a database used by ECC tool # -# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
# 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 @@ -15,7 +15,7 @@ # Import Modules # import sqlite3 -import os, time +import Common.LongFilePathOs as os, time import Common.EdkLogger as EdkLogger import CommonDataClass.DataClass as DataClass diff --git a/BaseTools/Source/Python/Ecc/Ecc.py b/BaseTools/Source/Python/Ecc/Ecc.py index b5d733e48e..72f22d5b22 100644 --- a/BaseTools/Source/Python/Ecc/Ecc.py +++ b/BaseTools/Source/Python/Ecc/Ecc.py @@ -14,7 +14,7 @@ ## # Import Modules # -import os, time, glob, sys +import Common.LongFilePathOs as os, time, glob, sys import Common.EdkLogger as EdkLogger import Database import EccGlobalData @@ -37,6 +37,7 @@ from MetaFileWorkspace.MetaFileTable import MetaFileStorage import c import re, string from Exception import * +from Common.LongFilePathSupport import OpenLongFilePath as open ## Ecc # diff --git a/BaseTools/Source/Python/Ecc/EccGlobalData.py b/BaseTools/Source/Python/Ecc/EccGlobalData.py index 5226e4a7d1..a20d6ead48 100644 --- a/BaseTools/Source/Python/Ecc/EccGlobalData.py +++ b/BaseTools/Source/Python/Ecc/EccGlobalData.py @@ -1,7 +1,7 @@ ## @file # This file is used to save global datas used by ECC tool # -# Copyright (c) 2008, Intel Corporation. All rights reserved.
+# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.
# 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 @@ -14,7 +14,7 @@ ## # Import Modules # -import os +import Common.LongFilePathOs as os gWorkspace = '' gTarget = '' diff --git a/BaseTools/Source/Python/Ecc/Exception.py b/BaseTools/Source/Python/Ecc/Exception.py index ffbb62b3b0..fffbf30a98 100644 --- a/BaseTools/Source/Python/Ecc/Exception.py +++ b/BaseTools/Source/Python/Ecc/Exception.py @@ -1,7 +1,7 @@ ## @file # This file is used to parse exception items found by ECC tool # -# Copyright (c) 2009, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
# 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 @@ -15,7 +15,7 @@ # Import Modules # from Xml.XmlRoutines import * -import os.path +import Common.LongFilePathOs as os # ExceptionXml to parse Exception Node of XML file class ExceptionXml(object): diff --git a/BaseTools/Source/Python/Ecc/FileProfile.py b/BaseTools/Source/Python/Ecc/FileProfile.py index 689aee0975..f31d37ff96 100644 --- a/BaseTools/Source/Python/Ecc/FileProfile.py +++ b/BaseTools/Source/Python/Ecc/FileProfile.py @@ -1,7 +1,7 @@ ## @file # fragments of source file # -# Copyright (c) 2007, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -17,8 +17,9 @@ # import re -import os +import Common.LongFilePathOs as os from ParserWarning import Warning +from Common.LongFilePathSupport import OpenLongFilePath as open CommentList = [] PPDirectiveList = [] diff --git a/BaseTools/Source/Python/Ecc/MetaDataParser.py b/BaseTools/Source/Python/Ecc/MetaDataParser.py index bbafa00ddd..98b16a0e5c 100644 --- a/BaseTools/Source/Python/Ecc/MetaDataParser.py +++ b/BaseTools/Source/Python/Ecc/MetaDataParser.py @@ -1,7 +1,7 @@ ## @file # This file is used to define common parser functions for meta-data # -# Copyright (c) 2008, Intel Corporation. All rights reserved.
+# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.
# 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 @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # -import os +import Common.LongFilePathOs as os from CommonDataClass.DataClass import * from EccToolError import * import EccGlobalData diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py index 643c228665..0d53f05d8b 100644 --- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py +++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py @@ -1,7 +1,7 @@ ## @file # This file is used to create/update/query/erase table for files # -# Copyright (c) 2008, Intel Corporation. All rights reserved.
+# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.
# 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 @@ -14,7 +14,7 @@ ## # Import Modules # -import os +import Common.LongFilePathOs as os import Common.EdkLogger as EdkLogger from CommonDataClass import DataClass diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py index 405c5b5b03..949d067945 100644 --- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py @@ -14,7 +14,7 @@ ## # Import Modules # -import os +import Common.LongFilePathOs as os import re import time import copy @@ -31,7 +31,8 @@ from Common.Expression import * from CommonDataClass.Exceptions import * from MetaFileTable import MetaFileStorage -from GenFds.FdfParser import FdfParser +from GenFds.FdfParser import FdfParser +from Common.LongFilePathSupport import OpenLongFilePath as open ## A decorator used to parse macro definition def ParseMacro(Parser): diff --git a/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py b/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py index 5823067056..b93588eea6 100644 --- a/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py +++ b/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py @@ -2,7 +2,7 @@ # This is an XML API that uses a syntax similar to XPath, but it is written in # standard python so that no extra python packages are required to use it. # -# Copyright (c) 2007, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
# 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 @@ -16,6 +16,7 @@ # Import Modules # import xml.dom.minidom +from Common.LongFilePathSupport import OpenLongFilePath as open ## Create a element of XML # diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py index ea7d99fecd..6c20f6c9a3 100644 --- a/BaseTools/Source/Python/Ecc/c.py +++ b/BaseTools/Source/Python/Ecc/c.py @@ -1,7 +1,7 @@ ## @file # This file is used to be the c coding style checking of ECC tool # -# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
# 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 @@ -12,7 +12,7 @@ # import sys -import os +import Common.LongFilePathOs as os import re import string import CodeFragmentCollector -- cgit v1.2.3