From 755698f1adceef55f52c8e44c9746537885c9bf7 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Thu, 12 Mar 2026 07:08:09 -0500 Subject: 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 --- libs/form43_checker_native/src/form43checker.cpp | 131 +++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 libs/form43_checker_native/src/form43checker.cpp (limited to 'libs/form43_checker_native/src/form43checker.cpp') diff --git a/libs/form43_checker_native/src/form43checker.cpp b/libs/form43_checker_native/src/form43checker.cpp new file mode 100644 index 0000000..e3cb676 --- /dev/null +++ b/libs/form43_checker_native/src/form43checker.cpp @@ -0,0 +1,131 @@ +#include "form43checker.h" + +#include +#include + +#include +#include + +using namespace MOBase; + +Form43Checker::Form43Checker() : m_organizer(nullptr) {} + +bool Form43Checker::init(IOrganizer* moInfo) +{ + m_organizer = moInfo; + return true; +} + +QString Form43Checker::name() const +{ + return "Form 43 Plugin Checker (Native)"; +} + +QString Form43Checker::localizedName() const +{ + return tr("Form 43 Plugin Checker (Native)"); +} + +QString Form43Checker::author() const +{ + return "AnyOldName3"; +} + +QString Form43Checker::description() const +{ + return tr("Checks plugins (.ESM/.ESP files) to see if any are lower than " + "Form 44 (Skyrim SE)."); +} + +VersionInfo Form43Checker::version() const +{ + return VersionInfo(1, 2, 0, VersionInfo::RELEASE_FINAL); +} + +std::vector> +Form43Checker::requirements() const +{ + return {PluginRequirementFactory::gameDependency("Skyrim Special Edition")}; +} + +QList Form43Checker::settings() const +{ + return {}; +} + +std::vector Form43Checker::activeProblems() const +{ + updateInvalidPlugins(); + if (!m_invalidPlugins.isEmpty()) { + return {PROBLEM_FORM43}; + } + return {}; +} + +QString Form43Checker::shortDescription(unsigned int key) const +{ + return tr("Form 43 (or lower) plugin detected"); +} + +QString Form43Checker::fullDescription(unsigned int key) const +{ + QStringList plugins = listPlugins(); + QString pluginListString = + "

\u2022 " + plugins.join("
\u2022 "); + + QString output = tr("You have one or more plugins that are not form 44. " + "They are:%1") + .arg(pluginListString); + output += "

"; + output += tr( + "Form 43 (or lower) plugins are modules that were made for Skyrim LE " + "(Oldrim) and have not been properly ported to Skyrim Special Edition, " + "which uses form 44 plugins. This usually results in parts of the mod " + "not working correctly." + "

" + "To be converted, these plugins simply need to be opened and saved with " + "the SSE Creation Kit but their presence can be an indication that a mod " + "was not properly ported to SSE and so can potentially have additional " + "issues." + "

" + "Online guides can have more information on how to correctly convert mods " + "for Skyrim SE.
"); + return output; +} + +bool Form43Checker::hasGuidedFix(unsigned int key) const +{ + return false; +} + +void Form43Checker::startGuidedFix(unsigned int key) const {} + +void Form43Checker::updateInvalidPlugins() const +{ + m_invalidPlugins.clear(); + QStringList files = m_organizer->findFiles( + "", QStringList() << "*.esp" << "*.esm"); + for (const QString& file : files) { + int ver = getFormVersion(file); + if (ver != -1 && ver < 44) { + m_invalidPlugins.append(file); + } + } +} + +int Form43Checker::getFormVersion(const QString& file) const +{ + QString pluginName = QFileInfo(file).fileName(); + return m_organizer->pluginList()->formVersion(pluginName); +} + +QStringList Form43Checker::listPlugins() const +{ + QStringList result; + for (const QString& file : m_invalidPlugins) { + QString pluginName = QFileInfo(file).fileName(); + int ver = getFormVersion(file); + result.append(QString("%1 (form %2)").arg(pluginName).arg(ver)); + } + return result; +} -- cgit v1.3.1