print 'Templates & Conf directory'\r
print ' Templates dir:', self.RelativeToWorkspace(templatesDir)\r
for filename in os.listdir(templatesDir):\r
+ if filename.startswith('.'): continue\r
+\r
srcFilename = os.path.join(templatesDir, filename)\r
destFilename = os.path.join(confDir, filename)\r
print ' ', self.RelativeToWorkspace(destFilename),\r
print 'Storing environment configuration into',\r
print self.RelativeToWorkspace(scriptFilename)\r
script = open(scriptFilename, 'w')\r
+\r
print >> script, 'export WORKSPACE="%s"' % workspace\r
print >> script, 'export TOOLCHAIN="%s"' % self.conf['compiler']\r
print >> script, 'export EDK_CC_PATH_PREFIX="%s"' % self.conf['compiler-prefix']\r
+\r
+ #\r
+ # Change PATH variable\r
+ #\r
+ newPath = os.environ['PATH'].split(os.path.pathsep)\r
+ binDir = \\r
+ os.path.join(workspace, 'Tools', 'BaseTools', 'Bin', sys.platform.title())\r
+ if binDir not in newPath:\r
+ newPath.append(binDir)\r
+ newPath = os.path.pathsep.join(newPath)\r
+ print >> script, 'export PATH=%s' % newPath\r
+\r
script.close()\r
\r
def RelativeToWorkspace(self, path):\r