start examples (#16)
This commit is contained in:
committed by
Maximilian Kueffner
parent
a760535b92
commit
244b00fa5c
@@ -0,0 +1,26 @@
|
||||
#include <memory>
|
||||
|
||||
#include "DefaultApp.hpp"
|
||||
#include "resources/resource.hpp"
|
||||
#include "utilities/ILog.hpp"
|
||||
#include "utilities/SpdLogger.hpp"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
using namespace pixelarium;
|
||||
using namespace std;
|
||||
unique_ptr<utils::log::ILog> logger;
|
||||
#ifdef _WIN32
|
||||
logger = make_unique<utils::log::SpdLogger>(string(getenv("APPDATA")) + "/pixelarium/logfile.log", "default");
|
||||
#else
|
||||
logger = make_unique<utils::log::SpdLogger>(std::string(getenv("HOME")) + "/.cache/pixelarium/log.log", "default");
|
||||
#endif
|
||||
logger->Info(std::format("{}: Starting Application {}", __FUNCTION__, "Pixelarium"));
|
||||
|
||||
logger->ChangeLevel(utils::log::LogLevel::kDebug);
|
||||
auto image_pool{std::make_unique<resources::ImageResourcePool>()};
|
||||
|
||||
application::DefaultApp app = application::DefaultApp(*logger, *image_pool);
|
||||
|
||||
app.Start();
|
||||
}
|
||||
Reference in New Issue
Block a user