docs: describe flatpak as an external plugin in the READMEs
Updates both READMEs so the architecture and providers sections reflect that pacman is built-in while Flatpak ships as a runtime-loaded plugin. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2 files changed
+9
-10
No files matched your search
+5
-5
@@ -19,8 +19,7 @@ package-manager/
|
||||
├── include/
|
||||
│ ├── package-manager.h # Package manager interface (IPackageManager)
|
||||
│ ├── provider-plugin.h # C ABI contract for provider plugins
|
||||
│ ├── pacman-manager.h # pacman manager (Arch Linux)
|
||||
│ ├── flatpak-manager.h # Flatpak manager
|
||||
│ ├── pacman-manager.h # pacman manager (Arch Linux, built-in)
|
||||
│ ├── plugin-manager.h # Provider registry + plugin loading
|
||||
│ ├── main-window.h # Main GUI
|
||||
│ ├── history-manager.h # Action history
|
||||
@@ -34,7 +33,8 @@ package-manager/
|
||||
│ ├── history-manager.cpp
|
||||
│ └── package-model.cpp
|
||||
├── plugins/
|
||||
│ └── example-provider/ # Example external plugin (template)
|
||||
│ ├── example-provider/ # Example external plugin (template)
|
||||
│ └── flatpak-provider/ # Flatpak plugin (loaded at runtime)
|
||||
├── tests/ # Unit tests (assert, no Qt)
|
||||
└── resources/
|
||||
```
|
||||
@@ -144,7 +144,7 @@ The interface uses **Qt6** with a dark theme, a **navigation sidebar** and stack
|
||||
|
||||
## Package managers (providers)
|
||||
|
||||
The `IPackageManager` interface (implemented by `PacmanManager` and `FlatpakManager`) defines:
|
||||
The `IPackageManager` interface (implemented by the built-in `PacmanManager` and the Flatpak plugin) defines:
|
||||
|
||||
| Method | Description |
|
||||
|--------|-------------|
|
||||
@@ -170,7 +170,7 @@ Search queries **all active providers at once**: every result shows its origin i
|
||||
|
||||
### Adding a provider (plugins)
|
||||
|
||||
Pacman and Flatpak are **built-in**. Flatpak installs auto-add the flathub remote when missing and fall back to a **per-user** install (no password) when the system-wide install fails (polkit, homonymous remotes) — the real error is shown on failure. An app installed via Flatpak appears immediately in the desktop launcher: its `.desktop` entries and icons are linked into `~/.local/share/applications` and `~/.local/share/icons` (the XDG dirs scanned by **every** environment: wofi, GNOME, KDE…), exactly like a pacman install, and are removed again on uninstall. Search shows the real status of each app (Installed / Update available). This is covered by an **integration test** that drives the real flatpak CLI (install, list, update, search, uninstall). To add another manager (apt, dnf, zypper, or another distro's repos) without touching the application:
|
||||
**Pacman** is **built-in** (compiled into the application); **Flatpak** is an **external plugin** loaded at runtime from `plugins/` (`plugins/flatpak-provider`), next to the executable or in `~/.local/share/PacManager/plugins/`. Flatpak installs auto-add the flathub remote when missing and fall back to a **per-user** install (no password) when the system-wide install fails (polkit, homonymous remotes) — the real error is shown on failure. An app installed via Flatpak appears immediately in the desktop launcher: its `.desktop` entries and icons are linked into `~/.local/share/applications` and `~/.local/share/icons` (the XDG dirs scanned by **every** environment: wofi, GNOME, KDE…), exactly like a pacman install, and are removed again on uninstall. Search shows the real status of each app (Installed / Update available). This is covered by an **integration test** that drives the real flatpak CLI (install, list, update, search, uninstall). To add another manager (apt, dnf, zypper, or another distro's repos) without touching the application:
|
||||
|
||||
1. Implement `IPackageManager` in a `.cpp` file (copy `plugins/example-provider/example-provider.cpp` as a template).
|
||||
2. Export the C ABI contract with the `FWS_PROVIDER_PLUGIN(MyManager, "id", "Name", "1.0.0", "Description", "Author")` macro.
|
||||
|
||||
Reference in new issue
Block a user