aboutsummaryrefslogtreecommitdiff
path: root/libs/installer_quick/src/installerquick.h
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-11 02:37:39 -0600
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-11 02:37:39 -0600
commit7ee008e150bc5bcf76082d726f719ee0fdfda982 (patch)
tree27fb39be241fdb5ac2734c574de678977d1856d0 /libs/installer_quick/src/installerquick.h
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 <noreply@anthropic.com>
Diffstat (limited to 'libs/installer_quick/src/installerquick.h')
-rw-r--r--libs/installer_quick/src/installerquick.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/libs/installer_quick/src/installerquick.h b/libs/installer_quick/src/installerquick.h
new file mode 100644
index 0000000..5d9c910
--- /dev/null
+++ b/libs/installer_quick/src/installerquick.h
@@ -0,0 +1,77 @@
+#ifndef INSTALLERQUICK_H
+#define INSTALLERQUICK_H
+
+#include <uibase/game_features/moddatachecker.h>
+#include <uibase/iplugininstallersimple.h>
+
+class InstallerQuick : public MOBase::IPluginInstallerSimple
+{
+ Q_OBJECT
+ Q_INTERFACES(MOBase::IPlugin MOBase::IPluginInstaller MOBase::IPluginInstallerSimple)
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+ Q_PLUGIN_METADATA(IID "org.tannin.InstallerQuick")
+#endif
+
+public:
+ InstallerQuick();
+
+ // Plugin functions:
+ 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<MOBase::PluginSetting> settings() const override;
+
+ // Installer functions:
+ virtual unsigned int priority() const override;
+ virtual bool isManualInstaller() const override;
+ virtual bool
+ isArchiveSupported(std::shared_ptr<const MOBase::IFileTree> tree) const override;
+
+ // Simple installer functions:
+ virtual EInstallResult install(MOBase::GuessedValue<QString>& modName,
+ std::shared_ptr<MOBase::IFileTree>& tree,
+ QString& version, int& modID) override;
+
+private:
+ /**
+ * @brief Check if the archive is a "DataText" archive.
+ *
+ * A "DataText" archive is defined as having exactly one folder named like the data
+ * folder of the game (`dataFolderName`) and one or more text or PDF files (standard
+ * package from french modding site).
+ *
+ * @param tree The tree to check.
+ * @param dataFolderName Name of the data folder (e.g., "data" for gamebryo games).
+ * @param checker The mod data checker, or a null pointer if none is available.
+ *
+ * @return true if the tree represents a "DataText" archive, false otherwise.
+ */
+ bool isDataTextArchiveTopLayer(std::shared_ptr<const MOBase::IFileTree> tree,
+ QString const& dataFolderName,
+ MOBase::ModDataChecker* checker) const;
+
+ /**
+ * @brief Get the base of the archive.
+ *
+ * The base of the archive is either a "DataText" folder (i.e., a folder containing
+ * TXT or PDF files and a valid data folder), or an actual data folder.
+ *
+ * @param tree The tree to check.
+ * @param dataFolderName Name of the data folder (e.g., "data" for gamebryo games).
+ * @param checker The mod data checker, or a null pointer if none is available.
+ *
+ * @return the "base" of the archive, or a null pointer if none was found.
+ */
+ std::shared_ptr<const MOBase::IFileTree>
+ getSimpleArchiveBase(std::shared_ptr<const MOBase::IFileTree> dataTree,
+ QString const& dataFolderName,
+ MOBase::ModDataChecker* checker) const;
+
+private:
+ const MOBase::IOrganizer* m_MOInfo;
+};
+
+#endif // INSTALLERQUICK_H