aboutsummaryrefslogtreecommitdiff
path: root/libs/lootcli/include
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-12 03:00:11 -0500
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-12 03:00:11 -0500
commitb54e479a3f9e973a083c643905f21c59fadd63bb (patch)
treeff920cc2614c5d014e7de910cbad75875257776e /libs/lootcli/include
parentbf7a57fc55493247a624ecfd65e4d73964e7d8d2 (diff)
Remove LOOT integration entirely
The sort button was already hidden on Linux (setVisible(false)) and the LOOT feedback path (LootDialog -> addLootReport) has always been Windows-only, meaning the dirty/incompatibilities/missingMasters/messages tooltip bullets and the dirty-plugin icon could never fire on Linux. MO2 shipped lootcli + libloot for a load-order sort mechanism that was unreachable from the UI. Users who want LOOT can download it from https://github.com/loot/loot and run it against their instance directly. - Drop libs/lootcli/, libloot Dockerfile build step, and lootcli staging/patchelf in build-inner.sh - Drop src/src/loot.{cpp,h}, src/src/lootdialog.{cpp,h,ui} - Extract MarkdownDocument / MarkdownPage (used by UpdateDialog for its changelog view) into src/src/markdowndocument.{h,cpp} - Strip addLootReport, makeLootTooltip, Loot::Plugin field, LOOT icon checks, and LOOT tooltip/isProblematic/hasInfo paths from pluginlist - Delete sortButton widget, updateSortButton(), onSortButtonClicked(), and all m_didUpdateMasterList wiring - Delete lootLogLevel setting, combo box, and "Integrated LOOT" group from the diagnostics settings tab
Diffstat (limited to 'libs/lootcli/include')
-rw-r--r--libs/lootcli/include/lootcli/lootcli.h116
1 files changed, 0 insertions, 116 deletions
diff --git a/libs/lootcli/include/lootcli/lootcli.h b/libs/lootcli/include/lootcli/lootcli.h
deleted file mode 100644
index 90305a6..0000000
--- a/libs/lootcli/include/lootcli/lootcli.h
+++ /dev/null
@@ -1,116 +0,0 @@
-#ifndef MODORGANIZER_LOOTCLI_INCLUDED
-#define MODORGANIZER_LOOTCLI_INCLUDED
-
-#include <regex>
-
-namespace lootcli
-{
-
-enum class LogLevels
-{
- Trace = 0,
- Debug,
- Info,
- Warning,
- Error
-};
-
-inline LogLevels logLevelFromString(const std::string& s)
-{
- if (s == "trace") {
- return LogLevels::Trace;
- } else if (s == "debug") {
- return LogLevels::Debug;
- } else if (s == "info") {
- return LogLevels::Info;
- } else if (s == "warning") {
- return LogLevels::Warning;
- } else if (s == "error") {
- return LogLevels::Error;
- } else {
- return LogLevels::Info;
- }
-}
-
-inline std::string logLevelToString(LogLevels level)
-{
- switch (level) {
- case LogLevels::Trace:
- return "trace";
- case LogLevels::Debug:
- return "debug";
- case LogLevels::Info:
- return "info";
- case LogLevels::Warning:
- return "warning";
- case LogLevels::Error:
- return "error";
- default:
- return "info";
- }
-}
-
-enum class Progress
-{
- None = 0,
- CheckingMasterlistExistence,
- UpdatingMasterlist,
- LoadingLists,
- ReadingPlugins,
- SortingPlugins,
- WritingLoadorder,
- ParsingLootMessages,
- Done
-};
-
-enum class MessageType
-{
- None = 0,
- Progress,
- Log
-};
-
-struct Message
-{
- MessageType type = MessageType::None;
- Progress progress = Progress::None;
- LogLevels logLevel = LogLevels::Info;
- std::string log;
-
- static Message fromProgress(Progress p)
- {
- return {MessageType::Progress, p, LogLevels::Info, ""};
- }
-
- static Message fromLog(LogLevels level, std::string log)
- {
- return {MessageType::Log, Progress::None, level, std::move(log)};
- }
-};
-
-inline Message parseMessage(const std::string_view& line)
-{
- static std::regex e(R"(^\[([a-z]+)\] (.+)$)");
-
- std::match_results<std::string_view::const_iterator> m;
- if (!std::regex_match(line.begin(), line.end(), m, e)) {
- return {};
- }
-
- const auto type = m[1];
-
- if (type == "progress") {
- try {
- const auto p = std::stoi(m[2]);
- return Message::fromProgress(static_cast<Progress>(p));
- } catch (std::exception&) {
- return {};
- }
- } else {
- return Message::fromLog(logLevelFromString(type), m[2]);
- }
-}
-
-} // namespace lootcli
-
-#endif // MODORGANIZER_LOOTCLI_INCLUDED