From 6b5b95bb4e269a1bd740707e27eae09983b84268 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 3 Jan 2015 13:03:13 -0300 Subject: -added new code completion guess locations, closes #1032 -moved commandline fix to mingw-only, should fix #1064 --- platform/windows/detect.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'platform') diff --git a/platform/windows/detect.py b/platform/windows/detect.py index be92ee8f6d..245d6f1bd3 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -135,6 +135,27 @@ def configure(env): env.Append(LIBPATH=[DIRECTX_PATH+"/Lib/x86"]) env['ENV'] = os.environ; else: + + # Workaround for MinGW. See: + # http://www.scons.org/wiki/LongCmdLinesOnWin32 + if (os.name=="nt"): + import subprocess + def mySpawn(sh, escape, cmd, args, env): + newargs = ' '.join(args[1:]) + cmdline = cmd + " " + newargs + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE, + stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False, env = env) + data, err = proc.communicate() + rv = proc.wait() + if rv: + print "=====" + print err + print "=====" + return rv + env['SPAWN'] = mySpawn + #build using mingw if (os.name=="nt"): env['ENV']['TMP'] = os.environ['TMP'] #way to go scons, you can be so stupid sometimes -- cgit v1.2.3