diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-11 02:37:39 -0600 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-11 02:37:39 -0600 |
| commit | 7ee008e150bc5bcf76082d726f719ee0fdfda982 (patch) | |
| tree | 27fb39be241fdb5ac2734c574de678977d1856d0 /libs/installer_omod/src/OMODFrameworkWrapper.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_omod/src/OMODFrameworkWrapper.h')
| -rw-r--r-- | libs/installer_omod/src/OMODFrameworkWrapper.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/libs/installer_omod/src/OMODFrameworkWrapper.h b/libs/installer_omod/src/OMODFrameworkWrapper.h new file mode 100644 index 0000000..50251f0 --- /dev/null +++ b/libs/installer_omod/src/OMODFrameworkWrapper.h @@ -0,0 +1,69 @@ +#pragma once + +#include <QCoreApplication> +#include <QProgressDialog> +#include <QStack> + +#include <uibase/iplugininstaller.h> + +#include "implementations/CodeProgress.h" +#include "QObject_unique_ptr.h" + +// define this here as it's going to be used a lot by things using this class' message box wrappers. +template<class T> +T& unused_out(T&& t) { return t; } + +class OMODFrameworkWrapper : public QObject +{ + Q_OBJECT + +public: + using EInstallResult = MOBase::IPluginInstaller::EInstallResult; + + OMODFrameworkWrapper(MOBase::IOrganizer* organizer, QWidget* parentWidget = nullptr); + + EInstallResult installInAnotherThread(MOBase::GuessedValue<QString>& modName, QString gameName, const QString& archiveName, const QString& version, int nexusID); + + EInstallResult install(MOBase::GuessedValue<QString>& modName, QString gameName, const QString& archiveName, const QString& version, int nexusID); + + void setParentWidget(QWidget* parentWidget); + + void onInstallationEnd(EInstallResult status, MOBase::IModInterface* mod); + +protected: + void initFrameworkSettings(); + + void refreshFrameworkSettings(); + + void pushTempPath(const QString& tempPath); + + void popTempPath(); + +signals: + void pickModName(bool& successOut, MOBase::GuessedValue<QString>& modName); + + void createMod(MOBase::IModInterface*& modInterfaceOut, MOBase::GuessedValue<QString>& modName); + + void displayReadme(const QString& modName, const QString& readme); + + void showWaitDialog(QString message); + void hideWaitDialog(); + +protected slots: + void pickModNameSlot(bool& successOut, MOBase::GuessedValue<QString>& modName); + void createModSlot(MOBase::IModInterface*& modInterfaceOut, MOBase::GuessedValue<QString>& modName); + void displayReadmeSlot(const QString& modName, const QString& readme); + + void showWaitDialogSlot(QString message); + void hideWaitDialogSlot(); + +private: + __declspec(noinline) void constructorHelper(); + + MOBase::IOrganizer* mMoInfo; + QWidget* mParentWidget; + + QStack<QString> mTempPathStack; + + QObject_unique_ptr<QProgressDialog> mWaitDialog; +}; |
