feat(plugins): replace the shop with drag-and-drop .fwspacm packages

The shop was a catalogue served over HTTP that the application fetched and
listed, which put a network round trip between a user and a plugin that was
almost always one file they already had. It also had to keep its catalogue
URLs in step with every release, since an entry that pointed at a missing
asset was indistinguishable from one that never worked.

A plugin is now distributed as a .fwspacm package: a ZIP archive holding a
plugin.json manifest and the shared library, which the user drops anywhere
on the window. The file is the distribution, so there is no catalogue to
publish, no network, and no catalogue URL setting to explain. The manifest
tells the user what they are about to run, and its checksum is verified
before anything is written, so a package whose library is not the one it
declares never reaches the plugin directory.

Qt exposes no public ZIP API, so the archive is read directly (central
directory plus zlib for the deflated entries) rather than through a private
header that could move between toolchains. The reader stays in the logic
layer: app-core-test still links no QtWidgets, and a unit test builds its
own archives to check both compression methods and every refusal path.
This commit is contained in:
BlackAngelTV committed 2026-09-28 21:52:50 +02:00
1 parent ed8185d5fe
commit f6c8cedf93
29 files changed
+2105 -1046

No files matched your search

+11 -6
View File
@@ -29,8 +29,9 @@ l'exécution.
Dans cet ordre :
1. `<dossier de l'exécutable>/plugins/` — les plugins livrés avec l'application ;
2. `~/.local/share/PacManager/plugins/` — ceux de l'utilisateur **et ceux du
magasin** (voir [magasin-de-plugins.md](magasin-de-plugins.md)) ;
2. `~/.local/share/PacManager/plugins/` — ceux de l'utilisateur **et ceux
installés depuis un paquet** (voir
[paquets-de-plugin.md](paquets-de-plugin.md)) ;
3. `<prefix>/lib/PacManager/plugins/` et `<prefix>/lib64/PacManager/plugins/`
pour une installation système.
@@ -187,10 +188,14 @@ g++ -std=c++17 -fPIC -shared -I<PacManager>/include \
-I<PacManager>/plugins/flatpak-provider \
my-provider.cpp -o libmy-provider.so
cp libmy-provider.so ~/.local/share/PacManager/plugins/
# La façon de le distribuer : un paquet que l'utilisateur dépose sur la fenêtre.
./make-plugin-package.py libmy-provider.so \
--id myprov --name "My Provider" --version 1.0.0 --author "Jane Doe"
```
Puis **Recharger** dans la page Plugins (aucun redémarrage nécessaire).
Le dépôt est expliqué dans [paquets-de-plugin.md](paquets-de-plugin.md). Pour
tester en place, un `cp libmy-provider.so ~/.local/share/PacManager/plugins/`
puis **Recharger** dans la page Plugins (aucun redémarrage nécessaire).
### Règles à respecter
@@ -217,5 +222,5 @@ Puis **Recharger** dans la page Plugins (aucun redémarrage nécessaire).
| Plantage à l'activation | Bibliothèque compilée avec d'autres en-têtes / un autre compilateur. |
| Le plugin s'affiche mais reste inactif | Le réglage d'activation est par identifiant : vérifier l'`id` déclaré, pas le nom de fichier. |
Voir aussi [magasin-de-plugins.md](magasin-de-plugins.md) pour installer un
plugin depuis un catalogue au lieu de copier un fichier à la main.
Voir aussi [paquets-de-plugin.md](paquets-de-plugin.md) pour le format du
paquet `.fwspacm` et le script qui le produit.