diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2022-08-28 20:27:45 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2022-08-29 11:52:00 +0200 |
commit | d20b32186fc192f5e527a1211291b0cb293f4e66 (patch) | |
tree | 20f5e9e84e10b68c318f576344a10a9fc63d235f /modules/mono | |
parent | 223e083d36ac1ca3f7aa46898d8870e476132f7a (diff) |
[Web] Rename JavaScript platform to Web.
Also rename export name from "HTML5" to "Web".
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/build_scripts/mono_configure.py | 2 | ||||
-rw-r--r-- | modules/mono/config.py | 6 | ||||
-rw-r--r-- | modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props | 2 | ||||
-rw-r--r-- | modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs | 14 | ||||
-rw-r--r-- | modules/mono/godotsharp_dirs.cpp | 2 |
5 files changed, 13 insertions, 13 deletions
diff --git a/modules/mono/build_scripts/mono_configure.py b/modules/mono/build_scripts/mono_configure.py index ef7dbabf66..c2d5452837 100644 --- a/modules/mono/build_scripts/mono_configure.py +++ b/modules/mono/build_scripts/mono_configure.py @@ -16,7 +16,7 @@ def module_supports_tools_on(platform): def configure(env, env_mono): # is_android = env["platform"] == "android" - # is_javascript = env["platform"] == "javascript" + # is_web = env["platform"] == "web" # is_ios = env["platform"] == "ios" # is_ios_sim = is_ios and env["arch"] in ["x86_32", "x86_64"] diff --git a/modules/mono/config.py b/modules/mono/config.py index b599414a2c..ad78c8c898 100644 --- a/modules/mono/config.py +++ b/modules/mono/config.py @@ -1,4 +1,4 @@ -# Prior to .NET Core, we supported these: ["windows", "macos", "linuxbsd", "android", "haiku", "javascript", "ios"] +# Prior to .NET Core, we supported these: ["windows", "macos", "linuxbsd", "android", "haiku", "web", "ios"] # Eventually support for each them should be added back (except Haiku if not supported by .NET Core) supported_platforms = ["windows", "macos", "linuxbsd"] @@ -10,8 +10,8 @@ def can_build(env, platform): def get_opts(platform): from SCons.Variables import BoolVariable, PathVariable - default_mono_static = platform in ["ios", "javascript"] - default_mono_bundles_zlib = platform in ["javascript"] + default_mono_static = platform in ["ios", "web"] + default_mono_bundles_zlib = platform in ["web"] return [ PathVariable( diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props b/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props index ad41ab04d5..59ce1da17b 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props @@ -81,7 +81,7 @@ <GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'haiku' ">GODOT_HAIKU;GODOT_PC</GodotPlatformConstants> <GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'android' ">GODOT_ANDROID;GODOT_MOBILE</GodotPlatformConstants> <GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'ios' ">GODOT_IPHONE;GODOT_IOS;GODOT_MOBILE</GodotPlatformConstants> - <GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'javascript' ">GODOT_JAVASCRIPT;GODOT_HTML5;GODOT_WASM;GODOT_WEB</GodotPlatformConstants> + <GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'web' ">GODOT_JAVASCRIPT;GODOT_HTML5;GODOT_WASM;GODOT_WEB</GodotPlatformConstants> <GodotDefineConstants>$(GodotDefineConstants);$(GodotPlatformConstants)</GodotDefineConstants> </PropertyGroup> diff --git a/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs b/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs index b5e4ae7a28..6290b2c56f 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs @@ -30,7 +30,7 @@ namespace GodotTools.Utils public const string Haiku = "Haiku"; public const string Android = "Android"; public const string iOS = "iOS"; - public const string HTML5 = "HTML5"; + public const string Web = "Web"; } /// <summary> @@ -45,7 +45,7 @@ namespace GodotTools.Utils public const string Haiku = "haiku"; public const string Android = "android"; public const string iOS = "ios"; - public const string HTML5 = "javascript"; + public const string Web = "web"; } /// <summary> @@ -77,7 +77,7 @@ namespace GodotTools.Utils ["Haiku"] = Platforms.Haiku, ["Android"] = Platforms.Android, ["iOS"] = Platforms.iOS, - ["HTML5"] = Platforms.HTML5 + ["Web"] = Platforms.Web }; public static readonly Dictionary<string, string> PlatformNameMap = new Dictionary<string, string> @@ -92,7 +92,7 @@ namespace GodotTools.Utils [Names.Haiku] = Platforms.Haiku, [Names.Android] = Platforms.Android, [Names.iOS] = Platforms.iOS, - [Names.HTML5] = Platforms.HTML5 + [Names.Web] = Platforms.Web }; public static readonly Dictionary<string, string> DotNetOSPlatformMap = new Dictionary<string, string> @@ -107,7 +107,7 @@ namespace GodotTools.Utils [Platforms.UWP] = DotNetOS.Win10, [Platforms.Android] = DotNetOS.Android, [Platforms.iOS] = DotNetOS.iOS, - [Platforms.HTML5] = DotNetOS.Browser + [Platforms.Web] = DotNetOS.Browser }; private static bool IsOS(string name) @@ -144,7 +144,7 @@ namespace GodotTools.Utils private static readonly Lazy<bool> _isHaiku = new(() => IsOS(Names.Haiku)); private static readonly Lazy<bool> _isAndroid = new(() => IsOS(Names.Android)); private static readonly Lazy<bool> _isiOS = new(() => IsOS(Names.iOS)); - private static readonly Lazy<bool> _isHTML5 = new(() => IsOS(Names.HTML5)); + private static readonly Lazy<bool> _isWeb = new(() => IsOS(Names.Web)); private static readonly Lazy<bool> _isUnixLike = new(() => IsAnyOS(UnixLikePlatforms)); [SupportedOSPlatformGuard("windows")] public static bool IsWindows => _isWindows.Value || IsUWP; @@ -161,7 +161,7 @@ namespace GodotTools.Utils [SupportedOSPlatformGuard("ios")] public static bool IsiOS => _isiOS.Value; - [SupportedOSPlatformGuard("browser")] public static bool IsHTML5 => _isHTML5.Value; + [SupportedOSPlatformGuard("browser")] public static bool IsWeb => _isWeb.Value; public static bool IsUnixLike => _isUnixLike.Value; public static char PathSep => IsWindows ? ';' : ':'; diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp index 71576c2f80..12960fb938 100644 --- a/modules/mono/godotsharp_dirs.cpp +++ b/modules/mono/godotsharp_dirs.cpp @@ -137,7 +137,7 @@ private: api_assemblies_base_dir = res_data_dir.plus_file("assemblies"); -#ifdef JAVASCRIPT_ENABLED +#ifdef WEB_ENABLED mono_user_dir = "user://"; #else mono_user_dir = _get_mono_user_dir(); |