sys: Add imhex/lib path to plugin libraries search paths

This commit is contained in:
WerWolv
2023-01-07 10:32:01 +01:00
parent 27cf5953ae
commit c26bed894b
6 changed files with 25 additions and 0 deletions

View File

@@ -17,6 +17,12 @@
namespace hex {
void Window::initNative() {
// Add plugin library folders to dll search path
for (const auto &path : hex::fs::getDefaultPaths(fs::ImHexPath::Libraries)) {
if (std::fs::exists(path))
putenv(hex::format("LD_LIBRARY_PATH={}", path.c_str()).c_str());
}
if (!isatty(STDOUT_FILENO)) {
log::redirectToFile();
}