#!/usr/bin/env python
+# Copyright (c) 2007, 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
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
"""Calculate the dependencies a given module has by looking through the source
code to see what guids and functions are referenced to see which Packages and
Library Classes need to be referenced. """
#!/usr/bin/env python
-# The EDK II Build System Context Tool Utility maintains Target.txt settings in an EDK II Workspace.
+# Copyright (c) 2007, 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
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+"""The EDK II Build System Context Tool Utility maintains Target.txt settings
+in an EDK II Workspace."""
import wx, os, sys, copy
from EdkIIWorkspace import *
#!/usr/bin/env python
-# An EDK II Build System Framework Database Utility maintains FrameworkDatabase.db
-# settings in an EDK II Workspace.
+# Copyright (c) 2007, 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
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+"""An EDK II Build System Framework Database Utility maintains
+FrameworkDatabase.db settings in an EDK II Workspace."""
import wx, os, sys, copy
from EdkIIWorkspace import *
frame = Frame()
frame.Show()
app.MainLoop()
-
\ No newline at end of file
+
#!/usr/bin/env python
+"""This is a python script that takes user input from the command line and
+creates a far (Framework Archive Manifest) file for distribution."""
+
import os, sys, getopt, string, xml.dom.minidom, zipfile, md5
from XmlRoutines import *
from WorkspaceRoutines import *
far.ExtraFiles=[]
far = Far()
+"""The far object is constructed from the template file the user passed in."""
def parseMsa(msaFile, spdDir):
+ """ XXX Parse an msa file and return a list of all the files that this msa
+ includes."""
+
filelist = [msaFile]
msaDir = os.path.dirname(msaFile)
def parseSpd(spdFile):
+ """Parse an spd file and return a list of all the files that this spd
+ includes."""
+
files = []
spdDir = os.path.dirname(spdFile)
def makeFarHeader(doc):
+ """Create a dom tree for the Far Header. It will use information from the
+ template file passed on the command line, if present."""
+
header = doc.createElement("FarHeader")
name = doc.createElement("FarName")
name.appendChild(doc.createTextNode(far.FarName))
def getSpdGuidVersion(spdFile):
+ """Returns a tuple (guid, version) which is read from the given spdFile."""
+
spd = xml.dom.minidom.parse(inWorkspace(spdFile))
return (XmlElement(spd, "/PackageSurfaceArea/SpdHeader/GuidValue"),
def makeFar(files, farname):
+ """Make a far out of the given filelist and writes it to the file farname."""
+
domImpl = xml.dom.minidom.getDOMImplementation()
man = domImpl.createDocument(None, "FrameworkArchiveManifest", None)
top_element = man.documentElement
return
def farFileNode(doc, filename):
+
+ """This is a function that returns a dom tree for a given file that is
+ included in the far. An md5sum is calculated for that file."""
+
content = doc.createElement("FarFilename")
f=open(filename, "rb")
content.setAttribute("Md5sum", md5.md5(f.read()).hexdigest())
#!/usr/bin/env python
+# Copyright (c) 2007, 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
+# http://opensource.org/licenses/bsd-license.php
+#
+# 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, sys, re, getopt, string, glob, xml.dom.minidom, pprint, md5, socket, getpass, time, random
def inWorkspace(rel_path=""):
#!/usr/bin/env python
-# 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. 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
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+"""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."""
import xml.dom.minidom
"""Get the text for this element."""
return Dom.firstChild.data.strip()
-def XmlAttribute (Dom, String):
- """Return a single attribute that named by String."""
+def XmlAttribute (Dom, AttName):
+ """Return a single attribute named AttName."""
try:
- return Dom.getAttribute(String)
+ return Dom.getAttribute(AttName)
except:
return ''