From 20b821780c3845ae67aae31c55b8c30040d27e32 Mon Sep 17 00:00:00 2001 From: Marcelo Fernandez Date: Sat, 28 Oct 2017 16:24:44 -0300 Subject: [PATCH] Detect javascript platform using EMSCRIPTEN env as well (cherry picked from commit 33daf4d8bc17f30c85cefe2e9dfe9b46ddb257f9) --- platform/javascript/detect.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 472ff1e4eda..864af7c538b 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -12,7 +12,8 @@ def get_name(): def can_build(): - return ("EMSCRIPTEN_ROOT" in os.environ) + + return ("EMSCRIPTEN_ROOT" in os.environ or "EMSCRIPTEN" in os.environ) def get_opts(): @@ -39,7 +40,11 @@ def configure(env): env.Append(CPPPATH=['#platform/javascript']) - em_path = os.environ["EMSCRIPTEN_ROOT"] + env['ENV'] = os.environ + if ("EMSCRIPTEN_ROOT" in os.environ): + em_path = os.environ["EMSCRIPTEN_ROOT"] + elif ("EMSCRIPTEN" in os.environ): + em_path = os.environ["EMSCRIPTEN"] env['ENV']['PATH'] = em_path + ":" + env['ENV']['PATH']