#include "fiko/platform/sistem.hpp" #include namespace fiko::sistem { std::string calistirilabilirDizin() { wchar_t yol[MAX_PATH]; const DWORD n = GetModuleFileNameW(nullptr, yol, MAX_PATH); std::wstring w(yol, n); const size_t son = w.find_last_of(L"\\/"); w = w.substr(0, son + 1); const int bayt = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), (int)w.size(), nullptr, 0, nullptr, nullptr); std::string s(bayt, 0); WideCharToMultiByte(CP_UTF8, 0, w.c_str(), (int)w.size(), s.data(), bayt, nullptr, nullptr); return s; } }