Commit Graph

1467 Commits (9e7cec9f421fd3adc61f934a3bfe3ba04f6ece2f)

Author SHA1 Message Date
Dragos Daian 9e7cec9f42 Generate godot compat for dual build
generate compat

generate compat

Update ci.yml

Update binding_generator.py

generate compat

generate compat

lint python files

Update compat_generator.py

update docs

Update binding_generator.py

Update module_converter.py

also collect defines

Add module converter file that converts module based projects to godot_compat

Update ci.yml

update docs

Update compat_generator.py

lint python files

generate compat

generate compat

generate compat

generate compat

Update ci.yml

fix path issue when caling from outside

Update binding_generator.py

update to also take missing classes/structs

Update binding_generator.py

Generate godot compat for dual build

generate compat

generate compat

Update ci.yml

Update binding_generator.py

generate compat

generate compat

lint python files

Update compat_generator.py

update docs

Update binding_generator.py

Update module_converter.py

also collect defines

Add module converter file that converts module based projects to godot_compat

Update ci.yml

update docs

Update compat_generator.py

lint python files

generate compat

generate compat

generate compat

generate compat

Update ci.yml

fix path issue when caling from outside

Add support for build profiles.

Allow enabling or disabling specific classes (which will not be built).

Allow forwarding from `ClassDB` to `ClassDBSingleton` to support enumerations

update to also take missing classes/structs

Update binding_generator.py

update

update naming of files

add godot mappings.

update and run output_header_mapping.json

Update README.md

make godot_compat work without a file generated

fix the test

Update binding_generator.py

Update binding_generator.py

Update binding_generator.py

use files from include too

Update README.md

lint

lint

lint

Update CMakeLists.txt

update to use all. fix linting a bit

update wip

fix posix path

Update CMakeLists.txt

Update binding_generator.py

add using namespace godot; everywhere to includes

fix includes

Try fixes.

generate new include files 123

Update binding_generator.py

Update binding_generator.py

Update binding_generator.py

Update binding_generator.py

update

fix GODOT_MODULE_COMPAT

fix manual includes to match.

Update godot.hpp

Update color_names.inc.hpp
2024-10-31 12:03:34 +01:00
David Snopek 56571dc584
Merge pull request #1632 from dsnopek/4.3-cherrypicks-2
Cherry-picks for the godot-cpp 4.3 branch - 2nd batch
2024-10-30 09:38:31 -05:00
Florent Guiocheau 94d74979ce Add p_use_model_front to Basis::looking_at()
(cherry picked from commit 02fd535454)
2024-10-28 16:32:13 -05:00
Thaddeus Crews bf26191ead SCons: Don't cache librarys
(cherry picked from commit 83c0f15ab9)
2024-10-28 16:32:02 -05:00
Fabio Alessandrelli af78f2778f [SCons] Enable WASM_BIGINT in web builds
Required since Godot 4.3, which is also the first Godot version with
wide WASM gdnative support (previous versions were Chrome-only, and very
brittle).

(cherry picked from commit 78498da7c3)
2024-10-28 16:31:51 -05:00
Fabio Alessandrelli 30a395bf43 [SCons] Remove use_clang_cl windows flag in favor of generic use_llvm
This is consistent with Godot upstream.

(cherry picked from commit 4717a78144)
2024-10-28 16:31:40 -05:00
Samuel Nicholas a3d5d6d4d3 VSProj Configure type on build command - to resolve #1582
Visual Studio projects are multi-config projects like Ninja-MultiConfig which means you can't set the configuration at configure time as there are multiple, it always chooses the first one by default when not specified in the build command.

Instead of this:
cmake -DCMAKE_BUILD_TYPE=Release -G"Visual Studio 17 2022" .
cmake --build . --verbose

It should be this
cmake -G"Visual Studio 17 2022" .
cmake --build . --verbose --config Release

Update ci.yml

Because the current build system doesnt use generator expressions for multi config builds, both the CMAKE_BUILD_TYPE and the build --config options need to be set

(cherry picked from commit 07704f8f48)
2024-10-28 16:31:31 -05:00
Samuel Nicholas e751531290 update .gitignore to add .idea for the Jetbrains CLion IDE
and also the default cmake build directory when building in clion cmake-build-*

(cherry picked from commit 9f5daa2d90)
2024-10-28 16:31:22 -05:00
Samuel Nicholas 2de650b82a Re-Structure cmake solution to be closer to the scons solution.
This is just a single step, re-arranging the code without actually changing its functionality.

new docs/cmake.md
moved the block of comments from the start of the CMakeLists.txt into the cmake.md file and converted content to markdown.

new cmake/godotcpp.cmake
Moved all exposed options into a new function godotcpp_options()
Moved configuration and generation code into godotcpp_generate()

To get all the options into the godotcpp_options() I changed the logic of GODOT_USE_HOT_RELOAD which I believe is a closer match to scons, that if the options is not set, and the build type is not release, then it defaults to ON.

