mirror of https://github.com/acidanthera/audk.git
Populate the zip file while building the manifest.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2107 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d0f7ef3eb2
commit
3ff56e5e44
|
@ -23,8 +23,7 @@ def parseMsa(msaFile, spdDir):
|
||||||
|
|
||||||
def parseSpd(spdFile):
|
def parseSpd(spdFile):
|
||||||
|
|
||||||
filelist = [spdFile]
|
filelist = []
|
||||||
msaFileList = []
|
|
||||||
|
|
||||||
spdDir = os.path.dirname(spdFile)
|
spdDir = os.path.dirname(spdFile)
|
||||||
|
|
||||||
|
@ -33,7 +32,7 @@ def parseSpd(spdFile):
|
||||||
xmlPaths = [
|
xmlPaths = [
|
||||||
"/PackageSurfaceArea/LibraryClassDeclarations/LibraryClass/IncludeHeader",
|
"/PackageSurfaceArea/LibraryClassDeclarations/LibraryClass/IncludeHeader",
|
||||||
"/PackageSurfaceArea/IndustryStdIncludes/IndustryStdHeader/IncludeHeader",
|
"/PackageSurfaceArea/IndustryStdIncludes/IndustryStdHeader/IncludeHeader",
|
||||||
"/PackageSurfaceArea/<PackageHeaders/IncludePkgHeader" ]
|
"/PackageSurfaceArea/PackageHeaders/IncludePkgHeader" ]
|
||||||
|
|
||||||
for xmlPath in xmlPaths:
|
for xmlPath in xmlPaths:
|
||||||
for f in XmlList(spd, xmlPath):
|
for f in XmlList(spd, xmlPath):
|
||||||
|
@ -78,14 +77,15 @@ def makeFar(filelist, farname):
|
||||||
package.appendChild(spdfilename)
|
package.appendChild(spdfilename)
|
||||||
|
|
||||||
spdfilename.appendChild( man.createTextNode(infile) )
|
spdfilename.appendChild( man.createTextNode(infile) )
|
||||||
|
zip.write(inWorkspace(infile), infile)
|
||||||
|
|
||||||
for spdfile in filelist:
|
for spdfile in filelist:
|
||||||
content = man.createElement("FarFilename")
|
content = man.createElement("FarFilename")
|
||||||
content.appendChild( man.createTextNode(spdfile))
|
content.appendChild( man.createTextNode(spdfile))
|
||||||
contents.appendChild(content)
|
contents.appendChild(content)
|
||||||
|
zip.write(inWorkspace(spdfile), spdfile)
|
||||||
|
|
||||||
elif extension == ".fpd":
|
elif extension == ".fpd":
|
||||||
filelist = [infile]
|
|
||||||
|
|
||||||
platform = man.createElement("FarPlatform")
|
platform = man.createElement("FarPlatform")
|
||||||
platList.appendChild(platform)
|
platList.appendChild(platform)
|
||||||
|
@ -94,12 +94,11 @@ def makeFar(filelist, farname):
|
||||||
platform.appendChild(fpdfilename)
|
platform.appendChild(fpdfilename)
|
||||||
|
|
||||||
fpdfilename.appendChild( man.createTextNode(infile) )
|
fpdfilename.appendChild( man.createTextNode(infile) )
|
||||||
|
zip.write(inWorkspace(infile), infile)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
filelist = []
|
print "Skipping file '%s' since is is not a .spd or .fpd." % infile
|
||||||
|
|
||||||
for f in set(filelist):
|
|
||||||
zip.write(inWorkspace(f), f)
|
|
||||||
zip.writestr("FrameworkArchiveManifest.xml", man.toprettyxml(2*" "))
|
zip.writestr("FrameworkArchiveManifest.xml", man.toprettyxml(2*" "))
|
||||||
zip.close()
|
zip.close()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue