diff --git a/modules/mono/build_scripts/build_assemblies.py b/modules/mono/build_scripts/build_assemblies.py index 0b91cda9b89..580f51c9731 100755 --- a/modules/mono/build_scripts/build_assemblies.py +++ b/modules/mono/build_scripts/build_assemblies.py @@ -286,15 +286,29 @@ def generate_sdk_package_versions(): version_status = version_status[:pos] + "." + version_status[pos:] version_str += "-" + version_status + import version + + version_defines = ( + [ + f"GODOT{version.major}", + f"GODOT{version.major}_{version.minor}", + f"GODOT{version.major}_{version.minor}_{version.patch}", + ] + + [f"GODOT{v}_OR_GREATER" for v in range(4, version.major + 1)] + + [f"GODOT{version.major}_{v}_OR_GREATER" for v in range(0, version.minor + 1)] + + [f"GODOT{version.major}_{version.minor}_{v}_OR_GREATER" for v in range(0, version.patch + 1)] + ) + props = """ {0} {0} {0} + {1} """.format( - version_str + version_str, ";".join(version_defines) ) # We write in ../SdkPackageVersions.props. 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 45f930fdf74..b0bee795f8d 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 @@ -74,15 +74,8 @@ - - - GODOT; - GODOT4;GODOT4_OR_GREATER; - GODOT4_1;GODOT4_1_OR_GREATER;GODOT4_0_OR_GREATER; - GODOT4_1_0;GODOT4_1_0_OR_GREATER; - - - $(GodotDefineConstants.Replace('%0A','').Replace('%0D','').Replace('%09','').Replace(' ','')) + + GODOT