Fix javascript build in Windows
Fix #3438
(cherry picked from commit c48ffed87a
)
This commit is contained in:
parent
c1e004ffca
commit
0b8cf7946e
|
@ -1312,7 +1312,7 @@ def android_add_to_attributes(self,file):
|
||||||
def disable_module(self):
|
def disable_module(self):
|
||||||
self.disabled_modules.append(self.current_module)
|
self.disabled_modules.append(self.current_module)
|
||||||
|
|
||||||
def use_windows_spawn_fix(self):
|
def use_windows_spawn_fix(self, platform=None):
|
||||||
|
|
||||||
if (os.name!="nt"):
|
if (os.name!="nt"):
|
||||||
return #not needed, only for windows
|
return #not needed, only for windows
|
||||||
|
@ -1322,10 +1322,13 @@ def use_windows_spawn_fix(self):
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
def mySubProcess(cmdline,env):
|
def mySubProcess(cmdline,env):
|
||||||
#print "SPAWNED : " + cmdline
|
prefix = ""
|
||||||
|
if(platform == 'javascript'):
|
||||||
|
prefix = "python.exe "
|
||||||
|
|
||||||
startupinfo = subprocess.STARTUPINFO()
|
startupinfo = subprocess.STARTUPINFO()
|
||||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||||
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
proc = subprocess.Popen(prefix + cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False, env = env)
|
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False, env = env)
|
||||||
data, err = proc.communicate()
|
data, err = proc.communicate()
|
||||||
rv = proc.wait()
|
rv = proc.wait()
|
||||||
|
|
|
@ -44,6 +44,9 @@ def get_flags():
|
||||||
|
|
||||||
|
|
||||||
def configure(env):
|
def configure(env):
|
||||||
|
env['ENV'] = os.environ;
|
||||||
|
env.use_windows_spawn_fix('javascript')
|
||||||
|
|
||||||
env.Append(CPPPATH=['#platform/javascript'])
|
env.Append(CPPPATH=['#platform/javascript'])
|
||||||
|
|
||||||
em_path=os.environ["EMSCRIPTEN_ROOT"]
|
em_path=os.environ["EMSCRIPTEN_ROOT"]
|
||||||
|
|
Loading…
Reference in New Issue