#pragma once #include #ifdef _WIN32 #include #endif namespace Fig { inline std::filesystem::path getExecutablePath() { #ifdef _WIN32 wchar_t buffer[MAX_PATH]; GetModuleFileNameW(nullptr, buffer, MAX_PATH); return std::filesystem::path(buffer); #else return std::filesystem::canonical("/proc/self/exe"); #endif } }; // namespace Fig