From b54e479a3f9e973a083c643905f21c59fadd63bb Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Sun, 12 Apr 2026 03:00:11 -0500 Subject: 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 --- libs/lootcli/include/lootcli/lootcli.h | 116 --------------------------------- 1 file changed, 116 deletions(-) delete mode 100644 libs/lootcli/include/lootcli/lootcli.h (limited to 'libs/lootcli/include') 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 - -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 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(p)); - } catch (std::exception&) { - return {}; - } - } else { - return Message::fromLog(logLevelFromString(type), m[2]); - } -} - -} // namespace lootcli - -#endif // MODORGANIZER_LOOTCLI_INCLUDED -- cgit v1.3.1