Files

34 lines
973 B
C++
Raw Permalink Normal View History

2025-10-11 17:23:58 +02:00
#include <memory>
#include "DefaultApp.hpp"
#include "ILog.hpp"
#include "SpdLogger.hpp"
#include "resource.hpp"
2025-10-11 17:23:58 +02:00
using namespace pixelarium;
using namespace std;
using Log = utils::log::ILog;
using Pool = resources::ImageResourcePool;
// setup a logger
#ifdef _WIN32
const auto logger{utils::log::SpdLogger(string(getenv("APPDATA")) + "/pixelarium/simple_app.log", "default")};
2025-10-11 17:23:58 +02:00
#else
const auto logger{
utils::log::SpdLogger(string(getenv("HOME")) + "/.cache/pixelarium/simple_app.log", "default")};
2025-10-11 17:23:58 +02:00
#endif
int main()
{
// some initial log message and default log level setting
logger.Info(format("{}: Starting Application {}", __FUNCTION__, "Pixelarium"));
logger.ChangeLevel(utils::log::LogLevel::kDebug);
2025-10-11 17:23:58 +02:00
// instantiate an image pool for the application
resources::ImageResourcePool image_pool;
// create an application, inject its dependencies and start it
auto app{application::DefaultApp(logger, image_pool)};
2025-10-11 17:23:58 +02:00
app.Start();
}