From 7ee008e150bc5bcf76082d726f719ee0fdfda982 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Wed, 11 Feb 2026 02:37:39 -0600 Subject: Fluorine Manager: full Linux port of Mod Organizer 2 Complete native Linux port with FUSE-based virtual filesystem, Proton/umu-run integration, and Flatpak packaging. Key features: - FUSE VFS replacing Windows USVFS (in-process + standalone helper for Flatpak) - Proton/GE-Proton/umu-run launcher with env var forwarding - Flatpak support (sandbox-aware VFS, NXM handler, umu-run) - Wine prefix management UI - Case-insensitive path resolution for Linux filesystems - QSettings-safe INI handling (avoids Bethesda INI corruption) - Portable instance support with auto-generated launcher scripts Co-Authored-By: Claude Opus 4.6 --- libs/diagnose_basic/src/diagnosebasic.h | 142 ++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 libs/diagnose_basic/src/diagnosebasic.h (limited to 'libs/diagnose_basic/src/diagnosebasic.h') diff --git a/libs/diagnose_basic/src/diagnosebasic.h b/libs/diagnose_basic/src/diagnosebasic.h new file mode 100644 index 0000000..826158a --- /dev/null +++ b/libs/diagnose_basic/src/diagnosebasic.h @@ -0,0 +1,142 @@ +/* +Copyright (C) 2013 Sebastian Herbord. All rights reserved. + +This file is part of basic diagnosis plugin for MO + +This plugin is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This plugin is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this plugin. If not, see . +*/ + +#ifndef DIAGNOSEBASIC_H +#define DIAGNOSEBASIC_H + +#include +#include +#include + +#include +#include +#include +#include + +class DiagnoseBasic : public QObject, + public MOBase::IPlugin, + public MOBase::IPluginDiagnose +{ + Q_OBJECT + Q_INTERFACES(MOBase::IPlugin MOBase::IPluginDiagnose) +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org.tannin.DiagnoseBasic") +#endif + +public: + DiagnoseBasic(); + +public: // IPlugin + virtual bool init(MOBase::IOrganizer* moInfo); + virtual QString name() const; + virtual QString author() const; + virtual QString description() const; + virtual MOBase::VersionInfo version() const; + virtual bool isActive() const; + virtual QList settings() const; + +public: // IPluginDiagnose + virtual std::vector activeProblems() const; + virtual QString shortDescription(unsigned int key) const; + virtual QString fullDescription(unsigned int key) const; + virtual bool hasGuidedFix(unsigned int key) const; + virtual void startGuidedFix(unsigned int key) const; + +private: + bool errorReported() const; + bool overwriteFiles() const; + bool invalidFontConfig() const; + bool nitpickInstalled() const; + bool assetOrder() const; + bool missingMasters() const; + bool alternateGame() const; + bool fileAttributes(const QString& executable) const; + +private: + static const unsigned int PROBLEM_ERRORLOG = 1; + static const unsigned int PROBLEM_OVERWRITE = 2; + static const unsigned int PROBLEM_INVALIDFONT = 3; + static const unsigned int PROBLEM_NITPICKINSTALLED = 4; + static const unsigned int PROBLEM_PROFILETWEAKS = 7; + static const unsigned int PROBLEM_MISSINGMASTERS = 8; + static const unsigned int PROBLEM_ALTERNATE = 9; + + static const unsigned int NUM_CONTEXT_ROWS = 5; + + static const QRegularExpression RE_LOG_FILE; + +private: + struct ListElement + { + QString espName; + QString modName; + int pluginPriority; + int modPriority; + int sortGroup; + bool avoidMove; + QSet relevantScripts; + }; + + struct Move + { + ListElement item; + ListElement reference; + enum EType + { + BEFORE, + AFTER + } type; + Move(const ListElement& initItem, const ListElement& initReference, EType initType) + : item(initItem), reference(initReference), type(initType) + {} + }; + + struct Sorter + { + struct + { + int operator()(const ListElement& lhs, const ListElement& rhs) + { + return lhs.modPriority < rhs.modPriority; + } + } minMod; + + std::vector moves; + + void operator()(std::vector modList); + + private: + void sortGroup(std::vector modList); + }; + + friend bool operator<(const Move& lhs, const Move& rhs); + +private: + void topoSort(std::vector& list) const; + bool checkEmpty(const QString& path) const; + +private: + MOBase::IOrganizer* m_MOInfo; + mutable QString m_ErrorMessage; + mutable QString m_NewestModlistBackup; + mutable std::set m_MissingMasters; + mutable std::map> m_PluginChildren; +}; + +#endif // DIAGNOSEBASIC_H -- cgit v1.3.1