#include "config.h" #include #include namespace fs = std::filesystem; Config::Config(int argc, char* argv[]) { m_executable_path = fs::path{argv[0]}.parent_path().string(); } std::string Config::get_executable_path() { return m_executable_path; } std::string Config::get_file_path() { // Just a heuristic: If this exists in current dir, then use this path if (fs::exists(fs::path{m_executable_path} / "magic1.midi")) { return m_executable_path; } return "/media/usb"; }