From 7efc4247e11c8583012a035b2e0441de66a110f7 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 31 May 2023 13:28:14 +0200 Subject: [PATCH] Initial path setups. --- CMakeLists.txt | 6 +++--- Makefile | 2 +- README.md | 20 ++++++++++---------- SConstruct | 2 +- include/core/Array.hpp | 2 +- include/core/Basis.hpp | 2 +- include/core/Color.hpp | 2 +- include/core/Dictionary.hpp | 2 +- include/core/NodePath.hpp | 2 +- include/core/PoolArrays.hpp | 2 +- include/core/RID.hpp | 2 +- include/core/String.hpp | 2 +- include/core/Variant.hpp | 2 +- include/core/Vector2.hpp | 2 +- include/core/Vector3.hpp | 2 +- include/core/Wrapped.hpp | 2 +- misc/scripts/check_get_file_list.py | 2 +- src/core/Color.cpp | 2 +- src/core/NodePath.cpp | 2 +- src/core/PoolArrays.cpp | 2 +- src/core/RID.cpp | 2 +- src/core/String.cpp | 2 +- src/core/Variant.cpp | 2 +- src/core/Vector2.cpp | 2 +- 24 files changed, 35 insertions(+), 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b91f0d2..2d0de55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # CMAKE_BUILD_TYPE: Compilation target (Debug or Release defaults to Debug) # # godot-cpp cmake arguments -# GODOT_HEADERS_DIR: This is where the gdnative include folder is (godot_source/modules/gdnative/include) +# GODOT_HEADERS_DIR: This is where the gdnative include folder is (godot_source/modules/gdn/include) # GODOT_CUSTOM_API_FILE: This is if you have another path for the godot_api.json # # Android cmake arguments @@ -75,8 +75,8 @@ if(NOT DEFINED BITS) endif() # Input from user for godot headers and the api file -set(GODOT_HEADERS_DIR "godot-headers" CACHE STRING "") -set(GODOT_CUSTOM_API_FILE "godot-headers/api.json" CACHE STRING "") +set(GODOT_HEADERS_DIR "pandemonium_headers" CACHE STRING "") +set(GODOT_CUSTOM_API_FILE "pandemonium_headers/api.json" CACHE STRING "") set(GODOT_COMPILE_FLAGS ) set(GODOT_LINKER_FLAGS ) diff --git a/Makefile b/Makefile index 7429058..cf2593d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ GENERATE_BINDINGS = no -HEADERS = godot-headers +HEADERS = pandemonium_headers TARGET = debug USE_CLANG = no diff --git a/README.md b/README.md index a55cd04..bef08f9 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Godot version.** > As the `master` and `3.x` branches are constantly getting updates, if you are > using `godot-cpp` against a more current version of Godot, see the instructions -> in [**godot-headers**](https://github.com/godotengine/godot-headers) for +> in [**pandemonium_headers**](https://github.com/godotengine/pandemonium_headers) for > updating the relevant files. ## Contributing @@ -51,7 +51,7 @@ We recommend using Git for managing your project. The instructions below assume you're using Git. Alternatively, you can download the source code directly from GitHub. In this case, you need to download both [godot-cpp](https://github.com/godotengine/godot-cpp) and -[godot-headers](https://github.com/godotengine/godot-headers). +[pandemonium_headers](https://github.com/godotengine/pandemonium_headers). ```bash mkdir SimpleLibrary @@ -79,7 +79,7 @@ Right now, our directory structure should look like this: ```text SimpleLibrary/ ├─godot-cpp/ -| └─godot-headers/ +| └─pandemonium_headers/ ├─bin/ └─src/ ``` @@ -91,7 +91,7 @@ Godot core. This metadata is required to generate the C++ binding classes for use in GDNative modules. This file is supplied with our -[godot-headers](https://github.com/godotengine/godot-headers) repository +[pandemonium_headers](https://github.com/godotengine/pandemonium_headers) repository for your convenience. However, if you're running a custom build of Godot and need access to classes that have recent changes, you must generate a new `api.json` file. You do this by starting your Godot executable with the @@ -235,7 +235,7 @@ Once you've compiled the GDNative C++ bindings (see above), you can compile the ```bash cd SimpleLibrary -clang++ -fPIC -o src/init.o -c src/init.cpp -g -O3 -std=c++14 -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Igodot-cpp/godot-headers +clang++ -fPIC -o src/init.o -c src/init.cpp -g -O3 -std=c++14 -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Igodot-cpp/pandemonium_headers clang++ -o bin/libtest.so -shared src/init.o -Lgodot-cpp/bin -l ``` @@ -247,7 +247,7 @@ This creates the file `libtest.so` in your `SimpleLibrary/bin` directory. ```bash cd SimpleLibrary -cl /Fosrc/init.obj /c src/init.cpp /nologo -EHsc -DNDEBUG /MDd /Igodot-cpp\include /Igodot-cpp\include\core /Igodot-cpp\include\gen /Igodot-cpp\godot-headers +cl /Fosrc/init.obj /c src/init.cpp /nologo -EHsc -DNDEBUG /MDd /Igodot-cpp\include /Igodot-cpp\include\core /Igodot-cpp\include\gen /Igodot-cpp\pandemonium_headers link /nologo /dll /out:bin\libtest.dll /implib:bin\libsimple.lib src\init.obj godot-cpp\bin\ ``` @@ -270,7 +270,7 @@ submit a pull request :slightly_smiling_face: ```bash cd SimpleLibrary -aarch64-linux-android29-clang++ -fPIC -o src/init.o -c src/init.cpp -g -O3 -std=c++14 -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Igodot-cpp/godot-headers +aarch64-linux-android29-clang++ -fPIC -o src/init.o -c src/init.cpp -g -O3 -std=c++14 -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Igodot-cpp/pandemonium_headers aarch64-linux-android29-clang++ -o bin/libtest.so -shared src/init.o -Lgodot-cpp/bin -l ``` @@ -284,7 +284,7 @@ GDNative isn't supported on iOS yet. This is because iOS only allows linking static libraries, not dynamic libraries. In theory, it would be possible to link a GDNative library statically, but some of GDNative's convenience would be lost in the process as one would have to recompile the engine on every change. See -[issue #30](https://github.com/godotengine/godot-headers/issues/30) in the +[issue #30](https://github.com/godotengine/pandemonium_headers/issues/30) in the Godot headers repository for more information. #### HTML5 @@ -295,7 +295,7 @@ To build GDNative libraries, you will need a recent version of [Emscripten](http ```bash cd SimpleLibrary -emcc -o bin/libtest.wasm -g -O3 -s SIDE_MODULE=1 src/init.cpp godot-cpp/bin/ -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Igodot-cpp/godot-headers +emcc -o bin/libtest.wasm -g -O3 -s SIDE_MODULE=1 src/init.cpp godot-cpp/bin/ -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Igodot-cpp/pandemonium_headers ``` You'll need to replace `` with the file that was created in [**Compiling the cpp bindings library**](#compiling-the-cpp-bindings-library). @@ -305,7 +305,7 @@ This creates the file `libtest.so` in your `SimpleLibrary/bin` directory. ### Creating `.gdnlib` and `.gdns` files Follow the instructions in -[godot-headers/README.md](https://github.com/godotengine/godot-headers/blob/master/README.md#how-do-i-use-native-scripts-from-the-editor) +[pandemonium_headers/README.md](https://github.com/godotengine/pandemonium_headers/blob/master/README.md#how-do-i-use-native-scripts-from-the-editor) to create the `.gdns` file. This file contains paths to GDNative libraries for various platforms. This makes the library usable from Godot in a platform-independent manner. diff --git a/SConstruct b/SConstruct index f653d54..cfa5ec3 100644 --- a/SConstruct +++ b/SConstruct @@ -129,7 +129,7 @@ opts.Add( PathVariable( "headers_dir", "Path to the directory containing Godot headers", - "godot-headers", + "pandemonium_headers", PathVariable.PathIsDir, ) ) diff --git a/include/core/Array.hpp b/include/core/Array.hpp index 06e70de..255b569 100644 --- a/include/core/Array.hpp +++ b/include/core/Array.hpp @@ -31,7 +31,7 @@ #ifndef ARRAY_H #define ARRAY_H -#include +#include #include "String.hpp" diff --git a/include/core/Basis.hpp b/include/core/Basis.hpp index 719a223..0315ca9 100644 --- a/include/core/Basis.hpp +++ b/include/core/Basis.hpp @@ -31,7 +31,7 @@ #ifndef BASIS_H #define BASIS_H -#include +#include #include "Defs.hpp" diff --git a/include/core/Color.hpp b/include/core/Color.hpp index 0432275..3f13454 100644 --- a/include/core/Color.hpp +++ b/include/core/Color.hpp @@ -31,7 +31,7 @@ #ifndef COLOR_H #define COLOR_H -#include +#include #include diff --git a/include/core/Dictionary.hpp b/include/core/Dictionary.hpp index 7f57587..6537033 100644 --- a/include/core/Dictionary.hpp +++ b/include/core/Dictionary.hpp @@ -35,7 +35,7 @@ #include "Array.hpp" -#include +#include namespace godot { diff --git a/include/core/NodePath.hpp b/include/core/NodePath.hpp index 417320a..9f11827 100644 --- a/include/core/NodePath.hpp +++ b/include/core/NodePath.hpp @@ -33,7 +33,7 @@ #include "String.hpp" -#include +#include namespace godot { diff --git a/include/core/PoolArrays.hpp b/include/core/PoolArrays.hpp index dff9540..f0620f6 100644 --- a/include/core/PoolArrays.hpp +++ b/include/core/PoolArrays.hpp @@ -39,7 +39,7 @@ #include "Vector2.hpp" #include "Vector3.hpp" -#include +#include namespace godot { diff --git a/include/core/RID.hpp b/include/core/RID.hpp index 04bee9c..6cf7857 100644 --- a/include/core/RID.hpp +++ b/include/core/RID.hpp @@ -31,7 +31,7 @@ #ifndef RID_H #define RID_H -#include +#include namespace godot { diff --git a/include/core/String.hpp b/include/core/String.hpp index acee823..c8b4058 100644 --- a/include/core/String.hpp +++ b/include/core/String.hpp @@ -31,7 +31,7 @@ #ifndef STRING_H #define STRING_H -#include +#include namespace godot { diff --git a/include/core/Variant.hpp b/include/core/Variant.hpp index 127ec4d..31b0469 100644 --- a/include/core/Variant.hpp +++ b/include/core/Variant.hpp @@ -31,7 +31,7 @@ #ifndef VARIANT_H #define VARIANT_H -#include +#include #include "Defs.hpp" diff --git a/include/core/Vector2.hpp b/include/core/Vector2.hpp index 73111a6..4bcdac1 100644 --- a/include/core/Vector2.hpp +++ b/include/core/Vector2.hpp @@ -31,7 +31,7 @@ #ifndef VECTOR2_H #define VECTOR2_H -#include +#include #include "Defs.hpp" diff --git a/include/core/Vector3.hpp b/include/core/Vector3.hpp index ac3c7d5..27dee73 100644 --- a/include/core/Vector3.hpp +++ b/include/core/Vector3.hpp @@ -31,7 +31,7 @@ #ifndef VECTOR3_H #define VECTOR3_H -#include +#include #include "Defs.hpp" diff --git a/include/core/Wrapped.hpp b/include/core/Wrapped.hpp index 003a178..8335d29 100644 --- a/include/core/Wrapped.hpp +++ b/include/core/Wrapped.hpp @@ -31,7 +31,7 @@ #ifndef WRAPPED_HPP #define WRAPPED_HPP -#include +#include namespace godot { diff --git a/misc/scripts/check_get_file_list.py b/misc/scripts/check_get_file_list.py index 4295504..718fe63 100755 --- a/misc/scripts/check_get_file_list.py +++ b/misc/scripts/check_get_file_list.py @@ -8,7 +8,7 @@ sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "..")) from binding_generator import get_file_list, generate_bindings -api_filepath = "godot-headers/api.json" +api_filepath = "pandemonium_headers/api.json" bits = "64" double = "float" output_dir = "self_test" diff --git a/src/core/Color.cpp b/src/core/Color.cpp index e0d4772..ead4094 100644 --- a/src/core/Color.cpp +++ b/src/core/Color.cpp @@ -32,7 +32,7 @@ #include "Defs.hpp" #include "String.hpp" -#include +#include #include namespace godot { diff --git a/src/core/NodePath.cpp b/src/core/NodePath.cpp index 3d291e3..0b4d04e 100644 --- a/src/core/NodePath.cpp +++ b/src/core/NodePath.cpp @@ -32,7 +32,7 @@ #include "GodotGlobal.hpp" #include "String.hpp" -#include +#include namespace godot { diff --git a/src/core/PoolArrays.cpp b/src/core/PoolArrays.cpp index aefacfd..544844f 100644 --- a/src/core/PoolArrays.cpp +++ b/src/core/PoolArrays.cpp @@ -36,7 +36,7 @@ #include "Vector2.hpp" #include "Vector3.hpp" -#include +#include namespace godot { diff --git a/src/core/RID.cpp b/src/core/RID.cpp index 88bc071..11a7ca4 100644 --- a/src/core/RID.cpp +++ b/src/core/RID.cpp @@ -30,7 +30,7 @@ #include "RID.hpp" -#include +#include #include "GodotGlobal.hpp" diff --git a/src/core/String.cpp b/src/core/String.cpp index a7977ab..5e76132 100644 --- a/src/core/String.cpp +++ b/src/core/String.cpp @@ -36,7 +36,7 @@ #include "PoolArrays.hpp" #include "Variant.hpp" -#include +#include #include diff --git a/src/core/Variant.cpp b/src/core/Variant.cpp index d72e7c5..55f661b 100644 --- a/src/core/Variant.cpp +++ b/src/core/Variant.cpp @@ -30,7 +30,7 @@ #include "Variant.hpp" -#include +#include #include "CoreTypes.hpp" #include "Defs.hpp" diff --git a/src/core/Vector2.cpp b/src/core/Vector2.cpp index 4e70465..4dc1d75 100644 --- a/src/core/Vector2.cpp +++ b/src/core/Vector2.cpp @@ -30,7 +30,7 @@ #include "Vector2.hpp" -#include +#include #include "String.hpp"