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/game_features/src/moddatachecker.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/game_features/src/moddatachecker.h')
| -rw-r--r-- | libs/game_features/src/moddatachecker.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/libs/game_features/src/moddatachecker.h b/libs/game_features/src/moddatachecker.h new file mode 100644 index 0000000..7c4c404 --- /dev/null +++ b/libs/game_features/src/moddatachecker.h @@ -0,0 +1,68 @@ +#ifndef MODDATACHECKER_H +#define MODDATACHECKER_H + +#include <memory> + +namespace MOBase { + + class IFileTree; + +}; + +class ModDataChecker { +public: + + /** + * + */ + enum class CheckReturn { + INVALID, + FIXABLE, + VALID + }; + + /** + * @brief Check that the given filetree represent a valid mod layout, or can be easily + * fixed. + * + * This method is mainly used during installation (to find which installer should + * be used or to recurse into multi-level archives), or to quickly indicates to a + * user if a mod looks valid. + * + * This method does not have to be exact, it only has to indicate if the given tree + * looks like a valid mod or not by quickly checking the structure (heavy operations + * should be avoided). + * + * If the tree can be fixed by the `fix()` method, this method should return `FIXABLE`. + * `FIXABLE` should only be returned when it is guaranteed that `fix()` can fix the tree. + * + * @param tree The tree starting at the root of the "data" folder. + * + * @return whether the tree is invalid, fixable or valid. + */ + virtual CheckReturn dataLooksValid(std::shared_ptr<const MOBase::IFileTree> fileTree) const = 0; + + /** + * @brief Try to fix the given tree. + * + * This method is used during installation to try to fix invalid archives and will only be + * called if dataLooksValid returned `FIXABLE`. + * + * @param tree The tree to try to fix. Can be modified during the process. + * + * @return the fixed tree, or a null pointer if the tree could not be fixed. + */ + virtual std::shared_ptr<MOBase::IFileTree> fix(std::shared_ptr<MOBase::IFileTree> fileTree) const { + return nullptr; + } + +public: + + /** + * + */ + virtual ~ModDataChecker() { } + +}; + +#endif
\ No newline at end of file |
