浏览代码

Merge pull request #84978 from Calinou/scons-web-platform-alias-3.x

[3.x] Alias `platform=web` SCons option to `platform=javascript`
Rémi Verschelde 1 年之前
父节点
当前提交
73328c8fc2
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      SConstruct

+ 5 - 0
SConstruct

@@ -253,6 +253,11 @@ if selected_platform in ["linux", "bsd", "linuxbsd"]:
     # Alias for convenience.
     # Alias for convenience.
     selected_platform = "x11"
     selected_platform = "x11"
 
 
+if selected_platform == "web":
+    # Alias for forward compatibility.
+    print('Platform "web" is still called "javascript" in Godot 3.x. Building for platform "javascript".')
+    selected_platform = "javascript"
+
 # Make sure to update this to the found, valid platform as it's used through the buildsystem as the reference.
 # Make sure to update this to the found, valid platform as it's used through the buildsystem as the reference.
 # It should always be re-set after calling `opts.Update()` otherwise it uses the original input value.
 # It should always be re-set after calling `opts.Update()` otherwise it uses the original input value.
 env_base["platform"] = selected_platform
 env_base["platform"] = selected_platform