Skip to content

Commit abe9457

Browse files
authored
Merge pull request #1870 from dsnopek/4.5-cherrypicks-1
Cherry-picks for the godot-cpp 4.5 branch - 1st batch
2 parents e83fd09 + a278404 commit abe9457

21 files changed

+1034
-569
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ compromises need to be made to resolve those differences.
2121
As we are attempting to maintain feature parity, and ease of maintenance, these
2222
CMake scripts are built to resemble the SCons build system wherever possible.
2323
Where they are not, we will attempt to document common difference in
24-
doc/cmake.rst and platform specific differences in their respective
24+
the docs (https://docs.godotengine.org/en/latest/tutorials/scripting/cpp/build_system/cmake.html)
25+
and platform specific differences in their respective
2526
cmake/<platform>.cmake file.
2627
2728
The file structure and file content are made to match, if not in content then

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
> from Godot's `master` branch.
88
>
99
> For users of stable branches, switch to the branch matching your target Godot version:
10+
> - [`4.5`](https://github.com/godotengine/godot-cpp/tree/4.5)
1011
> - [`4.4`](https://github.com/godotengine/godot-cpp/tree/4.4)
1112
> - [`4.3`](https://github.com/godotengine/godot-cpp/tree/4.3)
1213
> - [`4.2`](https://github.com/godotengine/godot-cpp/tree/4.2)
@@ -62,15 +63,11 @@ See [Updating your GDExtension for 4.1](https://docs.godotengine.org/en/latest/t
6263
## Contributing
6364

6465
We greatly appreciate help in maintaining and extending this project. If you
65-
wish to help out, ensure you have an account on GitHub and create a "fork" of
66-
this repository. See [Pull request workflow](https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html)
67-
for instructions.
68-
69-
Please install clang-format and the [pre-commit](https://pre-commit.com/) Python framework so formatting is done before your changes are submitted. See the [code style guidelines](https://docs.godotengine.org/en/latest/contributing/development/code_style_guidelines.html#pre-commit-hook) for instructions.
66+
wish to help out, please visit the [godot-cpp section of the Contributing docs](https://contributing.godotengine.org/en/latest/other/godot-cpp.html).
7067

7168
## Getting started
7269

73-
You need the same C++ pre-requisites installed that are required for the `godot` repository. Follow the [official build instructions for your target platform](https://docs.godotengine.org/en/latest/contributing/development/compiling/index.html#building-for-target-platforms).
70+
You need the same C++ pre-requisites installed that are required for the `godot` repository. Follow the [official build instructions for your target platform](https://docs.godotengine.org/en/latest/engine_details/development/compiling/index.html).
7471

7572
Getting started with GDExtensions is a bit similar to what it was for 3.x but also a bit different.
7673

binding_generator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2745,12 +2745,12 @@ def correct_typed_dictionary(type_name):
27452745
def correct_type(type_name, meta=None, use_alias=True):
27462746
type_conversion = {"float": "double", "int": "int64_t", "Nil": "Variant"}
27472747
if meta is not None:
2748-
if "int" in meta:
2748+
if meta in ["int8", "int16", "int32", "int64", "uint8", "uint16", "uint32", "uint64"]:
27492749
return f"{meta}_t"
2750-
elif "char" in meta:
2751-
return f"{meta}_t"
2752-
else:
2750+
elif meta in ["float", "double"]:
27532751
return meta
2752+
elif meta in ["char16", "char32"]:
2753+
return f"{meta}_t"
27542754
if type_name in type_conversion:
27552755
return type_conversion[type_name]
27562756
if type_name.startswith("typedarray::"):

cmake/android.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ Android platforms.
2222
2323
.. _built-in support:https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-android
2424
25-
There is further information and examples in the doc/cmake.rst file.
25+
There is further information and examples in the docs: https://docs.godotengine.org/en/latest/tutorials/scripting/cpp/build_system/cmake.html
2626
2727
]=======================================================================]
2828

2929
#[============================[ Android Options ]============================]
3030
function(android_options)
3131
#[[ Options from SCons
3232
33-
The options below are managed by CMake toolchain files, doc.cmake.rst has
34-
more information
33+
The options below are managed by CMake toolchain files, the docs have more information:
34+
https://docs.godotengine.org/en/latest/tutorials/scripting/cpp/build_system/cmake.html
3535
3636
android_api_level : Target Android API level.
3737
Default = 24

cmake/linux.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ function(linux_options)
1212
#[[ Options from SCons
1313
use_llvm : Use the LLVM compiler
1414
Not implemented as compiler selection is managed by CMake. Look to
15-
doc/cmake.rst for examples.
15+
the docs (https://docs.godotengine.org/en/latest/tutorials/scripting/cpp/build_system/cmake.html)
16+
for examples.
1617
]]
1718
option(GODOTCPP_USE_STATIC_CPP "Link libgcc and libstdc++ statically for better portability" ON)
1819
endfunction()

cmake/windows.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ function(windows_options)
6262
Default: True
6363
6464
These three options will not implemented as compiler selection is managed
65-
by CMake toolchain files. Look to doc/cmake.rst for examples.
65+
by CMake toolchain files. Look to the docs
66+
(https://docs.godotengine.org/en/latest/tutorials/scripting/cpp/build_system/cmake.html)
67+
for examples.
6668
use_mingw: Use the MinGW compiler instead of MSVC - only effective on Windows
6769
use_llvm: Use the LLVM compiler (MVSC or MinGW depending on the use_mingw flag
6870
mingw_prefix: MinGW prefix

0 commit comments

Comments
 (0)