I msvc builds require the default flags to be modified or it will throw errors. I have added the links to articles in the commit, but its about removing the runtime error checks /RTC1 from the CMAKE_CXX_FLAGS_DEBUG variable. This needs to happen before the files are included.
https://stackoverflow.com/questions/74426638/how-to-remove-rtc1-from-specific-target-or-file-in-cmake
https://discourse.cmake.org/t/how-do-i-remove-compile-options-from-target/5965

Renamed GodotCompilerWarnings.cmake to common_compiler_flags.cmake to match scons

Included files explicitly by path, as we dont need to append to the CMAKE_MODULES_PATH which effects the whole build tree.

This prevents consumers of the library from clobbering the names of the cmake include files and breaking the build.

(cherry picked from commit 2402a044eb)
2024-10-28 16:31:12 -05:00
David Snopek 5fe58bcd1e Correctly set instance bindings on reload
(cherry picked from commit cb543c192a)
2024-10-28 16:31:03 -05:00
Samuel Nicholas daf8ac1c33 Updated all variable names to use GODOT_ prefix
changed cache type for api file and api dir to FILEPATH and PATH respectively.
Minor whitespace.
docstring parity

(cherry picked from commit 390a9a5590)
2024-10-28 16:30:54 -05:00
Samuel Nicholas b12aeb1b38 Add GODOT_SYMBOL_VISIBILITY cache variable to match scons interface.
(cherry picked from commit 02bdc6665a)
2024-10-28 16:30:45 -05:00
Andreas Pokorny fa0b4cffc0 Add visibility-hidden
This should make all symbols that are not marked otherwise have hidden
visibility. There still may be exposed symbols if marked with respective
attributes.

(cherry picked from commit d18fa929fb)
2024-10-28 16:30:35 -05:00
ytnuf e52b4ea4fd Add hot reload support when building with GCC and CMake
(cherry picked from commit 05571971cc)
2024-10-28 16:30:21 -05:00
bruvzg 20459da676 Add support for LLVM/MinGW and ARM64 Windows builds.
(cherry picked from commit f2353da5a3)
2024-10-28 16:30:12 -05:00
David Snopek 1cce4d15ab
Merge pull request #1592 from dsnopek/4.3-revert-unexpose-is-instance-valid
[4.3] Revert "Unexpose `UtilityFunctions::is_instance_valid()`"
2024-09-23 10:46:45 -05:00
David Snopek 17ca325aeb Revert "Unexpose `UtilityFunctions::is_instance_valid()`"
This reverts commit 56cd3fd99e.
2024-09-17 10:03:25 -05:00
David Snopek e298f430b5
Merge pull request #1569 from dsnopek/4.3-cherrypicks-1
Cherry-picks for the godot-cpp 4.3 branch - 1st batch
2024-09-11 17:17:24 -05:00
David Snopek 1ac33c906e Add a test to ensure that library path is absolute
(cherry picked from commit 92ace04989)
2024-09-03 16:35:55 -05:00
George L. Albany 842a7f621f Fix GCC 14 -Wtemplate-id-cdtor warning
As was fixed with godotengine/godot#91208

(cherry picked from commit 7b31f39bea)
2024-09-03 16:35:31 -05:00
Fabio Alessandrelli 37d255af6c [Web/SCons] Use CCFLAGS for SIDE_MODULE option
Was using CPPFLAGS, but should use the explicit scons CCFLAGS which
makes it clear they are applied to both the C and C++ compiler.

CPPFLAGS was also fine (they are preprocessor flags, also applied to
both C and C++), but we should try to stay consistent with what we do
in Godot.

(cherry picked from commit f36acd8e31)
2024-09-03 16:35:21 -05:00
Aaron Franke 762db4e4d6 Fix missing MAKE_TYPED_ARRAY_INFO for Packed*Arrays
(cherry picked from commit 10c3d1bc5f)
2024-09-03 16:35:11 -05:00
Raul Santos c823e84ff2 Correct type for `char16` and `char32` meta 2024-09-03 16:35:02 -05:00
Mikael Hermansson 26cb3292a0 Fix incorrect generation of some C++ operators 2024-09-03 16:34:54 -05:00
Raul Santos 150e45071b Avoid hardcoded type conversion for metadata
The engine uses the names `int` and `float` to refer to the 64-bit types, so in the bindings generator we have a hardcoded conversion for those types.

But this type conversion should not be used for metadata. Even though the underlying type should still be 64-bit for interop, metadata is meant to specify the correct type to expose. So if metadata says `float` it means the type is really meant to be a 32-bit `float` and not `double`. Other hardcoded type conversions (`int` and `Nil`) won't ever be metadata.

This change corrects the `float` type, to use the right type in the generated C++ code. Before we were always using `double` due to this type conversion.

