Merge branch 'main' into Ivorforce-patch-action

Lukas Tenbrink 2024-10-03 09:02:06 +02:00 committed by GitHub
commit 0aad5148be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 29 additions and 25 deletions

View File

@ -122,5 +122,5 @@ runs:
env:
SCONS_CACHE: ${{ github.workspace }}/${{ inputs.gdextension_folder }}${{ inputs.scons-cache }}
run: |
scons target=${{ inputs.build-target-type }} platform=${{ inputs.platform }} arch=${{ inputs.arch }} precision=${{ inputs.float-precision }} production=yes
scons target=${{ inputs.build-target-type }} platform=${{ inputs.platform }} arch=${{ inputs.arch }} precision=${{ inputs.float-precision }}
working-directory: ${{ inputs.gdextension_folder }}

3
.gitignore vendored
View File

@ -24,6 +24,9 @@ custom.py
# Ignore generated compile_commands.json
compile_commands.json
# Ignore files generated for documentation
/src/gen
# Binaries
*.o
*.os

View File

@ -22,7 +22,7 @@ For getting started after cloning your own copy to your local machine, you shoul
* change the pathnames of the to be loaded library name inside the `demo/bin/example.gdextension` file. By replacing `libgdexample` to the name specified in your `SConstruct` file.
* change the name of the `demo/bin/example.gdextension` file
* change the `entry_symbol` string inside your `demo/bin/your-extension.gdextension` file to be configured for your GDExtension name. This should be the same as the `GDExtensionBool GDE_EXPORT` external C function. As the name suggests, this sets the entry function for your GDExtension to be loaded by the Godot editors C API.
* register the classes you want Godot to interact with inside the `register_types.cpp` file in the initialization method (here `initialize_gdextension_types`) in the syntax `ClassDB::register_class<CLASS-NAME>();`.
* register the classes you want Godot to interact with inside the `register_types.cpp` file in the initialization method (here `initialize_gdextension_types`) in the syntax `GDREGISTER_CLASS(CLASS-NAME);`.
## Usage - Actions

View File

@ -77,18 +77,19 @@ if env["target"] in ["editor", "template_debug"]:
print("Not including class reference as we're targeting a pre-4.3 baseline.")
file = "{}{}{}".format(libname, env["suffix"], env["SHLIBSUFFIX"])
filepath = ""
if env["platform"] == "macos" or env["platform"] == "ios":
platlibname = "{}.{}.{}".format(libname, env["platform"], env["target"])
file = "{}.framework/{}".format(env["platform"], platlibname, platlibname)
filepath = "{}.framework/".format(env["platform"])
file = "{}.{}.{}".format(libname, env["platform"], env["target"])
libraryfile = "bin/{}/{}".format(env["platform"], file)
libraryfile = "bin/{}/{}{}".format(env["platform"], filepath, file)
library = env.SharedLibrary(
libraryfile,
source=sources,
)
copy = env.InstallAs("{}/bin/{}/lib{}".format(projectdir, env["platform"], file), library)
copy = env.InstallAs("{}/bin/{}/{}lib{}".format(projectdir, env["platform"], filepath, file), library)
default_args = [library, copy]
if localEnv.get("compiledb", False):

View File

@ -5,21 +5,21 @@ compatibility_minimum = "4.1"
[libraries]
macos.debug = "res://bin/libgdexample.macos.template_debug.framework"
macos.release = "res://bin/libgdexample.macos.template_release.framework"
ios.debug = "res://bin/libgdexample.ios.template_debug.framework"
ios.release = "res://bin/libgdexample.ios.template_release.framework"
windows.debug.x86_32 = "res://bin/libgdexample.windows.template_debug.x86_32.dll"
windows.release.x86_32 = "res://bin/libgdexample.windows.template_release.x86_32.dll"
windows.debug.x86_64 = "res://bin/libgdexample.windows.template_debug.x86_64.dll"
windows.release.x86_64 = "res://bin/libgdexample.windows.template_release.x86_64.dll"
linux.debug.x86_64 = "res://bin/libgdexample.linux.template_debug.x86_64.so"
linux.release.x86_64 = "res://bin/libgdexample.linux.template_release.x86_64.so"
linux.debug.arm64 = "res://bin/libgdexample.linux.template_debug.arm64.so"
linux.release.arm64 = "res://bin/libgdexample.linux.template_release.arm64.so"
linux.debug.rv64 = "res://bin/libgdexample.linux.template_debug.rv64.so"
linux.release.rv64 = "res://bin/libgdexample.linux.template_release.rv64.so"
android.debug.x86_64 = "res://bin/libgdexample.android.template_debug.x86_64.so"
android.release.x86_64 = "res://bin/libgdexample.android.template_release.x86_64.so"
android.debug.arm64 = "res://bin/libgdexample.android.template_debug.arm64.so"
android.release.arm64 = "res://bin/libgdexample.android.template_release.arm64.so"
macos.debug = "res://bin/macos/macos.framework/libEXTENSION-NAME.macos.template_debug"
macos.release = "res://bin/macos/macos.framework/libEXTENSION-NAME.macos.template_release"
ios.debug = "res://bin/ios/ios.framework/libEXTENSION-NAME.ios.template_debug"
ios.release = "res://bin/ios/ios.framework/libEXTENSION-NAME.ios.template_release"
windows.debug.x86_32 = "res://bin/windows/libEXTENSION-NAME.windows.template_debug.x86_32.dll"
windows.release.x86_32 = "res://bin/windows/libEXTENSION-NAME.windows.template_release.x86_32.dll"
windows.debug.x86_64 = "res://bin/windows/libEXTENSION-NAME.windows.template_debug.x86_64.dll"
windows.release.x86_64 = "res://bin/windows/libEXTENSION-NAME.windows.template_release.x86_64.dll"
linux.debug.x86_64 = "res://bin/linux/libEXTENSION-NAME.linux.template_debug.x86_64.so"
linux.release.x86_64 = "res://bin/linux/libEXTENSION-NAME.linux.template_release.x86_64.so"
linux.debug.arm64 = "res://bin/linux/libEXTENSION-NAME.linux.template_debug.arm64.so"
linux.release.arm64 = "res://bin/linux/libEXTENSION-NAME.linux.template_release.arm64.so"
linux.debug.rv64 = "res://bin/linux/libEXTENSION-NAME.linux.template_debug.rv64.so"
linux.release.rv64 = "res://bin/linux/libEXTENSION-NAME.linux.template_release.rv64.so"
android.debug.x86_64 = "res://bin/android/libEXTENSION-NAME.android.template_debug.x86_64.so"
android.release.x86_64 = "res://bin/android/libEXTENSION-NAME.android.template_release.x86_64.so"
android.debug.arm64 = "res://bin/android/libEXTENSION-NAME.android.template_debug.arm64.so"
android.release.arm64 = "res://bin/android/libEXTENSION-NAME.android.template_release.arm64.so"

View File

@ -11,7 +11,7 @@ void initialize_gdextension_types(ModuleInitializationLevel p_level)
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
return;
}
//ClassDB::register_class<YourClass>();
//GDREGISTER_CLASS(YourClass);
}
void uninitialize_gdextension_types(ModuleInitializationLevel p_level) {