2020-09-25 18:50:46 +00:00
|
|
|
/**
|
2020-11-04 21:04:37 +00:00
|
|
|
* \file client.cpp
|
2020-09-25 18:50:46 +00:00
|
|
|
* \brief Univerxel client
|
2021-01-20 16:13:15 +00:00
|
|
|
* \author Shu
|
|
|
|
* \version 0.0.2
|
2020-09-25 18:50:46 +00:00
|
|
|
*
|
2021-01-20 16:13:15 +00:00
|
|
|
* Univerxel light client program.
|
2020-09-25 18:50:46 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "client/Client.hpp"
|
2021-01-20 16:13:15 +00:00
|
|
|
#include "core/options_part.hpp"
|
2020-09-25 18:50:46 +00:00
|
|
|
#include "core/utils/tracy.hpp"
|
2021-01-20 16:13:15 +00:00
|
|
|
#include "core/utils/logger.hpp"
|
2020-11-16 20:29:26 +00:00
|
|
|
#include "version.h"
|
2020-09-25 18:50:46 +00:00
|
|
|
|
|
|
|
/// Entry point
|
|
|
|
int main(int argc, char *argv[]){
|
2020-11-16 20:29:26 +00:00
|
|
|
LOG("Univerxel client " << UNIVERXEL_VERSION);
|
2020-09-25 18:50:46 +00:00
|
|
|
|
|
|
|
#if TRACY_ENABLE
|
|
|
|
LOG("Profiling !");
|
|
|
|
#endif
|
|
|
|
|
2021-01-20 16:13:15 +00:00
|
|
|
auto options = config::options_part<config::client::options>(argc > 1 ? argv[1] : config::DEFAULT_FILE);
|
2020-09-25 18:50:46 +00:00
|
|
|
options.save();
|
|
|
|
|
|
|
|
#if TRACY_ENABLE
|
|
|
|
tracy::SetThreadName("Main");
|
|
|
|
#endif
|
|
|
|
|
2021-01-20 16:13:15 +00:00
|
|
|
world::module::Registry::Load();
|
|
|
|
|
|
|
|
auto client = Client(options.get(), nullptr);
|
|
|
|
client.run();
|
2020-09-25 18:50:46 +00:00
|
|
|
|
|
|
|
options.save();
|
2021-01-20 16:13:15 +00:00
|
|
|
world::module::Registry::Unload();
|
2020-09-25 18:50:46 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|