@@ -59,7 +59,7 @@ import glsl_builders
5959import methods
6060import scu_builders
6161from methods import print_error , print_warning
62- from platform_methods import architecture_aliases , architectures
62+ from platform_methods import architecture_aliases , architectures , compatibility_platform_aliases
6363
6464if ARGUMENTS .get ("target" , "editor" ) == "editor" :
6565 _helper_module ("editor.editor_builders" , "editor/editor_builders.py" )
@@ -350,27 +350,16 @@ if env["platform"] == "":
350350 if env ["platform" ] != "" :
351351 print (f'Automatically detected platform: { env ["platform" ]} ' )
352352
353- if env ["platform" ] == "osx" :
354- # Deprecated alias kept for compatibility.
355- print_warning ('Platform "osx" has been renamed to "macos" in Godot 4. Building for platform "macos".' )
356- env ["platform" ] = "macos"
357-
358- if env ["platform" ] == "iphone" :
359- # Deprecated alias kept for compatibility.
360- print_warning ('Platform "iphone" has been renamed to "ios" in Godot 4. Building for platform "ios".' )
361- env ["platform" ] = "ios"
362-
363- if env ["platform" ] in ["linux" , "bsd" , "x11" ]:
364- if env ["platform" ] == "x11" :
365- # Deprecated alias kept for compatibility.
366- print_warning ('Platform "x11" has been renamed to "linuxbsd" in Godot 4. Building for platform "linuxbsd".' )
367- # Alias for convenience.
368- env ["platform" ] = "linuxbsd"
353+ # Deprecated aliases kept for compatibility.
354+ if env ["platform" ] in compatibility_platform_aliases :
355+ alias = env ["platform" ]
356+ platform = compatibility_platform_aliases [alias ]
357+ print_warning (f'Platform "{ alias } " has been renamed to "{ platform } " in Godot 4. Building for platform "{ platform } ".' )
358+ env ["platform" ] = platform
369359
370- if env ["platform" ] == "javascript" :
371- # Deprecated alias kept for compatibility.
372- print_warning ('Platform "javascript" has been renamed to "web" in Godot 4. Building for platform "web".' )
373- env ["platform" ] = "web"
360+ # Alias for convenience.
361+ if env ["platform" ] in ["linux" , "bsd" ]:
362+ env ["platform" ] = "linuxbsd"
374363
375364if env ["platform" ] not in platform_list :
376365 text = "The following platforms are available:\n \t {}\n " .format ("\n \t " .join (platform_list ))
0 commit comments