refactor: Rework features that use external libraries into optional plugins (#1470)

This commit is contained in:
Nik
2023-12-23 21:09:41 +01:00
committed by GitHub
parent 84bfd10416
commit 61bfe10bc2
149 changed files with 2940 additions and 2390 deletions

View File

@@ -0,0 +1,25 @@
#include <hex/plugin.hpp>
#include <hex/api/content_registry.hpp>
#include <hex/helpers/logger.hpp>
#include <romfs/romfs.hpp>
namespace hex::plugin::visualizers {
void registerPatternLanguageVisualizers();
void registerPatternLanguageInlineVisualizers();
}
using namespace hex;
using namespace hex::plugin::visualizers;
IMHEX_PLUGIN_SETUP("Visualizers", "WerWolv", "Visualizers for the Pattern Language") {
hex::log::debug("Using romfs: '{}'", romfs::name());
for (auto &path : romfs::list("lang"))
hex::ContentRegistry::Language::addLocalization(nlohmann::json::parse(romfs::get(path).string()));
registerPatternLanguageVisualizers();
registerPatternLanguageInlineVisualizers();
}