(cherry picked from commit 4829199081)
2024-09-03 16:34:41 -05:00
David Snopek fbbf9ec4ef
Merge pull request #1550 from Naros/sync-4.3-stable
gdextension: Sync with upstream commit 77dcf97d82cbfe4e4615475fa52ca03da645dbd8 (4.3-stable)
2024-08-15 06:27:31 -05:00
Chris Cranford 2e4c350b83 gdextension: Sync with upstream commit 77dcf97d82cbfe4e4615475fa52ca03da645dbd8 (4.3-stable) 2024-08-15 05:53:22 -04:00
David Snopek 9b98377a62
Merge pull request #1546 from aaronfranke/fix-vec4arr
Fix missing type info for PackedVector4Array
2024-08-11 06:19:28 -05:00
Aaron Franke 92e6ea7303
Fix missing type info for PackedVector4Array 2024-08-10 21:21:13 -07:00
David Snopek 11773e52b0 gdextension: Sync with upstream commit 03afb92efa18874da19f7fc185a32c005d20aa1d (4.3-rc3) 2024-08-09 08:44:03 -05:00
David Snopek 937b1d809a
Merge pull request #1545 from Klaim/warnings_gdclass
Removes warnings generated by GDCLASS usage
2024-08-08 09:13:51 -05:00
Klaim (Joël Lamotte) 738859f49b removes warnings generated by GDCLASS usage
This change removes the warnings (unused parameters) coming from code injected by the GDCLASS macro.
Contrary to warnings coming from the normal source code which can be suppressed with most compiles by specifying the include directories of this library as external or system,
when the code is injected through a macro it is considered in the context of the user, which is the source code of user of the library.
That forces the users to modify their code to hide the warnings coming from the mandatory `GDCLASS` here.
That's why it's important to remove these warning from that specific macro and ideally any other macro that the user must use.
2024-08-08 02:46:28 +02:00
David Snopek 9da1e0cee1
Merge pull request #1543 from Calinou/readme-use-github-admonition-syntax
Use GitHub admonition syntax for the warning in README
2024-08-07 15:54:36 -05:00
David Snopek 3f4590f8e1
Merge pull request #1539 from Naros/dispatch-get-set-up-hierarchy
Make sure `_get` and `_set` dispatch up the class hierarchy
2024-08-07 15:53:54 -05:00
David Snopek e3e8101e8c
Merge pull request #1330 from pimms/cmake-hot-reload
Add hot reload support to CMakeLists.txt
2024-08-07 15:53:35 -05:00
Hugo Locurcio 26459dc47b
Use GitHub admonition syntax for the warning in README 2024-08-05 19:31:32 +02:00
David Snopek daf6ad3649 gdextension: Sync with upstream commit 3978628c6cc1227250fc6ed45c8d854d24c30c30 (4.3-rc2) 2024-08-02 09:39:49 -05:00
Chris Cranford c77d44f3f6 Make sure `_get` and `_set` dispatch up the class hierarchy 2024-08-01 12:03:27 -04:00
David Snopek f2b521f55a
Merge pull request #1530 from akien-mga/py-two-old
SCons: Remove old Python 2 compat code
2024-07-24 09:06:01 -05:00
David Snopek 628606b28b
Merge pull request #1519 from AThousandShips/cache_improve
[CI] Upload build cache before running tests
2024-07-24 09:05:48 -05:00
Rémi Verschelde 958776dfc3
SCons: Remove old Python 2 compat code 2024-07-18 10:37:47 +02:00
David Snopek 0a1e31fa45
Merge pull request #1513 from dsnopek/unexpose-is-instance-valid
Unexpose `UtilityFunctions::is_instance_valid()`
2024-07-15 12:16:21 -05:00
David Snopek 8012716ee3
Merge pull request #1510 from dsnopek/memnew-better-crash-message
Remind developers about `memnew()` in crash message when missing binding callbacks
2024-07-15 12:15:53 -05:00
A Thousand Ships 76b38de01a
[CI] Upload build cache before running tests 2024-07-13 16:25:12 +02:00
David Snopek 6d939e6878
Merge pull request #1509 from YuriSizov/method-bind-is-off-by-one
Fix argument metadata when binding methods
2024-07-06 11:42:45 -05:00
David Snopek 56cd3fd99e Unexpose `UtilityFunctions::is_instance_valid()` 2024-07-01 12:29:28 -05:00
David Snopek 99926d8e20
Merge pull request #1483 from AThousandShips/arr_typed_fix
Fix sharing of typed arrays from constructor
2024-06-28 07:26:44 -05:00
David Snopek e65ec904b8 Remind developers about `memnew()` in crash message when missing binding callbacks 2024-06-27 13:09:24 -05:00
Yuri Sizov 2b34bd0d8b Fix argument metadata when binding methods
While there doesn't seem to be any runtime issues,
this triggers the address sanitizer in a few ways,
depending on what kind of method you're
binding.
2024-06-27 18:40:29 +02:00
David Snopek 53b546e1df
Merge pull request #1507 from Repiteo/silence-msvc
SCons: Add `silence_msvc` option for Windows
2024-06-25 17:45:33 -05:00