]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/build/build.py
BaseTools: fix the typo in function name LanuchPostbuild
[mirror_edk2.git] / BaseTools / Source / Python / build / build.py
index be02119042f6a88776963beb50c1c4ee6f0b7b60..45ccac1e139367961344c69e8798f7f7c19a5dc3 100644 (file)
@@ -265,15 +265,16 @@ def LaunchCommand(Command, WorkingDir):
     # 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
@@ -824,6 +825,8 @@ class Build():
             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
@@ -986,7 +989,6 @@ class Build():
                 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
@@ -1073,7 +1075,7 @@ class Build():
                 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
@@ -2328,7 +2330,7 @@ def Main():
 \r
     if ReturnCode == 0:\r
         try:\r
-            MyBuild.LanuchPostbuild()\r
+            MyBuild.LaunchPostbuild()\r
             Conclusion = "Done"\r
         except:\r
             Conclusion = "Failed"\r