mirror of https://github.com/WerWolv/ImHex.git
Compare commits
2 Commits
27cf5953ae
...
d86be9d9b3
Author | SHA1 | Date |
---|---|---|
WerWolv | d86be9d9b3 | |
WerWolv | c26bed894b |
|
@ -101,6 +101,7 @@ namespace hex::fs {
|
|||
Scripts,
|
||||
Inspectors,
|
||||
Themes,
|
||||
Libraries,
|
||||
|
||||
END
|
||||
};
|
||||
|
|
|
@ -226,6 +226,9 @@ namespace hex::fs {
|
|||
case ImHexPath::Plugins:
|
||||
result = appendPath(getPluginPaths(), "plugins");
|
||||
break;
|
||||
case ImHexPath::Libraries:
|
||||
result = appendPath(getPluginPaths(), "lib");
|
||||
break;
|
||||
case ImHexPath::Resources:
|
||||
result = appendPath(getDataPaths(), "resources");
|
||||
break;
|
||||
|
|
|
@ -18,6 +18,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))
|
||||
setenv("LD_LIBRARY_PATH", hex::format("{};{}", hex::getEnvironmentVariable("LD_LIBRARY_PATH").value_or(""), path.string().c_str()).c_str(), true);
|
||||
}
|
||||
|
||||
if (!isatty(STDOUT_FILENO)) {
|
||||
log::redirectToFile();
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
setenv("LD_LIBRARY_PATH", hex::format("{};{}", hex::getEnvironmentVariable("LD_LIBRARY_PATH").value_or(""), path.string().c_str()).c_str(), true);
|
||||
}
|
||||
|
||||
if (!isatty(STDOUT_FILENO)) {
|
||||
log::redirectToFile();
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <GLFW/glfw3native.h>
|
||||
#undef GLFW_EXPOSE_NATIVE_WIN32
|
||||
|
||||
#include <winbase.h>
|
||||
#include <winuser.h>
|
||||
#include <dwmapi.h>
|
||||
#include <windowsx.h>
|
||||
|
@ -187,6 +188,13 @@ 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))
|
||||
AddDllDirectory(path.c_str());
|
||||
}
|
||||
|
||||
// Attach to parent console if one exists
|
||||
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
|
||||
|
||||
|
|
|
@ -148,6 +148,7 @@ namespace hex::plugin::builtin {
|
|||
{ "Patterns Includes", fs::ImHexPath::PatternsInclude },
|
||||
{ "Magic", fs::ImHexPath::Magic },
|
||||
{ "Plugins", fs::ImHexPath::Plugins },
|
||||
{ "Libraries", fs::ImHexPath::Libraries },
|
||||
{ "Yara Patterns", fs::ImHexPath::Yara },
|
||||
{ "Config", fs::ImHexPath::Config },
|
||||
{ "Resources", fs::ImHexPath::Resources },
|
||||
|
|
Loading…
Reference in New Issue