summaryrefslogtreecommitdiff
path: root/platform/javascript/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/javascript/detect.py')
-rw-r--r--platform/javascript/detect.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index 0d57f8aad1..653d18f791 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -1,7 +1,14 @@
import os
import sys
-from emscripten_helpers import run_closure_compiler, create_engine_file, add_js_libraries, add_js_pre, add_js_externs
+from emscripten_helpers import (
+ run_closure_compiler,
+ create_engine_file,
+ add_js_libraries,
+ add_js_pre,
+ add_js_externs,
+ get_build_version,
+)
from methods import get_compiler_version
from SCons.Util import WhereIs
@@ -50,12 +57,13 @@ def get_flags():
def configure(env):
- if not isinstance(env["initial_memory"], int):
+ try:
+ env["initial_memory"] = int(env["initial_memory"])
+ except Exception:
print("Initial memory must be a valid integer")
sys.exit(255)
## Build type
-
if env["target"] == "release":
# Use -Os to prioritize optimizing for reduced file size. This is
# particularly valuable for the web platform because it directly
@@ -139,6 +147,9 @@ def configure(env):
env.AddMethod(add_js_pre, "AddJSPre")
env.AddMethod(add_js_externs, "AddJSExterns")
+ # Add method for getting build version string.
+ env.AddMethod(get_build_version, "GetBuildVersion")
+
# Add method that joins/compiles our Engine files.
env.AddMethod(create_engine_file, "CreateEngineFile")