diff options
Diffstat (limited to 'platform/web/SCsub')
-rw-r--r-- | platform/web/SCsub | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/platform/web/SCsub b/platform/web/SCsub index ae9d628857..077024507a 100644 --- a/platform/web/SCsub +++ b/platform/web/SCsub @@ -2,11 +2,25 @@ Import("env") +# The HTTP server "targets". Run with "scons p=web serve", or "scons p=web run" +if "serve" in COMMAND_LINE_TARGETS or "run" in COMMAND_LINE_TARGETS: + from serve import serve + import os + + port = os.environ.get("GODOT_WEB_TEST_PORT", 8060) + try: + port = int(port) + except Exception: + print("GODOT_WEB_TEST_PORT must be a valid integer") + sys.exit(255) + serve(env.Dir("#bin/.web_zip").abspath, port, "run" in COMMAND_LINE_TARGETS) + sys.exit(0) + web_files = [ "audio_driver_web.cpp", "display_server_web.cpp", "http_client_web.cpp", - "javascript_singleton.cpp", + "javascript_bridge_singleton.cpp", "web_main.cpp", "os_web.cpp", "api/web_tools_editor_plugin.cpp", @@ -21,6 +35,7 @@ sys_env.AddJSLibraries( "js/libs/library_godot_os.js", "js/libs/library_godot_runtime.js", "js/libs/library_godot_input.js", + "js/libs/library_godot_webgl2.js", ] ) @@ -66,6 +81,7 @@ sys_env.Depends(build[0], sys_env["JS_PRE"]) sys_env.Depends(build[0], sys_env["JS_EXTERNS"]) engine = [ + "js/engine/features.js", "js/engine/preloader.js", "js/engine/config.js", "js/engine/engine.js", |