diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-03-12 07:08:09 -0500 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-03-12 07:08:09 -0500 |
| commit | 755698f1adceef55f52c8e44c9746537885c9bf7 (patch) | |
| tree | 23d1a9fea936805708eeccf2ac2684620565d328 /libs/script_extender_checker_native/src/scriptextenderchecker.h | |
| parent | 019870ffd8308d94289d72d45abeb3db39ccde92 (diff) | |
Replace Python plugins with native C++ .so, remove bundled Python (~95MB)
- Add native plugins: form43_checker, script_extender_checker, preview_dds,
basic_games (75 game defs via IPluginProxy pattern with Steam/GOG detection)
- Remove portable Python from Dockerfile and build-inner.sh
- Add Python settings tab with venv support (system python3 + PyQt6)
- Skip loading plugin_python.so when Python disabled (default: off)
- Update pythonrunner.cpp to use venv at ~/.local/share/fluorine/python-venv/
- Preserve real file permissions in FUSE VFS (fixes native executable +x bits)
- Add FUSE_SET_ATTR_MODE handler so chmod works through VFS
- Fix desktop shortcut Exec= to use fluorine-manager launcher, not bare binary
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/script_extender_checker_native/src/scriptextenderchecker.h')
| -rw-r--r-- | libs/script_extender_checker_native/src/scriptextenderchecker.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/libs/script_extender_checker_native/src/scriptextenderchecker.h b/libs/script_extender_checker_native/src/scriptextenderchecker.h new file mode 100644 index 0000000..8dbadcb --- /dev/null +++ b/libs/script_extender_checker_native/src/scriptextenderchecker.h @@ -0,0 +1,72 @@ +#ifndef SCRIPTEXTENDERCHECKER_H +#define SCRIPTEXTENDERCHECKER_H + +#include <memory> + +#include <QString> +#include <QStringList> + +#include <uibase/iplugin.h> +#include <uibase/iplugindiagnose.h> +#include <uibase/pluginrequirements.h> + +class ScriptExtenderChecker : public QObject, + public MOBase::IPlugin, + public MOBase::IPluginDiagnose +{ + Q_OBJECT + Q_INTERFACES(MOBase::IPlugin MOBase::IPluginDiagnose) + Q_PLUGIN_METADATA(IID "org.tannin.ScriptExtenderCheckerNative") + +public: + ScriptExtenderChecker(); + +public: // IPlugin + 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; + std::vector<std::shared_ptr<const MOBase::IPluginRequirement>> + requirements() const override; + QList<MOBase::PluginSetting> settings() const override; + +public: // IPluginDiagnose + std::vector<unsigned int> activeProblems() const override; + QString shortDescription(unsigned int key) const override; + QString fullDescription(unsigned int key) const override; + bool hasGuidedFix(unsigned int key) const override; + void startGuidedFix(unsigned int key) const override; + +private: + static const unsigned int PROBLEM_PLUGIN_LOAD = 0; + + enum class LogLocation { Docs, Install }; + + struct GameType { + LogLocation base; + QString gameSuffix; + QString editorSuffix; // empty if no editor log + }; + + struct PluginMessage { + QString pluginPath; + QString origin; + QString message; + bool success; + }; + + QStringList listBadPluginMessages() const; + QList<PluginMessage> parseLog(const QString& logPath) const; + PluginMessage parseNormalLine(const QRegularExpressionMatch& match) const; + PluginMessage parseCouldntLoadLine(const QRegularExpressionMatch& match) const; + PluginMessage parseNotAPluginLine(const QRegularExpressionMatch& match) const; + QString resolveOrigin(const QString& pluginPath) const; + + static const QMap<QString, GameType>& supportedGames(); + + MOBase::IOrganizer* m_organizer; +}; + +#endif // SCRIPTEXTENDERCHECKER_H |
