From 1f4380ac0a0cebef7e790cf50411e2ffc36dcd3a Mon Sep 17 00:00:00 2001 From: Scott D Phillips Date: Mon, 17 Oct 2016 07:42:07 -0700 Subject: [PATCH] Windows fixes for scripts subprocess.call runs programs directly when shell=False and can't take advantage of the association that makes python scripts executable in shells, so explicitly add the interpreter to the args for call. Run the windows command prompt by default in gst-uninstalled. --- configure | 4 ++-- gst-uninstalled.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 4d835dc4e0..66bf858dc8 100755 --- a/configure +++ b/configure @@ -63,8 +63,8 @@ def configure_meson(args, options): os.mkdir(build_dir) try: - subprocess.check_call([meson, "../"] + args, cwd=build_dir) - subprocess.check_call([os.path.join(ROOTDIR, 'meson', 'mesonconf.py')] + subprocess.check_call([sys.executable, meson, "../"] + args, cwd=build_dir) + subprocess.check_call([sys.executable, os.path.join(ROOTDIR, 'meson', 'mesonconf.py')] + get_configs(meson), cwd=build_dir) except subprocess.CalledProcessError as e: print("EXIT meson return %s" % e.returncode) diff --git a/gst-uninstalled.py b/gst-uninstalled.py index a6e1592e63..a698bf9cf8 100755 --- a/gst-uninstalled.py +++ b/gst-uninstalled.py @@ -123,7 +123,10 @@ if __name__ == "__main__": exit(1) if not args: - args = [os.environ.get("SHELL", os.path.realpath("/bin/sh"))] + if os.name is 'nt': + args = [os.environ.get("COMSPEC", r"C:\WINDOWS\system32\cmd.exe")] + else: + args = [os.environ.get("SHELL", os.path.realpath("/bin/sh"))] if args[0] == "/bin/bash": args.append("--noprofile")