From 741cfe452156f7c6365d1a66b6228e15ef660bf6 Mon Sep 17 00:00:00 2001 From: ClarkeCode Date: Tue, 13 Jun 2023 23:41:28 -0400 Subject: Rough draft of compiling headless simulation --- src/headless/main.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/headless/main.cpp (limited to 'src/headless') diff --git a/src/headless/main.cpp b/src/headless/main.cpp new file mode 100644 index 0000000..70a57a9 --- /dev/null +++ b/src/headless/main.cpp @@ -0,0 +1,22 @@ +#ifdef OPENVIC_HEADLESS_SIM +#include +#include +#include "openvic/Simulation.hpp" +#include "openvic/dataloader/Dataloader.hpp" + + +int main() { + std::cout << "HEADLESS SIMULATION" << std::endl; + + + std::string vic2FolderLocation = ""; + if (vic2FolderLocation.length() <= 0) { + std::cout << "Path to Victoria 2 folder not specified. Manually specify location: "; + std::cin >> vic2FolderLocation; + } + std::filesystem::path path(vic2FolderLocation); + + OpenVic::Simulation sim; + std::cout << (OpenVic::Dataloader::loadDir(path, sim) ? "Dataloader suceeded" : "Dataloader failed") << std::endl; +} +#endif \ No newline at end of file -- cgit v1.2.3-56-ga3b1