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:
29 files changed
+2105
-1046
No files matched your search
@@ -56,6 +56,8 @@ package-manager/
|
||||
│ ├── provider-plugin.h # Contrat C ABI des plugins (fournisseurs + addons)
|
||||
│ ├── pacman-manager.h # Gestionnaire pacman (Arch Linux, intégré)
|
||||
│ ├── plugin-manager.h # Registre des plugins + chargement des bibliothèques
|
||||
│ ├── plugin-package.h # Installation d'un paquet de plugin .fwspacm
|
||||
│ ├── zip-archive.h # Lecteur ZIP minimal (zlib)
|
||||
│ ├── main-window.h # INTERFACE : le cadre de la fenêtre
|
||||
│ ├── history-manager.h # Historique des actions
|
||||
│ ├── package-model.h # Modèle Qt pour la liste
|
||||
@@ -84,6 +86,7 @@ package-manager/
|
||||
│ ├── example-provider/ # Plugin fournisseur externe d'exemple (modèle à copier)
|
||||
│ ├── example-addon/ # Plugin addon externe d'exemple (extension, modèle à copier)
|
||||
│ └── flatpak-provider/ # Plugin Flatpak (chargé à l'exécution, construit par défaut)
|
||||
├── make-plugin-package.py # Construit un paquet .fwspacm depuis une bibliothèque
|
||||
├── tests/ # Tests unitaires (assert, sans Qt)
|
||||
└── resources/
|
||||
```
|
||||
@@ -246,6 +249,24 @@ Deux types de plugins coexistent, tous deux écrits en **C++** :
|
||||
- **Fournisseurs** (`IPackageManager`) : ajoutent un gestionnaire de paquets (pacman intégré, Flatpak externe, apt, dnf, …) ;
|
||||
- **Extensions / addons** (`IPlugin`) : tout le reste — addon graphique, helper, amélioration du chargement… — sans rapport avec la gestion de paquets.
|
||||
|
||||
### Installer un plugin : un fichier `.fwspacm`
|
||||
|
||||
Il n'y a pas de magasin. Un plugin se distribue sous forme d'un **paquet
|
||||
`.fwspacm`** — une archive ZIP contenant un manifeste `plugin.json` et la
|
||||
bibliothèque — que l'utilisateur **dépose sur la fenêtre**. Pas de catalogue, pas
|
||||
de réseau, pas de bouton : le fichier *est* la distribution.
|
||||
|
||||
Le script de la racine du dépôt construit le paquet à partir d'une bibliothèque
|
||||
compilée :
|
||||
|
||||
```bash
|
||||
./make-plugin-package.py build/libsample-provider.so \
|
||||
--id sample-provider --name "Mon fournisseur" --version 1.0.0
|
||||
```
|
||||
|
||||
Le format du manifeste, les règles de sécurité et le dépannage sont dans
|
||||
[doc/paquets-de-plugin.md](doc/paquets-de-plugin.md).
|
||||
|
||||
L'interface `IPackageManager` (implémentée par `PacmanManager` et `FlatpakManager`) définit :
|
||||
|
||||
| Méthode | Description |
|
||||
|
||||
Reference in new issue
Block a user