diff --git a/core/SCsub b/core/SCsub index d9464a4a7..456f0a39f 100644 --- a/core/SCsub +++ b/core/SCsub @@ -191,9 +191,9 @@ SConscript("os/SCsub") SConscript("math/SCsub") SConscript("crypto/SCsub") SConscript("io/SCsub") +SConscript("log/SCsub") SConscript("bind/SCsub") - # Build it all as a library lib = env.add_library("core", env.core_sources) env.Prepend(LIBS=[lib]) diff --git a/core/log/logger_bind.cpp b/core/bind/logger_bind.cpp similarity index 97% rename from core/log/logger_bind.cpp rename to core/bind/logger_bind.cpp index e107846e9..a2e4e7643 100644 --- a/core/log/logger_bind.cpp +++ b/core/bind/logger_bind.cpp @@ -1,7 +1,7 @@ #include "logger_bind.h" -#include "logger.h" +#include "core/log/logger.h" Ref _PLogger::get_backend() { return PLogger::_backend; @@ -73,4 +73,7 @@ _PLogger::~_PLogger() { _self = nullptr; } +void _PLogger::_bind_methods() { +} + _PLogger *_PLogger::_self = nullptr; diff --git a/core/log/logger_bind.h b/core/bind/logger_bind.h similarity index 97% rename from core/log/logger_bind.h rename to core/bind/logger_bind.h index 6d555ab9f..a1f3ecf97 100644 --- a/core/log/logger_bind.h +++ b/core/bind/logger_bind.h @@ -2,10 +2,10 @@ #ifndef PLOGGER_BIND_H #define PLOGGER_BIND_H +#include "core/log/logger_backend.h" #include "core/reference.h" #include "core/typedefs.h" #include "core/ustring.h" -#include "logger_backend.h" class String; diff --git a/core/log/SCsub b/core/log/SCsub new file mode 100644 index 000000000..00e06586b --- /dev/null +++ b/core/log/SCsub @@ -0,0 +1,7 @@ +#!/usr/bin/env python + +Import("env") + +env_log = env.Clone() + +env_log.add_source_files(env.core_sources, "*.cpp") diff --git a/core/log/logger.cpp b/core/log/logger.cpp index 8649fdba7..bac9a33f8 100644 --- a/core/log/logger.cpp +++ b/core/log/logger.cpp @@ -1,14 +1,8 @@ #include "logger.h" -#include "core/string.h" -#include - -#include "logger.h" -#include -#include - #include "core/print_string.h" +#include "core/typedefs.h" void PLogger::log_trace(const String &str) { String s; diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp index dbcf7dcd7..f19bbd185 100644 --- a/core/register_core_types.cpp +++ b/core/register_core_types.cpp @@ -58,6 +58,7 @@ #include "core/io/translation_loader_po.h" #include "core/io/udp_server.h" #include "core/io/xml_parser.h" +#include "core/log/logger_backend.h" #include "core/math/a_star.h" #include "core/math/expression.h" #include "core/math/geometry.h" @@ -72,6 +73,9 @@ #include "core/translation.h" #include "core/undo_redo.h" +#include "core/bind/logger_bind.h" +#include "core/log/logger_backend.h" + static Ref resource_saver_binary; static Ref resource_loader_binary; static Ref resource_format_importer; @@ -87,6 +91,7 @@ static _Engine *_engine = nullptr; static _ClassDB *_classdb = nullptr; static _Marshalls *_marshalls = nullptr; static _JSON *_json = nullptr; +static _PLogger *_plogger = nullptr; static IP *ip = nullptr; @@ -212,6 +217,8 @@ void register_core_types() { ClassDB::register_virtual_class(); + ClassDB::register_class(); + ip = IP::create(); _geometry = memnew(_Geometry); @@ -223,6 +230,7 @@ void register_core_types() { _classdb = memnew(_ClassDB); _marshalls = memnew(_Marshalls); _json = memnew(_JSON); + _plogger = memnew(_PLogger); } void register_core_settings() { @@ -252,6 +260,7 @@ void register_core_singletons() { ClassDB::register_class<_JSON>(); ClassDB::register_class(); ClassDB::register_class