mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
-Many fixes to windows build system with Mingw on Windows. Fixes #2690
This commit is contained in:
parent
caff4000a2
commit
caddcca4f4
4 changed files with 51 additions and 37 deletions
45
methods.py
45
methods.py
|
@ -1309,7 +1309,50 @@ def android_add_to_attributes(self,file):
|
|||
|
||||
def disable_module(self):
|
||||
self.disabled_modules.append(self.current_module)
|
||||
|
||||
|
||||
def use_windows_spawn_fix(self):
|
||||
|
||||
if (os.name!="nt"):
|
||||
return #not needed, only for windows
|
||||
|
||||
self.split_drivers=True
|
||||
|
||||
import subprocess
|
||||
|
||||
def mySubProcess(cmdline,env):
|
||||
#print "SPAWNED : " + cmdline
|
||||
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
|
||||
|
||||
def mySpawn(sh, escape, cmd, args, env):
|
||||
|
||||
newargs = ' '.join(args[1:])
|
||||
cmdline = cmd + " " + newargs
|
||||
|
||||
rv=0
|
||||
if len(cmdline) > 32000 and cmd.endswith("ar") :
|
||||
cmdline = cmd + " " + args[1] + " " + args[2] + " "
|
||||
for i in range(3,len(args)) :
|
||||
rv = mySubProcess( cmdline + args[i], env )
|
||||
if rv :
|
||||
break
|
||||
else:
|
||||
rv = mySubProcess( cmdline, env )
|
||||
|
||||
return rv
|
||||
|
||||
self['SPAWN'] = mySpawn
|
||||
|
||||
|
||||
def save_active_platforms(apnames,ap):
|
||||
|
||||
for x in ap:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue