[VER] v0.3.8-alpha

[Impl][Fix] 更改resolveModulePath实现,使用绝对路径查找内置库
This commit is contained in:
2026-01-14 21:31:11 +08:00
parent 99e00492f5
commit 13fdbec0c4
3 changed files with 35 additions and 4 deletions

View File

@@ -0,0 +1,22 @@
#pragma once
#include <filesystem>
#include <libloaderapi.h>
#ifdef _WIN32
#include <libloaderapi.h>
#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