diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-04-10 05:03:45 -0500 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-04-10 05:03:45 -0500 |
| commit | 01abc6994d9a477904af3fdf326ee2fc7163b3e1 (patch) | |
| tree | 12a33d5712002e3ebf180f4666c5a45ac688bf79 /libs/tool_bethinipie/src/bethinipie.h | |
| parent | 0b726b03d0d5c018004af438c8080f8d5ea7d432 (diff) | |
Add BethINI Pie tool plugin
Native IPluginTool that integrates BethINI Pie (performance INI editor)
into the Tools menu. Auto-downloads the latest Linux build from GitHub
releases, checks for updates via commit SHA, and pre-configures it for
the current game and profile INI directory.
Supports: Skyrim SE, Fallout 4, Fallout New Vegas, Starfield.
Includes post-extraction fixes for PyInstaller bundle quirks:
- Patches tm.tcl hardcoded Tcl module path
- Symlinks apps/icons/fonts from _internal/ to executable directory
- Sets TCL_LIBRARY/TK_LIBRARY env vars on launch
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'libs/tool_bethinipie/src/bethinipie.h')
| -rw-r--r-- | libs/tool_bethinipie/src/bethinipie.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/libs/tool_bethinipie/src/bethinipie.h b/libs/tool_bethinipie/src/bethinipie.h new file mode 100644 index 0000000..b52d5a9 --- /dev/null +++ b/libs/tool_bethinipie/src/bethinipie.h @@ -0,0 +1,64 @@ +#ifndef BETHINIPIE_H +#define BETHINIPIE_H + +#include <uibase/iplugintool.h> + +class QNetworkAccessManager; + +class BethiniPie : public MOBase::IPluginTool +{ + Q_OBJECT + Q_INTERFACES(MOBase::IPlugin MOBase::IPluginTool) + Q_PLUGIN_METADATA(IID "com.fluorine.BethiniPie") + +public: + BethiniPie(); + + bool init(MOBase::IOrganizer* moInfo) override; + QString name() const override; + QString localizedName() const override; + QString author() const override; + QString description() const override; + MOBase::VersionInfo version() const override; + QList<MOBase::PluginSetting> settings() const override; + + QString displayName() const override; + QString tooltip() const override; + QIcon icon() const override; + +public slots: + void display() const override; + +private: + /// Returns ~/.local/share/fluorine/tools/bethini-pie/ + QString toolDir() const; + + /// Returns the path to the BethiniPie executable inside toolDir() + QString executablePath() const; + + /// Returns the stored SHA from .sha file, or empty string + QString localSha() const; + + /// Writes the SHA to .sha file + void saveLocalSha(const QString& sha) const; + + /// Maps Fluorine game name to BethIni Pie app name (they match, but provides + /// a validation point) + QString bethiniGameName() const; + + /// Returns the BethIni.ini directory key for the current game + /// e.g. "sSkyrim Special EditionINIPath" + QString iniDirectoryKey() const; + + /// Writes/updates the Bethini.ini config pointing at the profile's INI directory + void writeBethiniConfig(const QString& bethiniDir, + const QString& iniPath) const; + + /// Checks for update and downloads if needed. Returns true if ready to launch. + bool ensureUpToDate() const; + + const MOBase::IOrganizer* m_MOInfo; + mutable QNetworkAccessManager* m_Network; +}; + +#endif // BETHINIPIE_H |
