aboutsummaryrefslogtreecommitdiff
path: root/libs/plugin_python/tests/runner/plugins/dummy-installer.py
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-11 02:37:39 -0600
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-11 02:37:39 -0600
commit7ee008e150bc5bcf76082d726f719ee0fdfda982 (patch)
tree27fb39be241fdb5ac2734c574de678977d1856d0 /libs/plugin_python/tests/runner/plugins/dummy-installer.py
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/plugin_python/tests/runner/plugins/dummy-installer.py')
-rw-r--r--libs/plugin_python/tests/runner/plugins/dummy-installer.py46
1 files changed, 46 insertions, 0 deletions
diff --git a/libs/plugin_python/tests/runner/plugins/dummy-installer.py b/libs/plugin_python/tests/runner/plugins/dummy-installer.py
new file mode 100644
index 0000000..3c4e67e
--- /dev/null
+++ b/libs/plugin_python/tests/runner/plugins/dummy-installer.py
@@ -0,0 +1,46 @@
+# -*- encoding: utf-8 -*-
+
+from typing import Union, cast
+
+import mobase
+
+
+# we do not implement everything since this will do fine if we do not call anything
+# from the C++ side
+#
+class DummyInstaller(mobase.IPluginInstallerSimple):
+ def isManualInstaller(self) -> bool:
+ return False
+
+ def priority(self) -> int:
+ return 10
+
+ def isArchiveSupported(self, tree: mobase.IFileTree) -> bool:
+ return tree.find("needed-file.txt") is not None
+
+ def install(
+ self,
+ name: mobase.GuessedString,
+ tree: mobase.IFileTree,
+ version: str,
+ nexus_id: int,
+ ) -> Union[
+ mobase.InstallResult,
+ mobase.IFileTree,
+ tuple[mobase.InstallResult, mobase.IFileTree, str, int],
+ ]:
+ if tree.find("needed-file.txt") is None:
+ return mobase.InstallResult.FAILED
+
+ if tree.find("extra-file.txt"):
+ name.update("new name")
+ new_tree = tree.createOrphanTree()
+ new_tree.move(tree, "subtree")
+ cast(mobase.IFileTree, new_tree.find("subtree")).remove("extra-file.txt")
+ return new_tree
+
+ return (mobase.InstallResult.NOT_ATTEMPTED, tree, "2.4.5", 33)
+
+
+def createPlugin() -> mobase.IPlugin:
+ return DummyInstaller() # type: ignore