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/installer_fomod/src/installerfomod.h | 100 ++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 libs/installer_fomod/src/installerfomod.h (limited to 'libs/installer_fomod/src/installerfomod.h') diff --git a/libs/installer_fomod/src/installerfomod.h b/libs/installer_fomod/src/installerfomod.h new file mode 100644 index 0000000..1ba8ed8 --- /dev/null +++ b/libs/installer_fomod/src/installerfomod.h @@ -0,0 +1,100 @@ +#ifndef INSTALLERFOMOD_H +#define INSTALLERFOMOD_H + +#include +#include +#include + +class InstallerFomod : public MOBase::IPluginInstallerSimple, + public MOBase::IPluginDiagnose +{ + + Q_OBJECT + Q_INTERFACES(MOBase::IPlugin MOBase::IPluginInstaller MOBase::IPluginInstallerSimple + MOBase::IPluginDiagnose) +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org.tannin.InstallerFomod") +#endif + +public: + InstallerFomod(); + + virtual bool init(MOBase::IOrganizer* moInfo) override; + virtual QString name() const override; + virtual QString localizedName() const override; + virtual QString author() const override; + virtual QString description() const override; + virtual MOBase::VersionInfo version() const override; + virtual QList settings() const override; + + virtual unsigned int priority() const override; + virtual bool isManualInstaller() const override; + + virtual bool + isArchiveSupported(std::shared_ptr tree) const override; + virtual EInstallResult install(MOBase::GuessedValue& modName, + std::shared_ptr& tree, + QString& version, int& modID) override; + + virtual void onInstallationStart(QString const& archive, bool reinstallation, + MOBase::IModInterface* currentMod) override; + virtual void onInstallationEnd(EInstallResult result, + MOBase::IModInterface* newMod) override; + +public: // IPluginDiagnose interface + 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: + /** + * @brief Retrieve the tree entry corresponding to the fomod directory. + * + * @param tree Tree to look-up the directory in. + * + * @return the entry corresponding to the fomod directory in the tree, or a null + * pointer if the entry was not found. + */ + std::shared_ptr + findFomodDirectory(std::shared_ptr tree) const; + + /** + * @brief Build a list of entries that should be extracted sincce the FOMOD installer + * may require access to (currently the .xml files in the FOMOD directory and the + * pictures in the archive). + * + * @param tree Base tree of the archive. + * + * @return a list of file entries that need to be extracted. + */ + std::vector> + buildFomodTree(std::shared_ptr tree) const; + + /** + * @brief Recurse through the given tree and add all the images to the given vector. + * + * @param result Vector of entries to add the images. + * @param tree The tree to look files in. + */ + void + appendImageFiles(std::vector>& entries, + std::shared_ptr tree) const; + + MOBase::IPluginList::PluginStates fileState(const QString& fileName) const; + +private: + static const unsigned int PROBLEM_IMAGETYPE_UNSUPPORTED = 1; + +private: + MOBase::IOrganizer* m_MOInfo; + + bool allowAnyFile() const; + bool checkDisabledMods() const; + + bool m_InstallerUsed; + QString m_Url; +}; + +#endif // INSTALLERFOMOD_H -- cgit v1.3.1