]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/build/build.py
BaseTools/Build: Support python scripts in PREBUILD/POSTBUILD
[mirror_edk2.git] / BaseTools / Source / Python / build / build.py
index cfd28a4b5b91bd455497d6487908a6a0eddc24f4..1e14fb4dcc7d259f48347fc9a6f61a36e7930ef5 100644 (file)
@@ -1036,7 +1036,7 @@ class Build():
                 os.remove(self.PlatformBuildPath)\r
             if sys.platform == "win32":\r
                 args = ' && '.join((self.Prebuild, 'set > ' + PrebuildEnvFile))\r
                 os.remove(self.PlatformBuildPath)\r
             if sys.platform == "win32":\r
                 args = ' && '.join((self.Prebuild, 'set > ' + PrebuildEnvFile))\r
-                Process = Popen(args, stdout=PIPE, stderr=PIPE)\r
+                Process = Popen(args, stdout=PIPE, stderr=PIPE, shell=True)\r
             else:\r
                 args = ' && '.join((self.Prebuild, 'env > ' + PrebuildEnvFile))\r
                 Process = Popen(args, stdout=PIPE, stderr=PIPE, shell=True)\r
             else:\r
                 args = ' && '.join((self.Prebuild, 'env > ' + PrebuildEnvFile))\r
                 Process = Popen(args, stdout=PIPE, stderr=PIPE, shell=True)\r
@@ -1079,7 +1079,7 @@ class Build():
         if self.Postbuild:\r
             EdkLogger.info("\n- Postbuild Start -\n")\r
             if sys.platform == "win32":\r
         if self.Postbuild:\r
             EdkLogger.info("\n- Postbuild Start -\n")\r
             if sys.platform == "win32":\r
-                Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE)\r
+                Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE, shell=True)\r
             else:\r
                 Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE, shell=True)\r
             # launch two threads to read the STDOUT and STDERR\r
             else:\r
                 Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE, shell=True)\r
             # launch two threads to read the STDOUT and STDERR\r