## @file\r
# process FFS generation from INF statement\r
#\r
-# Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# Import Modules\r
#\r
import Rule\r
-import os\r
-import shutil\r
+import Common.LongFilePathOs as os\r
import StringIO\r
from struct import *\r
from GenFdsGlobalVariable import GenFdsGlobalVariable\r
from Common.Misc import PeImageClass\r
from AutoGen.GenDepex import DependencyExpression\r
from PatchPcdValue.PatchPcdValue import PatchBinaryFile\r
+from Common.LongFilePathSupport import CopyLongFilePath\r
+from Common.LongFilePathSupport import OpenLongFilePath as open\r
\r
## generate FFS from INF\r
#\r
return EfiFile\r
Basename = os.path.basename(EfiFile)\r
Output = os.path.join(self.OutputPath, Basename)\r
- shutil.copy(EfiFile, Output)\r
+ CopyLongFilePath(EfiFile, Output)\r
for Pcd in self.PatchPcds:\r
RetVal, RetStr = PatchBinaryFile(Output, int(Pcd.Offset, 0), Pcd.DatumType, Pcd.DefaultValue, Pcd.MaxDatumSize)\r
if RetVal:\r
if not NoStrip:\r
FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')\r
if not os.path.exists(FileBeforeStrip) or \\r
- (os.path.getmtime(File) > os.path.getmtime(FileBeforeStrip)):\r
- shutil.copyfile(File, FileBeforeStrip)\r
+ (os.path.getmtime(File) > os.path.getmtime(FileBeforeStrip)):\r
+ CopyLongFilePath(File, FileBeforeStrip)\r
StrippedFile = os.path.join(self.OutputPath, ModuleName + '.stipped')\r
GenFdsGlobalVariable.GenerateFirmwareImage(\r
StrippedFile,\r
if not NoStrip:\r
FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')\r
if not os.path.exists(FileBeforeStrip) or \\r
- (os.path.getmtime(GenSecInputFile) > os.path.getmtime(FileBeforeStrip)):\r
- shutil.copyfile(GenSecInputFile, FileBeforeStrip)\r
+ (os.path.getmtime(GenSecInputFile) > os.path.getmtime(FileBeforeStrip)):\r
+ CopyLongFilePath(GenSecInputFile, FileBeforeStrip)\r
+\r
StrippedFile = os.path.join(self.OutputPath, ModuleName + '.stipped')\r
GenFdsGlobalVariable.GenerateFirmwareImage(\r
StrippedFile,\r