Slight rework so that config can have a base dir but the program can start in another one.
This commit is contained in:
parent
d1c2352237
commit
3d4ddde96e
8 changed files with 32 additions and 13 deletions
|
@ -2,8 +2,10 @@
|
|||
#include <nlohmann/json.hpp>
|
||||
#include <fstream>
|
||||
#include <codecvt>
|
||||
#include <filesystem>
|
||||
|
||||
struct Config {
|
||||
static std::filesystem::path BASE_DIR;
|
||||
nlohmann::json $config;
|
||||
std::string $src_path;
|
||||
|
||||
|
@ -16,4 +18,7 @@ struct Config {
|
|||
nlohmann::json &json() { return $config; };
|
||||
std::wstring wstring(const std::string main_key, const std::string sub_key);
|
||||
std::vector<std::string> keys();
|
||||
|
||||
static void set_base_dir(const char *optarg);
|
||||
static std::filesystem::path path_to(const std::string& path);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue