diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-04-12 03:00:11 -0500 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-04-12 03:00:11 -0500 |
| commit | b54e479a3f9e973a083c643905f21c59fadd63bb (patch) | |
| tree | ff920cc2614c5d014e7de910cbad75875257776e /libs/lootcli/src/lootthread.h | |
| parent | bf7a57fc55493247a624ecfd65e4d73964e7d8d2 (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/src/lootthread.h')
| -rw-r--r-- | libs/lootcli/src/lootthread.h | 107 |
1 files changed, 0 insertions, 107 deletions
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 <lootcli/lootcli.h> - -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<std::string> 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<std::string> 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 <typename T> T resolveVariable(HMODULE lib, const char *name); - // template <typename T> 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<std::string>& sortedPlugins) const; - - QJsonArray createPlugins(loot::GameInterface& game, - const std::vector<std::string>& sortedPlugins) const; - - QJsonValue createMessages(const std::vector<loot::Message>& list) const; - QJsonValue createDirty(const std::vector<loot::PluginCleaningData>& data) const; - QJsonValue createClean(const std::vector<loot::PluginCleaningData>& data) const; - - QJsonValue createIncompatibilities(loot::GameInterface& game, - const std::vector<loot::File>& data) const; - - QJsonValue createMissingMasters(loot::GameInterface& game, - const std::string& pluginName) const; -}; - -} // namespace lootcli - -#endif // LOOTTHREAD_H |
