From cbc5d1ef8bd153a710c7c1b056dd7bd432a28120 Mon Sep 17 00:00:00 2001 From: Andrew Luchuk Date: Sat, 14 Mar 2026 13:57:56 -0400 Subject: [PATCH] Enable base template to be compiled --- .gitignore | 206 ++++++++++++++++++++++++++++++++++++++++- SConstruct | 2 +- src/register_types.cpp | 6 +- src/register_types.h | 2 + 4 files changed, 213 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2dd9f84..197b19d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,207 @@ demo/bin -.idea \ No newline at end of file +.idea +# Godot auto generated files +*.gen.* +.import/ +.godot/ +/gen/ + +# Godot 3.x ignores +include/gen +src/gen + +# Build configuration. +/custom.py + +# Misc +logs/* +*.log + +# The default cache directory +cache/ + +# Binaries +*.o +*.os +*.so +*.obj +*.bc +*.pyc +*.dblite +*.pdb +*.lib +bin +*.config +*.creator +*.creator.user +*.files +*.includes +*.idb + +# Gprof output +gmon.out + +# Vim temp files +*.swo +*.swp + +# Qt project files +*.config +*.creator +*.creator.* +*.files +*.includes +*.cflags +*.cxxflags + +# Eclipse CDT files +.cproject +.settings/ + +# Geany/geany-plugins files +*.geany +.geanyprj + +# Misc +.DS_Store +logs/ + +# for projects that use SCons for building: http://http://www.scons.org/ +.sconf_temp +.sconsign.dblite +*.pyc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.opendb +*.VC.VC.opendb +enc_temp_folder/ + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# CodeLite project files +*.project +*.workspace +.codelite/ + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.[Cc]ache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +__pycache__/ + +# KDE +.directory + +#Kdevelop project files +*.kdev4 + +# xCode +xcuserdata + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ +logo.h +*.autosave + +# https://github.com/github/gitignore/blob/master/Global/Tags.gitignore +# Ignore tags created by etags, ctags, gtags (GNU global) and cscope +TAGS +!TAGS/ +tags +*.tags +!tags/ +gtags.files +GTAGS +GRTAGS +GPATH +cscope.files +cscope.out +cscope.in.out +cscope.po.out +godot.creator.* + +# Visual Studio 2017 and Visual Studio Code workspace folder +/.vs +/.vscode + +# Visual Studio Code workspace file +*.code-workspace + +# Scons progress indicator +.scons_node_count + +# ccls cache (https://github.com/MaskRay/ccls) +.ccls-cache/ + +# compile commands (https://clang.llvm.org/docs/JSONCompilationDatabase.html) +compile_commands.json + +# Python development +.venv +venv + +# Clion Configuration +.idea/ +cmake-build*/ + +# CMake related +CMakeUserPresets.json diff --git a/SConstruct b/SConstruct index a1ce249..b5a019b 100644 --- a/SConstruct +++ b/SConstruct @@ -2,7 +2,7 @@ import os import sys -env = SConscript("godot-cpp/SConstruct") +env = SConscript("redot-cpp/SConstruct") # For reference: # - CCFLAGS are compilation flags shared between C and C++ diff --git a/src/register_types.cpp b/src/register_types.cpp index 3d99daa..5d06f55 100644 --- a/src/register_types.cpp +++ b/src/register_types.cpp @@ -5,6 +5,8 @@ #include "register_types.h" #include +#include +#include using namespace godot; @@ -34,7 +36,9 @@ GDExtensionBool GDE_EXPORT init_gdextension( init_object.register_initializer(register_gdextension_types); init_object.register_terminator(unregister_gdextension_types); - init_object.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_LATE); + init_object.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE); + + return init_object.init(); } } diff --git a/src/register_types.h b/src/register_types.h index 4e0a85c..12b85da 100644 --- a/src/register_types.h +++ b/src/register_types.h @@ -5,6 +5,8 @@ #ifndef GDEXTENSION_TEMPLATE_REGISTER_TYPES_H #define GDEXTENSION_TEMPLATE_REGISTER_TYPES_H +#include + using namespace godot; void register_gdextension_types();