mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-22 00:48:09 +01:00
Added the new logging stuff to the build, and made everything compile.
This commit is contained in:
parent
fb125bac9d
commit
b0ebe103f7
@ -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])
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
#include "logger_bind.h"
|
||||
|
||||
#include "logger.h"
|
||||
#include "core/log/logger.h"
|
||||
|
||||
Ref<LoggerBackend> _PLogger::get_backend() {
|
||||
return PLogger::_backend;
|
||||
@ -73,4 +73,7 @@ _PLogger::~_PLogger() {
|
||||
_self = nullptr;
|
||||
}
|
||||
|
||||
void _PLogger::_bind_methods() {
|
||||
}
|
||||
|
||||
_PLogger *_PLogger::_self = nullptr;
|
@ -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;
|
||||
|
7
core/log/SCsub
Normal file
7
core/log/SCsub
Normal file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
Import("env")
|
||||
|
||||
env_log = env.Clone()
|
||||
|
||||
env_log.add_source_files(env.core_sources, "*.cpp")
|
@ -1,14 +1,8 @@
|
||||
|
||||
#include "logger.h"
|
||||
|
||||
#include "core/string.h"
|
||||
#include <cstdio>
|
||||
|
||||
#include "logger.h"
|
||||
#include <stdio.h>
|
||||
#include <thread>
|
||||
|
||||
#include "core/print_string.h"
|
||||
#include "core/typedefs.h"
|
||||
|
||||
void PLogger::log_trace(const String &str) {
|
||||
String s;
|
||||
|
@ -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<ResourceFormatSaverBinary> resource_saver_binary;
|
||||
static Ref<ResourceFormatLoaderBinary> resource_loader_binary;
|
||||
static Ref<ResourceFormatImporter> 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<ResourceImporter>();
|
||||
|
||||
ClassDB::register_class<LoggerBackend>();
|
||||
|
||||
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<Expression>();
|
||||
ClassDB::register_class<Time>();
|
||||
ClassDB::register_class<_PLogger>();
|
||||
|
||||
Engine::get_singleton()->add_singleton(Engine::Singleton("ProjectSettings", ProjectSettings::get_singleton()));
|
||||
Engine::get_singleton()->add_singleton(Engine::Singleton("IP", IP::get_singleton()));
|
||||
@ -267,6 +276,7 @@ void register_core_singletons() {
|
||||
Engine::get_singleton()->add_singleton(Engine::Singleton("InputMap", InputMap::get_singleton()));
|
||||
Engine::get_singleton()->add_singleton(Engine::Singleton("JSON", _JSON::get_singleton()));
|
||||
Engine::get_singleton()->add_singleton(Engine::Singleton("Time", Time::get_singleton()));
|
||||
Engine::get_singleton()->add_singleton(Engine::Singleton("PLogger", _PLogger::get_singleton()));
|
||||
}
|
||||
|
||||
void unregister_core_types() {
|
||||
@ -277,6 +287,7 @@ void unregister_core_types() {
|
||||
memdelete(_classdb);
|
||||
memdelete(_marshalls);
|
||||
memdelete(_json);
|
||||
memdelete(_plogger);
|
||||
|
||||
memdelete(_geometry);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user