diff --git a/plugins/builtin/source/lang/en_US.cpp b/plugins/builtin/source/lang/en_US.cpp index 112c5ac5f..9b9b7bfa7 100644 --- a/plugins/builtin/source/lang/en_US.cpp +++ b/plugins/builtin/source/lang/en_US.cpp @@ -44,7 +44,7 @@ namespace hex::plugin::builtin { { "hex.welcome.learn.latest.desc", "Read ImHex's current changelog" }, { "hex.welcome.learn.latest.link", "https://github.com/WerWolv/ImHex/releases/latest" }, { "hex.welcome.learn.pattern.title", "Pattern Language Documentation" }, - { "hex.welcome.learn.pattern.desc", "Learn how to write ImHex pattern_language with our extensive documentation" }, + { "hex.welcome.learn.pattern.desc", "Learn how to write ImHex patterns with our extensive documentation" }, { "hex.welcome.learn.pattern.link", "https://imhex.werwolv.net/docs/pattern_language/pattern_language.html" }, { "hex.welcome.learn.plugins.title", "Plugins API" }, { "hex.welcome.learn.plugins.desc", "Extend ImHex with additional features using plugins" }, diff --git a/plugins/libimhex/source/helpers/paths.cpp b/plugins/libimhex/source/helpers/paths.cpp index 061a85ac6..e9cdb13a5 100644 --- a/plugins/libimhex/source/helpers/paths.cpp +++ b/plugins/libimhex/source/helpers/paths.cpp @@ -32,27 +32,56 @@ namespace hex { CoTaskMemFree(wAppDataPath); } + std::vector paths = { parentDir, appDataDir / "imhex" }; + std::vector results; + switch (path) { case ImHexPath::Patterns: - return { (parentDir / "pattern_language").string() }; + std::transform(paths.begin(), paths.end(), std::back_inserter(results), [](auto &path){ + return (path / "patterns").string(); + }); + break; case ImHexPath::PatternsInclude: - return { (parentDir / "includes").string() }; + std::transform(paths.begin(), paths.end(), std::back_inserter(results), [](auto &path){ + return (path / "includes").string(); + }); + break; case ImHexPath::Magic: - return { (parentDir / "magic").string() }; + std::transform(paths.begin(), paths.end(), std::back_inserter(results), [](auto &path){ + return (path / "magic").string(); + }); + break; case ImHexPath::Python: - return { parentDir.string() }; + std::transform(paths.begin(), paths.end(), std::back_inserter(results), [](auto &path){ + return (path / "python").string(); + }); + break; case ImHexPath::Plugins: - return { (parentDir / "plugins").string() }; + std::transform(paths.begin(), paths.end(), std::back_inserter(results), [](auto &path){ + return (path / "plugins").string(); + }); + break; case ImHexPath::Yara: - return { (parentDir / "yara").string() }; + std::transform(paths.begin(), paths.end(), std::back_inserter(results), [](auto &path){ + return (path / "yara").string(); + }); + break; case ImHexPath::Config: return { (appDataDir / "imhex" / "config").string() }; case ImHexPath::Resources: - return { (parentDir / "resources").string() }; + std::transform(paths.begin(), paths.end(), std::back_inserter(results), [](auto &path){ + return (path / "resources").string(); + }); + break; case ImHexPath::Constants: - return { (parentDir / "constants").string() }; + std::transform(paths.begin(), paths.end(), std::back_inserter(results), [](auto &path){ + return (path / "constants").string(); + }); + break; default: __builtin_unreachable(); } + + return results; #elif defined(OS_MACOS) return { getPathForMac(path) }; #else