aboutsummaryrefslogtreecommitdiff
path: root/libs/plugin_python/src
Commit message (Collapse)AuthorAgeFilesLines
* Prepare Nexus-safe release cleanupSulfurNitride2026-06-171-10/+79
|
* fix updater restart and log cleanupSulfurNitride2026-05-311-2/+0
|
* plugins: surface plugin name and Python exception on init failureSulfurNitride2026-05-161-1/+46
| | | | | | | | | | | | | | | | | | | | | | | "plugin failed to initialize" with no name and no exception text is the canonical first-line indicator for a Python plugin that didn't register — but it tells the user nothing about *which* plugin or *why*. Encountered while diagnosing a flaky first-launch failure where a Python plugin's init() silently returned False on cold boot and succeeded on the next run, plus a Ready or Not instance that wouldn't open. Wrap the IPlugin::init trampoline in pyplugins.h manually instead of relying on PYBIND11_OVERRIDE_PURE so we can: - log the plugin's name and the surrounding hint when init() returns False (typically a plugin swallowing an exception in its own try/except); - catch pybind11::error_already_set and log the Python exception text + traceback before returning False to the C++ caller. plugincontainer.cpp's "plugin failed to initialize" line now also prints the plugin name so the proxied-candidate context is clear. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Remove AppImage build target and runtime referencesSulfurNitride2026-05-011-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We ship via portable tarball directory + .bin self-extracting installer only; the AppImage path was unmaintained and pulling in linuxdeploy tooling for a format we no longer publish. Build: - build.sh: drop appimage/all-includes-appimage modes (now: tarball, installer, all=both, shell). Output listing tracks the directory. - docker/Dockerfile: drop BUILD_APPIMAGE arg and the linuxdeploy download/extract block. - docker/build-inner.sh: drop build_appimage() (~120 lines), AppImage arm of the BUILD_MODE switch, *.AppImage summary listing. - docker/AppRun.sh: deleted. - .gitignore: drop *.AppImage / squashfs-root / *.flatpak entries. Runtime: no longer key off APPIMAGE/APPDIR env vars or AppRun-set state. The fluorine-manager launcher script already exports FLUORINE_ORIG_*, MO2_BASE_DIR, MO2_PLUGINS_DIR, MO2_LIBS_DIR, MO2_PYTHON_DIR for the same purpose, so simplify: - envshortcut: appImageOrBinary -> launcherOrBinary; bundledFluorineIcon no longer probes APPDIR. - nxmhandler: drop APPIMAGE-based wrapper path; use applicationFilePath. - protonlauncher: rename cleanAppImageEnv -> cleanFluorineEnv, drop APPIMAGE/APPDIR/OWD/ARGV0/APPIMAGE_ORIGINAL_EXEC/DESKTOPINTEGRATION removals and .mount_Fluori pattern strip. - prefixsetuprunner: same env-cleaning trim. - utility, library.h, proxypython, mainwindow, moapplication, appconfig: comment cleanup pointing at the launcher instead of AppRun. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Clean up remaining Linux packaging namesSulfurNitride2026-04-294-11/+12
|
* Detect native-Linux Stardew Valley, default executables to no-ProtonSulfurNitride2026-04-252-0/+5
| | | | | | | | | | | | | | | | | Add IPluginGame::isNativeLinux() (virtual, default false) so a plugin can advertise that the discovered installation is a native Linux build. Bound through the Python plugin trampoline so basic_games subclasses can override it. Stardew Valley plugin: when the install dir contains the StardewValley launcher script and no Stardew Valley.exe, report isNativeLinux=true and return Linux-side binary names (StardewValley, StardewModdingAPI). Also fix GameDataPath to "Mods" — Linux ships the SMAPI mods dir with a capital M. ExecutablesList::getPluginExecutables: skip the UseProton flag when the plugin reports native Linux, so the spawn path falls into launchDirect() and the game runs without a Wine prefix.
* VFS perf fixes, icon/stylesheet compat, download filename fixSulfurNitride2026-04-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VFS: - Open backing fd at mo2_open time for read-only handles so mo2_read can splice without re-opening the file on every read call. - Bump RLIMIT_NOFILE at mount time to fit the resulting fd pressure when the game keeps hundreds of BSAs open. - Dedicated node_cache_mutex so resolveByInode / mo2_lookup stop racing unordered_map writes while multiple tree_mutex readers are active. - max_read=1MB + matching conn->max_read and raised max_readahead/max_write so the kernel merges Wine's small sequential reads into bigger FUSE requests. - Per-op wall-clock counters in mo2_init() logs so we can distinguish VFS latency from game-side work. Proton launch: - Write dxvk.conf to the prefix and set DXVK_CONFIG_FILE to force dxvk.enableGraphicsPipelineLibrary=False, avoiding long GPL compile stalls on first run. UI / plugin compat: - Clamp IconDelegate's per-icon width to [8, 16] so narrow content columns don't trigger QIcon::pixmap(0,0) returning null and logging "failed to load icon" every repaint. - Pre-create lowercase symlinks in the stylesheet directory so QSS files authored on Windows resolve url(foo.svg) when on-disk files are Foo.svg. - Flip content icons empty-chessboard.png and facegen.png to 8-bit RGBA so Qt's built-in PNG reader loads them uniformly. - Add mobase.Version.canonicalString shim for legacy Python plugins that still call the old VersionInfo method on appVersion()'s return. - BSPluginList: compare normalized plugin name lists instead of byte hashes so the post-run case-fix refresh stops spuriously firing the "load order changed" dialog. - BSPluginList disabled by default. Download manager: - Parse CDN URL with QUrl + QUrlQuery and read the filename from the response-content-disposition query param (RFC 6266 quoted / unquoted / ext-value forms), not QFileInfo on the raw URL. - When the API or URL gives us a CDN object key (no archive extension), prefer the actual Content-Disposition header from the live response in metaDataChanged and downloadFinished. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Replace winetricks dependency setup with native implementationsSulfurNitride2026-04-051-2/+0
| | | | | | | | | | | | | | | | | | | | Direct DLL extraction and installer execution instead of shelling out to winetricks for all prefix dependencies. Fixes d3dcompiler_47 being sourced from wrong SDK cabs (broke CommunityShaders), and eliminates the fragile cabextract-in-pressure-vessel PATH issue. - d3dcompiler_47: direct download from Mozilla fxc2 repo - d3dcompiler_43, d3dx9, d3dx11_43: cabextract from DirectX June 2010 redist with correct system32/syswow64 mapping - xact/xact_x64: cab extraction + batched regsvr32 registration - vcrun2022: direct installer with msvcp140.dll workaround (Wine #57518) - dotnet6/7/8, dotnetdesktop6: direct x86+x64 installer pairs - Game detection: batched into single .reg file import - All DLL overrides added to WINE_SETTINGS_REG - SHA256 verification for downloaded files - Winetricks kept only for win11 mode step Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Replace Rust prefix setup with C++ step-by-step dialogSulfurNitride2026-04-031-0/+2
| | | | | | | | | | | | | | | | | | | | Move Wine prefix creation from NaK Rust FFI to native C++ with a new modal dialog showing per-step progress, retry support, and proper failure cleanup. - PrefixSetupRunner: runs each step (proton init, drive cleanup, 11 individual winetricks verbs, .NET installers, game detection, wine registry, win11 mode, post-setup) as discrete retryable operations - PrefixSetupDialog: step list with status icons, filtered log output, cancel/retry-failed/delete-prefix buttons - Downloads use QNetworkAccessManager (no host curl dependency) - Zip extraction uses downloaded 7zz binary (no host unzip dependency) - Winetricks runs on host (not in pressure-vessel) so cabextract is always findable via PATH - Wine/winetricks debug spam filtered from log output - Skip Python basic_games proxy since native equivalent exists Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Block rootbuilder directory plugin in Python proxySulfurNitride2026-03-281-1/+2
| | | | | | | | The hard-blacklist in plugincontainer.cpp only catches rootbuilder at the top-level scan, but the Python proxy independently scans the plugins directory for packages (dirs with __init__.py) and was still loading it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Multi-dir plugin loading, VFS Root Builder, Wine registry check, column ↵SulfurNitride2026-03-221-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | visibility fix Plugin loading: - Remove symlink-based ensureBundledPluginsLinked(), replace with multi-dir search (bundled dir takes priority, instance dir adds extras only) - Auto-clean stale symlinks from instance plugins/ dirs on startup - Add mergedProxyList() for proxy plugin discovery across both dirs VFS Root Builder (replaces Python rootbuilder.py): - Native C++ Root Builder integrated into FuseConnector - Deploy mod Root/ files to game dir before FUSE mount, clear on unmount - Per-instance toggle in Instance Manager (default: on) - Root Builder path normalization in processrunner.cpp: rewrite binary and start-in paths from mods/.../Root/ to Game Root for correct Wine path resolution (fixes SKSE + EngineFixes versionlib lookup) - Expose game dir and prefix to SLR pressure-vessel via --filesystem= Wine registry check: - Read/write Wine prefix system.reg (HKLM) with timestamp-aware parsing - Auto-check game install path before launch, prompt to fix if mismatched - Updates both Software\ and Wow6432Node\ registry keys Column visibility fix: - Guard updateGroupByProxy() during QHeaderView::restoreState() to prevent sort indicator restoration from triggering setSourceModel() which resets all columns to visible Python proxy: - Skip FixGameRegKey.py, crashlogtools, rootbuilder.py (Windows-only or replaced by native implementations) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Bundle PBS Python 3.12 + PyQt6, restore Python plugins as .py filesSulfurNitride2026-03-131-67/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace portable Python approach with python-build-standalone 3.12.13 (20260310 release) bundled directly in the distribution. Python is now always available without user setup — removes the Python settings tab. - PyQt6 staged to plugins/libs/PyQt6/ with bundled Qt stripped out; patchelf'd to use our existing bundled Qt in lib/ instead of duplicating it. - Restored native-converted plugins back to .py files: Form43Checker, ScriptExtenderPluginChecker, DDSPreview, basic_games, rootbuilder, installer_omod. Removed all *_native CMake targets. - pythonrunner.cpp: removed venv/MO2_PYTHON_DIR lookup; always uses bundled Python at <exe_dir>/python, system Python as last-resort fallback. - plugincontainer.cpp: removed fluorine/python_enabled gate (Python always loads), demoted proxy loading log messages from warn to debug, silenced [plugin-diag] stderr spam. - Dockerfile: switched from uv venv to PBS install_only tarball; PBS Python used for both build-time pybind11 compilation and runtime distribution. - build-inner.sh: aggressive Python staging (strip test/tkinter/ensurepip/ distutils/lib2to3/idlelib; wipe build-time site-packages, restore psutil+vdf). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Replace Python plugins with native C++ .so, remove bundled Python (~95MB)SulfurNitride2026-03-121-68/+114
| | | | | | | | | | | | | | - 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>
* Fix AppImage plugin loading, save timestamps, and INI corruptionSulfurNitride2026-02-201-42/+60
| | | | | | | | | | | | | | | | | | - Add AppConfig::pluginsPath()/dllsPath() that respect MO2_PLUGINS_DIR and MO2_DLLS_DIR env vars, fixing plugin discovery when plugins live inside read-only AppImage squashfs (#22, game plugin not found errors) - Preserve file modification times in save deploy/sync so games display correct save timestamps instead of all showing the same time (#17) - Replace QSettings INI reader in saves tab with direct line-by-line parser to avoid backslash-as-line-continuation corruption of sLocalSavePath=__MO_Saves\ (#22, saves tab showing wrong directory) - Add diagnostic logging to plugin symlink creation, save backup/restore operations to help diagnose silent failures through prefix symlinks - Fix Python SONAME mismatch in AppImage build (patch portable Python SONAME to match librunner.so DT_NEEDED, preventing dual libpython load) - Bundle PyQt6 Qt dependencies, improve RPATH for lib/ and plugins/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add Python init diagnostics, AppImage build system, misc Linux fixesSulfurNitride2026-02-192-52/+133
| | | | | | | | | | | | | | | | | | | | - python: switch Py_InitializeEx → Py_InitializeFromConfig for explicit error reporting; add dladdr + fprintf diagnostics to trace which DSO Python symbols resolve to and whether Py_IsInitialized succeeds - python: log RTLD_NOLOAD vs fresh-load outcome when promoting libpython to RTLD_GLOBAL - build: add Docker-based AppImage build script (build.sh), update Dockerfile and build-inner.sh for AppImage-only workflow - build: remove Flatpak support entirely; move AppImage metadata (desktop/metainfo/icon) from flatpak/ to data/ - Add Monster Hunter Wilds basic_games plugin - .gitignore: exclude squashfs-root, build-source, flatpak-repo, __pycache__, fomod-plus-settings.ini - Various Linux port fixes across wineprefix, processrunner, proton launcher, FUSE connector, instance manager, download manager, sanitychecks, and NaK Rust paths/runtime_wrap Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Migrate data paths to ~/.local/share/fluorine/, add native build, fix ↵SulfurNitride2026-02-145-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | %command% and system Proton scanning - All data paths migrated from ~/.var/app/com.fluorine.manager/ to ~/.local/share/fluorine/ so native and Flatpak builds share the same instances, plugins, and configs - New fluorinepaths.h/.cpp with fluorineDataDir() helper and one-time migration from old path (writes MOVED.txt breadcrumb) - New libs/nak/src/paths.rs as Rust equivalent (data_dir()) - Strip %command% tokens from launch wrapper in protonlauncher.cpp - Always scan /usr/share/steam/compatibilitytools.d/ for system Proton packages (Arch installs Proton there); add Flatpak filesystem permission - Native build (build-native.sh) installs to ~/.local/share/fluorine/ with desktop entry and ~/.local/bin symlink instead of portable zip - build-flatpak.sh wrapper for Flatpak builds - Fix container locale (LANG=C.UTF-8) for AutoUic warnings - Fix prefixExists() to handle both compatdata and pfx directory layouts - Fix globalInstancesRootPath() to use fluorineDataDir() on Linux - Fix umu-run Flatpak lookup to use fluorineDataDir() - Update README with build instructions and Arch dependency list Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add FUSE external mapping support, BG3/Oblivion Remastered fixes, fomod-plus ↵SulfurNitride2026-02-141-0/+10
| | | | | | | | | | | | | | | and NaK integration FUSE VFS now deploys non-data-dir mod mappings (Paks, OBSE, UE4SS, etc.) via real symlinks and injects file-level data-dir mappings (plugins.txt, loadorder.txt) into the VFS tree. Fixes game launches for Oblivion Remastered (Root Builder path resolution, script extender support) and BG3 (Wine prefix documents directory, file mapper symlinks on Linux). Vendors mo2-fomod-plus plugin and NaK crate for FOMOD installer and game finder/runtime support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fluorine Manager: full Linux port of Mod Organizer 2SulfurNitride2026-02-1154-0/+6885
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>