summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-10-14 18:53:07 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-12-10 16:43:45 +0100
commit063637ec77bbb3f3b809d616005cb80d0cdc64b1 (patch)
tree05f497f229c4edb1581df8030b90a7117ce70431 /modules/mono
parentae86d907e75c3de9b039e7cc77e521bc9739e6dc (diff)
Rename `float=64` SCons option to `precision=double`
This avoids confusion with the old `bits=64` option and building for 64-bit CPUs in general.
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/README.md6
-rwxr-xr-xmodules/mono/build_scripts/build_assemblies.py18
2 files changed, 13 insertions, 11 deletions
diff --git a/modules/mono/README.md b/modules/mono/README.md
index 366777cfc1..74b4531dfb 100644
--- a/modules/mono/README.md
+++ b/modules/mono/README.md
@@ -46,10 +46,10 @@ C# solutions during development to avoid mistakes.
# Double Precision Support (REAL_T_IS_DOUBLE)
-Follow the above instructions but build Godot with the float=64 argument to scons
+Follow the above instructions but build Godot with the precision=double argument to scons
-When building the NuGet packages, specify `--float=64` - for example:
+When building the NuGet packages, specify `--precision=double` - for example:
```sh
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir ./bin \
- --push-nupkgs-local ~/MyLocalNugetSource --float=64
+ --push-nupkgs-local ~/MyLocalNugetSource --precision=double
```
diff --git a/modules/mono/build_scripts/build_assemblies.py b/modules/mono/build_scripts/build_assemblies.py
index 7343af0b39..0b91cda9b8 100755
--- a/modules/mono/build_scripts/build_assemblies.py
+++ b/modules/mono/build_scripts/build_assemblies.py
@@ -193,7 +193,7 @@ def run_msbuild(tools: ToolsLocation, sln: str, msbuild_args: Optional[List[str]
return subprocess.call(args, env=msbuild_env)
-def build_godot_api(msbuild_tool, module_dir, output_dir, push_nupkgs_local, float_size):
+def build_godot_api(msbuild_tool, module_dir, output_dir, push_nupkgs_local, precision):
target_filenames = [
"GodotSharp.dll",
"GodotSharp.pdb",
@@ -214,7 +214,7 @@ def build_godot_api(msbuild_tool, module_dir, output_dir, push_nupkgs_local, flo
args = ["/restore", "/t:Build", "/p:Configuration=" + build_config, "/p:NoWarn=1591"]
if push_nupkgs_local:
args += ["/p:ClearNuGetLocalCache=true", "/p:PushNuGetToLocalSource=" + push_nupkgs_local]
- if float_size == "64":
+ if precision == "double":
args += ["/p:GodotFloat64=true"]
sln = os.path.join(module_dir, "glue/GodotSharp/GodotSharp.sln")
@@ -303,12 +303,12 @@ def generate_sdk_package_versions():
f.close()
-def build_all(msbuild_tool, module_dir, output_dir, godot_platform, dev_debug, push_nupkgs_local, float_size):
+def build_all(msbuild_tool, module_dir, output_dir, godot_platform, dev_debug, push_nupkgs_local, precision):
# Generate SdkPackageVersions.props
generate_sdk_package_versions()
# Godot API
- exit_code = build_godot_api(msbuild_tool, module_dir, output_dir, push_nupkgs_local, float_size)
+ exit_code = build_godot_api(msbuild_tool, module_dir, output_dir, push_nupkgs_local, precision)
if exit_code != 0:
return exit_code
@@ -319,7 +319,7 @@ def build_all(msbuild_tool, module_dir, output_dir, godot_platform, dev_debug, p
)
if push_nupkgs_local:
args += ["/p:ClearNuGetLocalCache=true", "/p:PushNuGetToLocalSource=" + push_nupkgs_local]
- if float_size == "64":
+ if precision == "double":
args += ["/p:GodotFloat64=true"]
exit_code = run_msbuild(msbuild_tool, sln=sln, msbuild_args=args)
if exit_code != 0:
@@ -329,7 +329,7 @@ def build_all(msbuild_tool, module_dir, output_dir, godot_platform, dev_debug, p
args = ["/restore", "/t:Build", "/p:Configuration=Release"]
if push_nupkgs_local:
args += ["/p:ClearNuGetLocalCache=true", "/p:PushNuGetToLocalSource=" + push_nupkgs_local]
- if float_size == "64":
+ if precision == "double":
args += ["/p:GodotFloat64=true"]
sln = os.path.join(module_dir, "editor/Godot.NET.Sdk/Godot.NET.Sdk.sln")
exit_code = run_msbuild(msbuild_tool, sln=sln, msbuild_args=args)
@@ -354,7 +354,9 @@ def main():
parser.add_argument("--godot-platform", type=str, default="")
parser.add_argument("--mono-prefix", type=str, default="")
parser.add_argument("--push-nupkgs-local", type=str, default="")
- parser.add_argument("--float", type=str, default="32", choices=["32", "64"], help="Floating-point precision")
+ parser.add_argument(
+ "--precision", type=str, default="single", choices=["single", "double"], help="Floating-point precision level"
+ )
args = parser.parse_args()
@@ -378,7 +380,7 @@ def main():
args.godot_platform,
args.dev_debug,
push_nupkgs_local,
- args.float,
+ args.precision,
)
sys.exit(exit_code)