# It could be a string or sequence. We find that if command is a string in following Popen(),\r
# ubuntu may fail with an error message that the command is not found.\r
# So here we may need convert command from string to list instance.\r
- if not isinstance(Command, list):\r
- if platform.system() != 'Windows':\r
+ if platform.system() != 'Windows':\r
+ if not isinstance(Command, list):\r
Command = Command.split()\r
+ Command = ' '.join(Command)\r
\r
Proc = None\r
EndOfProcedure = None\r
try:\r
# launch the command\r
- Proc = Popen(Command, stdout=PIPE, stderr=PIPE, env=os.environ, cwd=WorkingDir, bufsize=-1)\r
+ Proc = Popen(Command, stdout=PIPE, stderr=PIPE, env=os.environ, cwd=WorkingDir, bufsize=-1, shell=True)\r
\r
# launch two threads to read the STDOUT and STDERR\r
EndOfProcedure = Event()\r
EdkLogger.quiet("%-16s = %s" % ("POSTBUILD", self.PostbuildScript))\r
if self.PrebuildScript:\r
self.LaunchPrebuild()\r
+ self.TargetTxt = TargetTxtClassObject()\r
+ self.ToolDef = ToolDefClassObject()\r
if not (self.LaunchPrebuildFlag and os.path.exists(self.PlatformBuildPath)):\r
self.InitBuild()\r
\r
self.PostbuildScript = PostbuildList[0]\r
self.Postbuild = ' '.join(PostbuildList)\r
self.Postbuild += self.PassCommandOption(self.BuildTargetList, self.ArchList, self.ToolChainList)\r
- #self.LanuchPostbuild()\r
else:\r
EdkLogger.error("Postbuild", POSTBUILD_ERROR, "the postbuild script %s is not exist.\n If you'd like to disable the Postbuild process, please use the format: -D POSTBUILD=\"\" " %(PostbuildList[0]))\r
\r
os.environ.update(dict(envs))\r
EdkLogger.info("\n- Prebuild Done -\n")\r
\r
- def LanuchPostbuild(self):\r
+ def LaunchPostbuild(self):\r
if self.Postbuild:\r
EdkLogger.info("\n- Postbuild Start -\n")\r
if sys.platform == "win32":\r
\r
if ReturnCode == 0:\r
try:\r
- MyBuild.LanuchPostbuild()\r
+ MyBuild.LaunchPostbuild()\r
Conclusion = "Done"\r
except:\r
Conclusion = "Failed"\r