Initial path setups.

This commit is contained in:
Relintai 2023-05-31 13:28:14 +02:00
parent ab52f40a24
commit 7efc4247e1
24 changed files with 35 additions and 35 deletions

View File

@ -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 )

View File

@ -1,5 +1,5 @@
GENERATE_BINDINGS = no
HEADERS = godot-headers
HEADERS = pandemonium_headers
TARGET = debug
USE_CLANG = no

View File

@ -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<name of the godot-cpp>
```
@ -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\<name of the godot-cpp>
```
@ -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<name of the godot-cpp>
```
@ -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/<name of the godot-cpp> -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/<name of the godot-cpp> -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Igodot-cpp/pandemonium_headers
```
You'll need to replace `<name of the godot-cpp>` 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.

View File

@ -129,7 +129,7 @@ opts.Add(
PathVariable(
"headers_dir",
"Path to the directory containing Godot headers",
"godot-headers",
"pandemonium_headers",
PathVariable.PathIsDir,
)
)

View File

@ -31,7 +31,7 @@
#ifndef ARRAY_H
#define ARRAY_H
#include <gdnative/array.h>
#include <gdn/array.h>
#include "String.hpp"

View File

@ -31,7 +31,7 @@
#ifndef BASIS_H
#define BASIS_H
#include <gdnative/basis.h>
#include <gdn/basis.h>
#include "Defs.hpp"

View File

@ -31,7 +31,7 @@
#ifndef COLOR_H
#define COLOR_H
#include <gdnative/color.h>
#include <gdn/color.h>
#include <cmath>

View File

@ -35,7 +35,7 @@
#include "Array.hpp"
#include <gdnative/dictionary.h>
#include <gdn/dictionary.h>
namespace godot {

View File

@ -33,7 +33,7 @@
#include "String.hpp"
#include <gdnative/node_path.h>
#include <gdn/node_path.h>
namespace godot {

View File

@ -39,7 +39,7 @@
#include "Vector2.hpp"
#include "Vector3.hpp"
#include <gdnative/pool_arrays.h>
#include <gdn/pool_arrays.h>
namespace godot {

View File

@ -31,7 +31,7 @@
#ifndef RID_H
#define RID_H
#include <gdnative/rid.h>
#include <gdn/rid.h>
namespace godot {

View File

@ -31,7 +31,7 @@
#ifndef STRING_H
#define STRING_H
#include <gdnative/string.h>
#include <gdn/string.h>
namespace godot {

View File

@ -31,7 +31,7 @@
#ifndef VARIANT_H
#define VARIANT_H
#include <gdnative/variant.h>
#include <gdn/variant.h>
#include "Defs.hpp"

View File

@ -31,7 +31,7 @@
#ifndef VECTOR2_H
#define VECTOR2_H
#include <gdnative/vector2.h>
#include <gdn/vector2.h>
#include "Defs.hpp"

View File

@ -31,7 +31,7 @@
#ifndef VECTOR3_H
#define VECTOR3_H
#include <gdnative/vector3.h>
#include <gdn/vector3.h>
#include "Defs.hpp"

View File

@ -31,7 +31,7 @@
#ifndef WRAPPED_HPP
#define WRAPPED_HPP
#include <gdnative/gdnative.h>
#include <gdn/gdnative.h>
namespace godot {

View File

@ -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"

View File

@ -32,7 +32,7 @@
#include "Defs.hpp"
#include "String.hpp"
#include <gdnative/color.h>
#include <gdn/color.h>
#include <cmath>
namespace godot {

View File

@ -32,7 +32,7 @@
#include "GodotGlobal.hpp"
#include "String.hpp"
#include <gdnative/node_path.h>
#include <gdn/node_path.h>
namespace godot {

View File

@ -36,7 +36,7 @@
#include "Vector2.hpp"
#include "Vector3.hpp"
#include <gdnative/pool_arrays.h>
#include <gdn/pool_arrays.h>
namespace godot {

View File

@ -30,7 +30,7 @@
#include "RID.hpp"
#include <gdnative/rid.h>
#include <gdn/rid.h>
#include "GodotGlobal.hpp"

View File

@ -36,7 +36,7 @@
#include "PoolArrays.hpp"
#include "Variant.hpp"
#include <gdnative/string.h>
#include <gdn/string.h>
#include <string.h>

View File

@ -30,7 +30,7 @@
#include "Variant.hpp"
#include <gdnative/variant.h>
#include <gdn/variant.h>
#include "CoreTypes.hpp"
#include "Defs.hpp"

View File

@ -30,7 +30,7 @@
#include "Vector2.hpp"
#include <gdnative/vector2.h>
#include <gdn/vector2.h>
#include "String.hpp"