| 14 | { |
| 15 | } |
| 16 | void ConfigurationManager::load() |
| 17 | { |
| 18 | // TODO: Do not modify MountedPaths directly |
| 19 | auto mountPoints = System::MountablePath::Paths(); |
| 20 | std::reverse(mountPoints.begin(), mountPoints.end()); |
| 21 | const auto loadResult |
| 22 | = System::Path(mountPoints).set("Data/config.cfg.vili").findAll(); |
| 23 | for (const std::string path : loadResult) |
| 24 | { |
| 25 | Debug::Log->info("Loading config file from {}", path); |
| 26 | vili::node conf |
| 27 | = vili::parser::from_file(path, Templates::getConfigTemplates()); |
| 28 | std::cout << "Merging : " << conf.dump() << std::endl; |
| 29 | this->merge(conf); |
| 30 | std::cout << "Result : " << this->dump() << std::endl; |
| 31 | } |
| 32 | } |
| 33 | } // namespace obe::System |