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/src/lootthread.h | 107 ------------------------------------------ 1 file changed, 107 deletions(-) delete mode 100644 libs/lootcli/src/lootthread.h (limited to 'libs/lootcli/src/lootthread.h') diff --git a/libs/lootcli/src/lootthread.h b/libs/lootcli/src/lootthread.h deleted file mode 100644 index d4f4e65..0000000 --- a/libs/lootcli/src/lootthread.h +++ /dev/null @@ -1,107 +0,0 @@ -#ifndef LOOTTHREAD_H -#define LOOTTHREAD_H - -#include "game_settings.h" -#include "loot/database_interface.h" -#include - -namespace loot -{ -class Game; -} - -namespace lootcli -{ - -loot::LogLevel toLootLogLevel(lootcli::LogLevels level); -lootcli::LogLevels fromLootLogLevel(loot::LogLevel level); - -class LOOTWorker -{ -public: - explicit LOOTWorker(); - - void setGame(const std::string& gameName); - void setGamePath(const std::string& gamePath); - void setOutput(const std::string& outputPath); - void setPluginListPath(const std::string& pluginListPath); - void - setLanguageCode(const std::string& language_code); // Will add this when I figure out - // how languages work on MO - void setLogLevel(loot::LogLevel level); - - void setUpdateMasterlist(bool update); - - int run(); - -private: - void progress(Progress p); - void log(loot::LogLevel level, const std::string_view message) const; - -#ifdef _WIN32 - DWORD GetFile(const WCHAR* szUrl, const CHAR* szFileName); -#else - int GetFile(const std::string& url, const std::string& fileName); -#endif - void getSettings(const std::filesystem::path& file); - std::string getOldDefaultRepoUrl(loot::GameId gameType); - std::optional GetLocalFolder(const toml::table& table); - bool IsNehrim(const toml::table& table); - bool IsEnderal(const toml::table& table, const std::string& expectedLocalFolder); - bool IsEnderal(const toml::table& table); - bool IsEnderalSE(const toml::table& table); - bool isLocalPath(const std::string& location, const std::string& filename); - bool isBranchCheckedOut(const std::filesystem::path& localGitRepo, - const std::string& branch); - std::optional migrateMasterlistRepoSettings(loot::GameId gameType, - std::string url, - std::string branch); - std::string migrateMasterlistSource(const std::string& source); - - std::filesystem::path gamePath() const; - std::filesystem::path masterlistPath() const; - std::filesystem::path settingsPath() const; - std::filesystem::path userlistPath() const; - std::filesystem::path l10nPath() const; - std::filesystem::path dataPath() const; - -private: - // void handleErr(unsigned int resultCode, const char *description); - bool sort(loot::Game& game); - // const char *lootErrorString(unsigned int errorCode); - // template T resolveVariable(HMODULE lib, const char *name); - // template T resolveFunction(HMODULE lib, const char *name); - -private: - loot::GameId m_GameId; - std::string m_Language; - std::string m_GameName; - std::string m_GamePath; - std::string m_OutputPath; - std::string m_PluginListPath; - loot::LogLevel m_LogLevel; - bool m_UpdateMasterlist; - mutable std::recursive_mutex mutex_; - loot::GameSettings m_GameSettings; - std::chrono::high_resolution_clock::time_point m_startTime; - - std::string createJsonReport(loot::GameInterface& game, - const std::vector& sortedPlugins) const; - - QJsonArray createPlugins(loot::GameInterface& game, - const std::vector& sortedPlugins) const; - - QJsonValue createMessages(const std::vector& list) const; - QJsonValue createDirty(const std::vector& data) const; - QJsonValue createClean(const std::vector& data) const; - - QJsonValue createIncompatibilities(loot::GameInterface& game, - const std::vector& data) const; - - QJsonValue createMissingMasters(loot::GameInterface& game, - const std::string& pluginName) const; -}; - -} // namespace lootcli - -#endif // LOOTTHREAD_H -- cgit v1.3.1