feat: configured template
parent
fe487ab9ac
commit
6725458795
|
@ -47,4 +47,5 @@ compile_commands.json
|
|||
|
||||
# VSCode
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
!.vscode/extensions.json
|
||||
.cache/
|
||||
|
|
|
@ -2,3 +2,6 @@
|
|||
path = godot-cpp
|
||||
url = https://git.saragerretsen.nl/Sara/godot-cpp.git
|
||||
branch = 4.0
|
||||
[submodule "godot-cpp-utils"]
|
||||
path = godot-cpp-utils
|
||||
url = https://git.saragerretsen.nl/Sara/godot-cpp-utils.git
|
||||
|
|
|
@ -11,8 +11,8 @@ def validate_parent_dir(key, val, env):
|
|||
raise UserError("'%s' is not a directory: %s" % (key, os.path.dirname(val)))
|
||||
|
||||
|
||||
libname = "EXTENSION-NAME"
|
||||
projectdir = "demo"
|
||||
libname = "pvb-practice"
|
||||
projectdir = "godot"
|
||||
|
||||
localEnv = Environment(tools=["default"], PLATFORM="")
|
||||
|
||||
|
@ -50,8 +50,8 @@ env.Alias("compiledb", compilation_db)
|
|||
|
||||
env = SConscript("godot-cpp/SConstruct", {"env": env, "customs": customs})
|
||||
|
||||
env.Append(CPPPATH=["src/"])
|
||||
sources = Glob("src/*.cpp")
|
||||
env.Append(CPPPATH=["src/", "godot-cpp-utils"])
|
||||
sources = Glob("src/*.cpp") + Glob("godot-cpp-utils/*.cpp")
|
||||
|
||||
file = "{}{}{}".format(libname, env["suffix"], env["SHLIBSUFFIX"])
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 0230e4e1098bbf9d4d28bc6ff4174d1c8051d140
|
|
@ -1,23 +0,0 @@
|
|||
[configuration]
|
||||
|
||||
entry_symbol = "example_library_init"
|
||||
compatibility_minimum = "4.1"
|
||||
|
||||
[libraries]
|
||||
|
||||
macos.debug = "res://bin/libgdexample.macos.template_debug.framework"
|
||||
macos.release = "res://bin/libgdexample.macos.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"
|
|
@ -0,0 +1,23 @@
|
|||
[configuration]
|
||||
|
||||
entry_symbol = "pvb_practice_init"
|
||||
compatibility_minimum = "4.1"
|
||||
|
||||
[libraries]
|
||||
|
||||
macos.debug = "res://bin/macos/libpvb-practice.macos.template_debug.framework"
|
||||
macos.release = "res://bin/macos/libpvb-practice.macos.template_release.framework"
|
||||
windows.debug.x86_32 = "res://bin/windows/libpvb-practice.windows.template_debug.x86_32.dll"
|
||||
windows.release.x86_32 = "res://bin/windows/libpvb-practice.windows.template_release.x86_32.dll"
|
||||
windows.debug.x86_64 = "res://bin/windows/libpvb-practice.windows.template_debug.x86_64.dll"
|
||||
windows.release.x86_64 = "res://bin/windows/libpvb-practice.windows.template_release.x86_64.dll"
|
||||
linux.debug.x86_64 = "res://bin/linux/libpvb-practice.linux.template_debug.x86_64.so"
|
||||
linux.release.x86_64 = "res://bin/linux/libpvb-practice.linux.template_release.x86_64.so"
|
||||
linux.debug.arm64 = "res://bin/linux/libpvb-practice.linux.template_debug.arm64.so"
|
||||
linux.release.arm64 = "res://bin/linux/libpvb-practice.linux.template_release.arm64.so"
|
||||
linux.debug.rv64 = "res://bin/linux/libpvb-practice.linux.template_debug.rv64.so"
|
||||
linux.release.rv64 = "res://bin/linux/libpvb-practice.linux.template_release.rv64.so"
|
||||
android.debug.x86_64 = "res://bin/android/libpvb-practice.android.template_debug.x86_64.so"
|
||||
android.release.x86_64 = "res://bin/android/libpvb-practice.android.template_release.x86_64.so"
|
||||
android.debug.arm64 = "res://bin/android/libpvb-practice.android.template_debug.arm64.so"
|
||||
android.release.arm64 = "res://bin/android/libpvb-practice.android.template_release.arm64.so"
|
|
@ -11,5 +11,5 @@ config_version=5
|
|||
[application]
|
||||
|
||||
config/name="godot cpp template"
|
||||
config/features=PackedStringArray("4.1", "Forward Plus")
|
||||
config/features=PackedStringArray("4.2", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
|
|
@ -23,7 +23,7 @@ void uninitialize_gdextension_types(ModuleInitializationLevel p_level) {
|
|||
extern "C"
|
||||
{
|
||||
// Initialization
|
||||
GDExtensionBool GDE_EXPORT example_library_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization)
|
||||
GDExtensionBool GDE_EXPORT pvb_practice_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization)
|
||||
{
|
||||
GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);
|
||||
init_obj.register_initializer(initialize_gdextension_types);
|
||||
|
@ -32,4 +32,4 @@ extern "C"
|
|||
|
||||
return init_obj.init();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef EXAMPLE_REGISTER_TYPES_H
|
||||
#define EXAMPLE_REGISTER_TYPES_H
|
||||
|
||||
void initialize_gdextension_types();
|
||||
void uninitialize_gdextension_types();
|
||||
extern void initialize_gdextension_types();
|
||||
extern void uninitialize_gdextension_types();
|
||||
|
||||
#endif // EXAMPLE_REGISTER_TYPES_H
|
||||
#endif // EXAMPLE_REGISTER_TYPES_H
|
||||
|
|
Loading…
Reference in New Issue