summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-06-15 13:23:00 +0200
committerGitHub <noreply@github.com>2016-06-15 13:23:00 +0200
commit01bb8787c953aeb399bd97fa64c8b31c2e9abe43 (patch)
tree47ab48b7b1ab2af2ed154299f87b494817b351dd
parentf38f5c9e16c37e799fdcd2b71bbe7f9e66705a78 (diff)
parentc48ffed87a189c3543e0bb2a8056f24b5f7d19cb (diff)
Merge pull request #5212 from vnen/fix-emscripten-build
Fix javascript build in Windows
-rwxr-xr-xmethods.py9
-rw-r--r--platform/javascript/detect.py3
2 files changed, 9 insertions, 3 deletions
diff --git a/methods.py b/methods.py
index 730558a064..7128b334ec 100755
--- a/methods.py
+++ b/methods.py
@@ -1343,7 +1343,7 @@ def android_add_to_attributes(self,file):
def disable_module(self):
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"):
return #not needed, only for windows
@@ -1353,10 +1353,13 @@ def use_windows_spawn_fix(self):
import subprocess
def mySubProcess(cmdline,env):
- #print "SPAWNED : " + cmdline
+ prefix = ""
+ if(platform == 'javascript'):
+ prefix = "python.exe "
+
startupinfo = subprocess.STARTUPINFO()
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)
data, err = proc.communicate()
rv = proc.wait()
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index ae33a43f0d..d76a20bea7 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -44,6 +44,9 @@ def get_flags():
def configure(env):
+ env['ENV'] = os.environ;
+ env.use_windows_spawn_fix('javascript')
+
env.Append(CPPPATH=['#platform/javascript'])
em_path=os.environ["EMSCRIPTEN_ROOT"]