فهرست منبع

Merge pull request #84979 from Calinou/scons-web-platform-alias

Alias `platform=javascript` SCons option to `platform=web`
Yuri Sizov 1 سال پیش
والد
کامیت
718598e470
1فایلهای تغییر یافته به همراه11 افزوده شده و 10 حذف شده
  1. 11 10
      SConstruct

+ 11 - 10
SConstruct

@@ -308,18 +308,14 @@ else:
     if selected_platform != "":
     if selected_platform != "":
         print("Automatically detected platform: " + selected_platform)
         print("Automatically detected platform: " + selected_platform)
 
 
-if selected_platform in ["macos", "osx"]:
-    if selected_platform == "osx":
-        # Deprecated alias kept for compatibility.
-        print('Platform "osx" has been renamed to "macos" in Godot 4. Building for platform "macos".')
-    # Alias for convenience.
+if selected_platform == "osx":
+    # Deprecated alias kept for compatibility.
+    print('Platform "osx" has been renamed to "macos" in Godot 4. Building for platform "macos".')
     selected_platform = "macos"
     selected_platform = "macos"
 
 
-if selected_platform in ["ios", "iphone"]:
-    if selected_platform == "iphone":
-        # Deprecated alias kept for compatibility.
-        print('Platform "iphone" has been renamed to "ios" in Godot 4. Building for platform "ios".')
-    # Alias for convenience.
+if selected_platform == "iphone":
+    # Deprecated alias kept for compatibility.
+    print('Platform "iphone" has been renamed to "ios" in Godot 4. Building for platform "ios".')
     selected_platform = "ios"
     selected_platform = "ios"
 
 
 if selected_platform in ["linux", "bsd", "x11"]:
 if selected_platform in ["linux", "bsd", "x11"]:
@@ -329,6 +325,11 @@ if selected_platform in ["linux", "bsd", "x11"]:
     # Alias for convenience.
     # Alias for convenience.
     selected_platform = "linuxbsd"
     selected_platform = "linuxbsd"
 
 
+if selected_platform == "javascript":
+    # Deprecated alias kept for compatibility.
+    print('Platform "javascript" has been renamed to "web" in Godot 4. Building for platform "web".')
+    selected_platform = "web"
+
 # 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