7 Commits
Author SHA1 Message Date
BlackAngelTV 63ad81ef23 docs(tree): point the documentation at the new folders
Every path the documentation named had moved, and the source tree diagram
still showed the two flat folders. The diagram now shows a folder per
domain, and each file is cited where it now lives.

The paths that did not move are left alone on purpose: plugins/ next to the
executable and under ~/.local/share/PacManager/ are where PacManager looks
for plugins at run time, not folders in this repository. The plugin build
command in plugins.md is the one exception, and it is updated to the SDK's
new in-tree location — checked, it still compiles.
2026-09-29 21:28:31 +02:00
BlackAngelTV 3e85db87b2 refactor(pages): group the screens by what the user is doing
pages/ was a flat row of eight screens, so a change to one meant scanning
the whole folder to see what else was in it. The screens now sit in
packages/ (browse, cleanup), overview/ (dashboard, history), system/
(logs, settings) and extensions/ (plugins), with the scaffolding they
all build on — the Page base and the shared widgets — in base/.
2026-09-29 21:26:51 +02:00
BlackAngelTV 5a6aaae244 refactor(tree): give the logic layer and the shell a folder each
src/ and include/ are what is left: the controller the screens delegate
to, its workers and its data model (core/), and the window and entry
point that hold them together (app/). With those moved, src/ and
include/ are empty and go away — a header is now always next to its
source, in a folder named after what it does.
2026-09-29 21:26:04 +02:00
BlackAngelTV c63b231778 refactor(tree): split the plugin host from the providers it loads
plugins/ held two unrelated things: the host that discovers and installs
plugins, and the plugins themselves. The host moves to plugins/ with the
built-in pacman provider beside it in providers/, where the external
providers already live — so plugins/ is now one thing, and the name says
which.

The external plugin projects only change folder, not layout: providers/
holds aur-provider, flatpak-provider, example-provider and example-addon.
2026-09-29 21:25:34 +02:00
BlackAngelTV 2395ba3f17 refactor(tree): give the history, the archive and the self-update a folder
Three self-contained things shared src/ with the rest: the operation
history, the zip reader behind the .fwspacm installer, and the
self-update. Each moves to its own folder — history/, archive/ and
update/ — so a change to one does not have to reason about the others.
2026-09-29 21:25:03 +02:00
BlackAngelTV 9c30268810 refactor(tree): move the journal and the preferences out of src/ and include/
The journal and the preferences were two of the many things src/ held, so
"where does this live" meant reading the file to find out. They now have a
folder each — logging/ and preferences/ — with the header next to its
source, the way pages/ has always been laid out.

Flat #include still resolves: the folders join the include path.
2026-09-29 21:24:27 +02:00
BlackAngelTV 91f88b1acc refactor(sdk): gather the plugin headers under include/sdk
include/ held the public plugin interface (package-manager.h, plugin.h,
provider-plugin.h, progress-tracker.h) next to the application's own
headers, so telling them apart meant knowing which four were special.

They move to include/sdk/. The installed layout does not change: make
install still puts them flat in include/PacManager, so a plugin author's
existing -I keeps working. The include path gains include/sdk, so the
flat #include in the sources and in every plugin stays as it was.
2026-09-29 21:23:37 +02:00
71 changed files with 173 additions and 153 deletions

No files matched your search

+94 -93
View File
@@ -28,68 +28,69 @@ find_package(ZLIB REQUIRED)
# Main executable
set(SOURCES
src/main.cpp
src/main-window.cpp
src/pacman-manager.cpp
src/plugin-manager.cpp
src/history-manager.cpp
src/package-model.cpp
src/update-manager.cpp
src/app-logging.cpp
src/app-settings.cpp
src/language-manager.cpp
app/main.cpp
app/main-window.cpp
providers/pacman-manager.cpp
plugins/plugin-manager.cpp
history/history-manager.cpp
core/package-model.cpp
update/update-manager.cpp
logging/app-logging.cpp
preferences/app-settings.cpp
preferences/language-manager.cpp
# Logic layer: background workers, the plugin package installer and the
# controller the screens delegate to.
src/workers.cpp
src/zip-archive.cpp
src/plugin-package.cpp
src/app-core.cpp
core/workers.cpp
archive/zip-archive.cpp
plugins/plugin-package.cpp
core/app-core.cpp
# Interface: one file per screen under pages/, on top of the logic layer.
pages/page.cpp
pages/ui-kit.cpp
pages/dashboard-page.cpp
pages/browse-page.cpp
pages/cleanup-page.cpp
pages/history-page.cpp
src/log-manager.cpp
pages/logs-page.cpp
pages/plugins-page.cpp
pages/settings-page.cpp
pages/base/page.cpp
pages/base/ui-kit.cpp
pages/overview/dashboard-page.cpp
pages/packages/browse-page.cpp
pages/packages/cleanup-page.cpp
pages/overview/history-page.cpp
logging/log-manager.cpp
pages/system/logs-page.cpp
pages/extensions/plugins-page.cpp
pages/system/settings-page.cpp
resources/resources.qrc
)
set(HEADERS
include/package-manager.h
include/pacman-manager.h
include/plugin-manager.h
include/provider-plugin.h
include/main-window.h
include/history-manager.h
include/package-model.h
include/update-manager.h
include/app-logging.h
include/app-settings.h
include/language-manager.h
include/workers.h
include/progress-tracker.h
include/zip-archive.h
include/plugin-package.h
include/app-core.h
include/log-manager.h
pages/page.h
pages/ui-kit.h
pages/dashboard-page.h
pages/browse-page.h
pages/cleanup-page.h
pages/history-page.h
pages/logs-page.h
pages/plugins-page.h
pages/settings-page.h
include/sdk/package-manager.h
providers/pacman-manager.h
plugins/plugin-manager.h
include/sdk/provider-plugin.h
app/main-window.h
history/history-manager.h
core/package-model.h
update/update-manager.h
logging/app-logging.h
preferences/app-settings.h
preferences/language-manager.h
core/workers.h
include/sdk/progress-tracker.h
archive/zip-archive.h
plugins/plugin-package.h
core/app-core.h
logging/log-manager.h
pages/base/page.h
pages/base/ui-kit.h
pages/overview/dashboard-page.h
pages/packages/browse-page.h
pages/packages/cleanup-page.h
pages/overview/history-page.h
pages/system/logs-page.h
pages/extensions/plugins-page.h
pages/system/settings-page.h
)
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
target_include_directories(${PROJECT_NAME} PRIVATE include pages)
target_include_directories(${PROJECT_NAME} PRIVATE
include pages pages/base pages/packages pages/overview pages/system pages/extensions include/sdk logging preferences history archive update plugins providers core app)
target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Widgets Qt6::Network ZLIB::ZLIB)
target_compile_definitions(${PROJECT_NAME} PRIVATE
FWSPACMANAGE_VERSION="${PACMANAGER_VERSION}"
@@ -150,34 +151,34 @@ MimeType=application/vnd.flatpak.ref;application/vnd.flatpak.repo;application/vn
StartupNotify=true
\")
")
install(DIRECTORY include/ DESTINATION include/${PROJECT_NAME})
install(DIRECTORY include/sdk/ DESTINATION include/${PROJECT_NAME})
# Tests
enable_testing()
add_executable(pacman-manager-test tests/pacman-manager.test.cpp src/pacman-manager.cpp)
target_include_directories(pacman-manager-test PRIVATE include)
add_executable(pacman-manager-test tests/pacman-manager.test.cpp providers/pacman-manager.cpp)
target_include_directories(pacman-manager-test PRIVATE include include/sdk logging preferences history archive update plugins providers core app)
add_test(NAME pacman-manager-test COMMAND pacman-manager-test)
add_executable(flatpak-manager-test tests/flatpak-manager.test.cpp
plugins/flatpak-provider/flatpak-manager.cpp)
target_include_directories(flatpak-manager-test PRIVATE include plugins/flatpak-provider)
providers/flatpak-provider/flatpak-manager.cpp)
target_include_directories(flatpak-manager-test PRIVATE include include/sdk logging preferences history archive update providers/flatpak-provider)
add_test(NAME flatpak-manager-test COMMAND flatpak-manager-test)
# Real end-to-end test of the Flatpak provider against the live flatpak CLI
# (installs and uninstalls a small app). Skipped when flatpak is missing.
add_executable(flatpak-integration-test tests/flatpak-integration.test.cpp
plugins/flatpak-provider/flatpak-manager.cpp)
target_include_directories(flatpak-integration-test PRIVATE include plugins/flatpak-provider)
providers/flatpak-provider/flatpak-manager.cpp)
target_include_directories(flatpak-integration-test PRIVATE include include/sdk logging preferences history archive update providers/flatpak-provider)
add_test(NAME flatpak-integration-test COMMAND flatpak-integration-test)
add_executable(package-utils-test tests/package-utils.test.cpp)
target_include_directories(package-utils-test PRIVATE include)
target_include_directories(package-utils-test PRIVATE include include/sdk logging preferences history archive update plugins providers core app)
add_test(NAME package-utils-test COMMAND package-utils-test)
# ProgressTracker is pure logic (it only reads output lines), so it is tested
# without a package manager, a display or even Qt.
add_executable(progress-tracker-test tests/progress-tracker.test.cpp)
target_include_directories(progress-tracker-test PRIVATE include)
target_include_directories(progress-tracker-test PRIVATE include include/sdk logging preferences history archive update plugins providers core app)
add_test(NAME progress-tracker-test COMMAND progress-tracker-test)
# PluginPackage: the .fwspacm format. The archives are built in the test itself
@@ -185,15 +186,15 @@ add_test(NAME progress-tracker-test COMMAND progress-tracker-test)
# the file half runs in a temporary directory, and the settings go to a
# temporary INI too, so nothing touches the user's real plugin directory.
add_executable(plugin-package-test tests/plugin-package.test.cpp
src/plugin-package.cpp src/zip-archive.cpp src/app-logging.cpp
include/plugin-package.h include/zip-archive.h)
target_include_directories(plugin-package-test PRIVATE include)
plugins/plugin-package.cpp archive/zip-archive.cpp logging/app-logging.cpp
plugins/plugin-package.h archive/zip-archive.h)
target_include_directories(plugin-package-test PRIVATE include include/sdk logging preferences history archive update plugins providers core app)
target_link_libraries(plugin-package-test PRIVATE Qt6::Core ZLIB::ZLIB)
add_test(NAME plugin-package-test COMMAND plugin-package-test)
add_executable(aur-manager-test tests/aur-manager.test.cpp
plugins/aur-provider/aur-manager.cpp)
target_include_directories(aur-manager-test PRIVATE include plugins/aur-provider)
providers/aur-provider/aur-manager.cpp)
target_include_directories(aur-manager-test PRIVATE include include/sdk logging preferences history archive update providers/aur-provider)
add_test(NAME aur-manager-test COMMAND aur-manager-test)
# UpdateManager::isNewerVersion is pure logic, but the file also pulls in Qt
@@ -203,14 +204,14 @@ add_test(NAME aur-manager-test COMMAND aur-manager-test)
# The Q_OBJECT headers are listed explicitly so AUTOMOC generates their moc
# file for this target (same reason as update-manager-test below).
add_executable(app-core-test tests/app-core.test.cpp
src/app-core.cpp src/workers.cpp src/pacman-manager.cpp
src/plugin-manager.cpp src/history-manager.cpp src/update-manager.cpp
src/plugin-package.cpp src/zip-archive.cpp
src/app-logging.cpp src/log-manager.cpp src/app-settings.cpp
include/app-core.h include/workers.h include/update-manager.h
include/plugin-package.h include/zip-archive.h include/log-manager.h
include/app-settings.h)
target_include_directories(app-core-test PRIVATE include)
core/app-core.cpp core/workers.cpp providers/pacman-manager.cpp
plugins/plugin-manager.cpp history/history-manager.cpp update/update-manager.cpp
plugins/plugin-package.cpp archive/zip-archive.cpp
logging/app-logging.cpp logging/log-manager.cpp preferences/app-settings.cpp
core/app-core.h core/workers.h update/update-manager.h
plugins/plugin-package.h archive/zip-archive.h logging/log-manager.h
preferences/app-settings.h)
target_include_directories(app-core-test PRIVATE include include/sdk logging preferences history archive update plugins providers core app)
target_link_libraries(app-core-test PRIVATE Qt6::Core Qt6::Network ZLIB::ZLIB)
target_compile_definitions(app-core-test PRIVATE
FWSPACMANAGE_VERSION="${PACMANAGER_VERSION}")
@@ -220,9 +221,9 @@ add_test(NAME app-core-test COMMAND app-core-test)
# settings file. The static policy (what a block lasts, when it is in force, what
# a cap or a directory is worth) is pure and needs no clock.
add_executable(app-settings-test tests/app-settings.test.cpp
src/app-settings.cpp src/log-manager.cpp include/app-settings.h
include/log-manager.h)
target_include_directories(app-settings-test PRIVATE include)
preferences/app-settings.cpp logging/log-manager.cpp preferences/app-settings.h
logging/log-manager.h)
target_include_directories(app-settings-test PRIVATE include include/sdk logging preferences history archive update plugins providers core app)
target_link_libraries(app-settings-test PRIVATE Qt6::Core)
add_test(NAME app-settings-test COMMAND app-settings-test)
@@ -231,10 +232,10 @@ add_test(NAME app-settings-test COMMAND app-settings-test)
# JSON catalogue read at runtime really translates. The last test walks the
# sources and checks translations/en.json covers every string they ask for.
add_executable(language-manager-test tests/language-manager.test.cpp
src/language-manager.cpp src/app-settings.cpp
include/language-manager.h include/app-settings.h
preferences/language-manager.cpp preferences/app-settings.cpp
preferences/language-manager.h preferences/app-settings.h
resources/resources.qrc)
target_include_directories(language-manager-test PRIVATE include)
target_include_directories(language-manager-test PRIVATE include include/sdk logging preferences history archive update plugins providers core app)
target_link_libraries(language-manager-test PRIVATE Qt6::Core)
# The resources come along so the test reads the catalogue exactly where the
# application does, compiled in, rather than a copy that could drift.
@@ -246,7 +247,7 @@ add_test(NAME language-manager-test COMMAND language-manager-test)
#
# The language setting loads a catalogue named <code>.json out of a
# "translations" folder, looked up at runtime next to the settings or next to
# the binary (see src/language-manager.cpp). A catalogue is read as it is, so
# the binary (see preferences/language-manager.cpp). A catalogue is read as it is, so
# a new language is one text file and no build step: the copy below is a plain
# file copy and never fails the build.
#
@@ -279,8 +280,8 @@ if(Qt6LinguistTools_FOUND AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/translations)
endif()
add_executable(update-manager-test tests/update-manager.test.cpp
src/update-manager.cpp src/app-logging.cpp include/update-manager.h)
target_include_directories(update-manager-test PRIVATE include)
update/update-manager.cpp logging/app-logging.cpp update/update-manager.h)
target_include_directories(update-manager-test PRIVATE include include/sdk logging preferences history archive update plugins providers core app)
target_link_libraries(update-manager-test PRIVATE Qt6::Core Qt6::Network)
target_compile_definitions(update-manager-test PRIVATE
FWSPACMANAGE_VERSION="${PACMANAGER_VERSION}")
@@ -313,9 +314,9 @@ option(FWS_BUILD_EXAMPLE_ADDON "Build the example addon plugin" OFF)
if(FWS_BUILD_FLATPAK_PLUGIN)
add_library(flatpak-provider-plugin MODULE
plugins/flatpak-provider/flatpak-provider.cpp
plugins/flatpak-provider/flatpak-manager.cpp)
target_include_directories(flatpak-provider-plugin PRIVATE include plugins/flatpak-provider)
providers/flatpak-provider/flatpak-provider.cpp
providers/flatpak-provider/flatpak-manager.cpp)
target_include_directories(flatpak-provider-plugin PRIVATE include include/sdk logging preferences history archive update providers/flatpak-provider)
set_target_properties(flatpak-provider-plugin PROPERTIES
OUTPUT_NAME "flatpak-provider"
CXX_STANDARD 17
@@ -328,9 +329,9 @@ endif()
if(FWS_BUILD_AUR_PLUGIN)
add_library(aur-provider-plugin MODULE
plugins/aur-provider/aur-provider.cpp
plugins/aur-provider/aur-manager.cpp)
target_include_directories(aur-provider-plugin PRIVATE include plugins/aur-provider)
providers/aur-provider/aur-provider.cpp
providers/aur-provider/aur-manager.cpp)
target_include_directories(aur-provider-plugin PRIVATE include include/sdk logging preferences history archive update providers/aur-provider)
set_target_properties(aur-provider-plugin PROPERTIES
OUTPUT_NAME "aur-provider"
CXX_STANDARD 17
@@ -343,7 +344,7 @@ endif()
if(FWS_BUILD_EXAMPLE_PLUGIN)
add_library(example-provider-plugin MODULE plugins/example-provider/example-provider.cpp)
target_include_directories(example-provider-plugin PRIVATE include)
target_include_directories(example-provider-plugin PRIVATE include include/sdk logging preferences history archive update plugins providers core app)
set_target_properties(example-provider-plugin PROPERTIES
OUTPUT_NAME "sample-provider"
CXX_STANDARD 17
@@ -356,7 +357,7 @@ endif()
if(FWS_BUILD_EXAMPLE_ADDON)
add_library(example-addon-plugin MODULE plugins/example-addon/example-addon.cpp)
target_include_directories(example-addon-plugin PRIVATE include)
target_include_directories(example-addon-plugin PRIVATE include include/sdk logging preferences history archive update plugins providers core app)
# The demo addon attaches Qt widgets, so it links the widget module like
# the host application.
target_link_libraries(example-addon-plugin PRIVATE Qt6::Widgets)
@@ -375,9 +376,9 @@ endif()
# options.
if(FWS_BUILD_EXAMPLE_PLUGIN AND FWS_BUILD_EXAMPLE_ADDON)
add_executable(plugin-manager-test tests/plugin-manager.test.cpp
src/plugin-manager.cpp src/pacman-manager.cpp src/app-logging.cpp
plugins/flatpak-provider/flatpak-manager.cpp)
target_include_directories(plugin-manager-test PRIVATE include plugins/flatpak-provider)
plugins/plugin-manager.cpp providers/pacman-manager.cpp logging/app-logging.cpp
providers/flatpak-provider/flatpak-manager.cpp)
target_include_directories(plugin-manager-test PRIVATE include include/sdk logging preferences history archive update providers/flatpak-provider)
# Qt6::Widgets is linked so the process can load the example addon, which
# itself links the widget module.
target_link_libraries(plugin-manager-test PRIVATE Qt6::Core Qt6::Widgets)
+3 -3
View File
@@ -90,19 +90,19 @@ replaying a request**, so it can never run pacman as root.
The split is structural and not negotiable:
- **All logic lives in `AppCore`** (`include/app-core.h`, `src/app-core.cpp`):
- **All logic lives in `AppCore`** (`core/app-core.h`, `core/app-core.cpp`):
providers, worker threads, history, sudo, the pacman lock, self-update. This
layer depends on Qt Core only and **holds no widget** — which is what lets
`app-core-test` run it without a screen.
- **The interface lives in `pages/`**, one file per screen. `MainWindow`
(`src/main-window.cpp`) is only a frame: sidebar, status bar, dialogs. No
(`app/main-window.cpp`) is only a frame: sidebar, status bar, dialogs. No
business rule.
- **The conversation always goes the same way**: the view calls a core method,
which answers "started", "I need the sudo password" or "the database is
locked"; the view then asks the user for what is needed and replays the
request. Results come back through signals.
Adding a screen = a `Page` class (see `pages/page.h`) and an entry in the
Adding a screen = a `Page` class (see `pages/base/page.h`) and an entry in the
sidebar. Adding a package manager = a plugin implementing `IPackageManager` in
`plugins/` — **without touching the application** (see
[doc/plugins.md](doc/plugins.md)).
+4 -4
View File
@@ -90,20 +90,20 @@ ajouter une.
La coupure est structurante et ne se négocie pas :
- **Toute la logique vit dans `AppCore`** (`include/app-core.h`,
`src/app-core.cpp`) : providers, threads de travail, historique, sudo, verrou
- **Toute la logique vit dans `AppCore`** (`core/app-core.h`,
`core/app-core.cpp`) : providers, threads de travail, historique, sudo, verrou
pacman, auto-mise à jour. Cette couche ne dépend que de Qt Core et **ne
contient aucun widget** — c'est ce qui permet à `app-core-test` de la tester
sans écran.
- **L'interface vit dans `pages/`**, un fichier par écran. `MainWindow`
(`src/main-window.cpp`) n'est qu'un cadre : barre latérale, barre de statut,
(`app/main-window.cpp`) n'est qu'un cadre : barre latérale, barre de statut,
dialogues. Aucune règle métier.
- **Le dialogue va toujours dans le même sens** : la vue appelle une méthode du
core, qui répond « lancé », « il me faut le mot de passe sudo » ou « la base
est verrouillée » ; la vue demande alors à l'utilisateur ce qu'il faut, puis
rejoue la requête. Les résultats reviennent par signaux.
Ajouter un écran = une classe `Page` (voir `pages/page.h`) et une entrée dans la
Ajouter un écran = une classe `Page` (voir `pages/base/page.h`) et une entrée dans la
barre latérale. Ajouter un gestionnaire de paquets = un plugin implémentant
`IPackageManager` dans `plugins/` — **sans toucher à l'application** (voir
[doc/plugins.md](doc/plugins.md)).
+2 -2
View File
@@ -21,12 +21,12 @@ The code is split in two layers, and the split is structural: **every rule lives
in `AppCore`**, every screen lives in `pages/` — the Qt window (`MainWindow`) is
only the frame around them.
- `include/app-core.h` + `src/app-core.cpp` — **the logic**: providers (pacman,
- `core/app-core.h` + `core/app-core.cpp` — **the logic**: providers (pacman,
Flatpak, AUR…), worker threads, history, plugin registry, privileged commands
(`sudo`), pacman's database lock, self-update. No widget at all: the layer
depends on Qt Core only and runs headless (`build/app-core-test` does not even
link QtWidgets).
- `include/main-window.h` + `src/main-window.cpp` — **the frame**: sidebar,
- `app/main-window.h` + `app/main-window.cpp` — **the frame**: sidebar,
header, status bar, menus, tray, dialogs (sudo password, pacman lock, export)
and the stack holding the screens. No business rule.
- `pages/` — **the screens, one file per screen**: `dashboard-page`,
+2 -2
View File
@@ -21,12 +21,12 @@ Le code est coupé en deux couches, et la coupure est structurante : **toute la
logique vit dans `AppCore`**, l'interface vit dans `pages/` — la fenêtre Qt
(`MainWindow`) n'est plus qu'un cadre autour des écrans.
- `include/app-core.h` + `src/app-core.cpp` — **la logique** : providers
- `core/app-core.h` + `core/app-core.cpp` — **la logique** : providers
(pacman, Flatpak, AUR…), threads de travail, historique, registre de plugins,
commandes privilégiées (`sudo`), verrou de la base pacman, auto-mise à jour.
Aucun widget : la couche ne dépend que de Qt Core et tourne sans écran
(`build/app-core-test` ne lie même pas QtWidgets).
- `include/main-window.h` + `src/main-window.cpp` — **le cadre** : barre
- `app/main-window.h` + `app/main-window.cpp` — **le cadre** : barre
latérale, en-tête, barre de statut, menus, tray, dialogues (mot de passe
sudo, verrou pacman, export) et la pile qui contient les écrans. Aucune règle
métier.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+5 -5
View File
@@ -27,12 +27,12 @@ déboguer ou brancher un plugin.
| Fichier | Rôle |
| --- | --- |
| `include/app-core.h`, `src/app-core.cpp` | **La logique** : providers, workers, historique, plugins, sudo, verrou pacman, auto-update. Aucun widget. |
| `include/main-window.h`, `src/main-window.cpp` | **Le cadre** : barre latérale, en-tête, barre de statut, menus, tray, dialogues, feuille de style. |
| `core/app-core.h`, `core/app-core.cpp` | **La logique** : providers, workers, historique, plugins, sudo, verrou pacman, auto-update. Aucun widget. |
| `app/main-window.h`, `app/main-window.cpp` | **Le cadre** : barre latérale, en-tête, barre de statut, menus, tray, dialogues, feuille de style. |
| `pages/` | **Les écrans**, un fichier par écran, plus `page.h` (contrat) et `ui-kit.*` (widgets partagés). |
| `include/progress-tracker.h` | La progression d'une opération, lue dans la sortie des outils. |
| `include/plugin-package.h`, `src/plugin-package.cpp` | L'installation d'un paquet de plugin `.fwspacm` (avec `zip-archive.*` pour lire l'archive). |
| `include/workers.h`, `src/workers.cpp` | Les threads de travail (recherche, listes, actions). |
| `include/sdk/progress-tracker.h` | La progression d'une opération, lue dans la sortie des outils. |
| `plugins/plugin-package.h`, `plugins/plugin-package.cpp` | L'installation d'un paquet de plugin `.fwspacm` (avec `zip-archive.*` pour lire l'archive). |
| `core/workers.h`, `core/workers.cpp` | Les threads de travail (recherche, listes, actions). |
| `plugins/` | Les plugins livrés : `flatpak-provider`, `aur-provider`, et les deux exemples. |
| `make-plugin-package.py` | Le script qui transforme une bibliothèque compilée en paquet `.fwspacm`. |
+50 -31
View File
@@ -8,8 +8,8 @@ logique vit dans `AppCore`, toute l'interface vit dans `pages/`**. La fenêtre Q
| Couche | Fichiers | Ce qu'elle a le droit de faire |
| --- | --- | --- |
| **Logique** | `include/app-core.h`, `src/app-core.cpp`, `workers.*`, `pacman-manager.*`, `plugin-manager.*`, `plugin-package.*`, `zip-archive.*`, `history-manager.*`, `update-manager.*` | Lancer des commandes, lire des fichiers, tenir un état, émettre des signaux. **Aucun widget, aucun dialogue, aucune chaîne d'interface.** |
| **Cadre** | `include/main-window.h`, `src/main-window.cpp` | Barre latérale, en-tête, barre de statut, menus, tray, dialogues (mot de passe, verrou pacman, export), feuille de style. Aucune règle métier. |
| **Logique** | `core/app-core.h`, `core/app-core.cpp`, `workers.*`, `pacman-manager.*`, `plugin-manager.*`, `plugin-package.*`, `zip-archive.*`, `history-manager.*`, `update-manager.*` | Lancer des commandes, lire des fichiers, tenir un état, émettre des signaux. **Aucun widget, aucun dialogue, aucune chaîne d'interface.** |
| **Cadre** | `app/main-window.h`, `app/main-window.cpp` | Barre latérale, en-tête, barre de statut, menus, tray, dialogues (mot de passe, verrou pacman, export), feuille de style. Aucune règle métier. |
| **Écrans** | `pages/*` | Construire la mise en page, afficher ce que le core renvoie, demander une opération au core. |
Deux conséquences directement vérifiables :
@@ -23,43 +23,62 @@ Deux conséquences directement vérifiables :
```
├── CMakeLists.txt # cible application, plugins, tests
├── include/
│ ├── app-core.h # LOGIQUE : tout ce que l'app fait
│ ├── workers.h # threads de travail (recherche, listes, actions)
│ ├── package-manager.h # interface IPackageManager + helpers de fusion
│ ├── pacman-manager.h # provider pacman (intégré)
│ ├── plugin.h # contrat générique d'un plugin (IPlugin)
│ ├── provider-plugin.h # contrat C ABI des plugins externes
│ ├── plugin-manager.h # registre + chargement des bibliothèques
│ ├── plugin-package.h # installation d'un paquet .fwspacm
│ ├── zip-archive.h # lecteur ZIP minimal (zlib)
│ ├── progress-tracker.h # progression lue dans la sortie des outils
│ ├── history-manager.h # historique (CSV)
│ ├── update-manager.h # auto-mise à jour
│ ├── package-model.h # modèle Qt pour les listes
│ └── main-window.h # CADRE
├── src/ # implémentations de ce qui précède + main.cpp
├── pages/ # INTERFACE : un fichier par écran
│ ├── page.h/.cpp # contrat d'un écran (Page) + helpers
│ ├── ui-kit.h/.cpp # widgets partagés (tableaux, cartes, badges)
│ ├── dashboard-page.* # Tableau de bord
│ ├── browse-page.* # Recherche / Installés / Mises à jour
│ ├── cleanup-page.* # Nettoyage
│ ├── history-page.* # Historique
│ ├── logs-page.* # Logs pacman
│ └── plugins-page.* # Plugins + paquets .fwspacm
├── plugins/ # plugins livrés (voir plugins.md)
├── app/ # CADRE : la fenêtre et le point d'entrée
│ ├── main.cpp # point d'entrée : journal, langue, fenêtre
│ └── main-window.h/.cpp # barre latérale, menus, dialogues, feuille de style
├── core/ # LOGIQUE : tout ce que l'app fait
│ ├── app-core.h/.cpp # le contrôleur dont les écrans délèguent
│ ├── workers.h/.cpp # threads de travail (recherche, listes, actions)
│ └── package-model.h/.cpp # modèle Qt pour les listes
├── providers/ # fournisseurs de paquets
│ ├── pacman-manager.h/.cpp # pacman, intégré
│ ├── flatpak-provider/ # fournisseur Flatpak
│ ├── aur-provider/ # fournisseur AUR (yay/paru)
│ ├── example-provider/ # modèle de fournisseur
│ └── example-addon/ # modèle d'extension
├── plugins/ # hôte des plugins
│ ├── plugin-manager.h/.cpp # registre + chargement des bibliothèques
│ └── plugin-package.h/.cpp # installation d'un paquet .fwspacm
├── preferences/ # ce que l'utilisateur a choisi
│ ├── app-settings.h/.cpp # le modèle des préférences
│ └── language-manager.h/.cpp # langue de l'interface et du journal
├── logging/ # le journal
│ ├── log-manager.h/.cpp # operations.log, lu par l'écran Logs
│ └── app-logging.h/.cpp # catégories qCDebug/qCInfo
├── history/ # historique des opérations (CSV)
│ ├── history-manager.h/.cpp
├── update/ # auto-mise à jour de PacManager
│ ├── update-manager.h/.cpp
├── archive/ # lecteur ZIP minimal (zlib), pour .fwspacm
│ ├── zip-archive.h/.cpp
├── include/sdk/ # SDK public des plugins (installé à plat)
│ ├── package-manager.h # interface IPackageManager + helpers de fusion
│ ├── plugin.h # contrat générique d'un plugin (IPlugin)
│ ├── provider-plugin.h # contrat C ABI des plugins externes
│ └── progress-tracker.h # progression lue dans la sortie des outils
├── pages/ # INTERFACE : un fichier par écran
│ ├── base/ # ce sur quoi tous les écrans reposent
│ │ ├── page.h/.cpp # contrat d'un écran (Page) + helpers
│ │ └── ui-kit.h/.cpp # widgets partagés (tableaux, cartes, badges)
│ ├── packages/ # paquets : recherche, installés, mises à jour
│ │ ├── browse-page.*
│ │ └── cleanup-page.* # Nettoyage
│ ├── overview/ # ce que le système fait en ce moment
│ │ ├── dashboard-page.*
│ │ └── history-page.*
│ ├── system/ # les réglages et les journaux
│ │ ├── logs-page.* # Logs pacman
│ │ └── settings-page.* # Paramètres
│ └── extensions/
│ └── plugins-page.* # Plugins + paquets .fwspacm
├── translations/ # catalogues, un JSON par langue
├── doc/ # cette documentation (source du wiki)
└── tests/ # tests unitaires et d'intégration
```
## Le contrat d'un écran
`pages/page.h` définit ce que le cadre attend d'un écran :
`pages/base/page.h` définit ce que le cadre attend d'un écran :
| Membre | Rôle |
| --- | --- |
@@ -114,7 +133,7 @@ l'interface.
## Les threads
Toute opération qui lance un processus est **asynchrone**. `src/workers.cpp`
Toute opération qui lance un processus est **asynchrone**. `core/workers.cpp`
contient les trois threads :
| Worker | Rôle |
@@ -139,7 +158,7 @@ refusée tant que la première tourne. Voir [operations.md](operations.md).
| Une nouvelle opération | Une méthode dans `AppCore` qui construit une `Request` et appelle `startRequest()` ; un `InstallWorker::Op` ; sa ligne dans `startMessage()`, `successMessage()`, `failureMessage()`. |
| Une nouvelle liste | Une valeur dans `AppCore::ListMode`, un mode dans `ListWorker`, un slot dans `listFinished`. |
| Un nouveau provider | Un plugin externe (voir [plugins.md](plugins.md)) — jamais une modification du cœur. |
| Un nouveau réglage | Une propriété dans `AppSettings` (`include/app-settings.h`), lue par la couche logique et exposée par l'écran Paramètres. Le mode d'identification reste dans `AppCore` (il fait partie de l'état des opérations privilégiées) ; `credentials/mode` et `plugins/<id>/enabled` sont les autres clés historiques. |
| Un nouveau réglage | Une propriété dans `AppSettings` (`preferences/app-settings.h`), lue par la couche logique et exposée par l'écran Paramètres. Le mode d'identification reste dans `AppCore` (il fait partie de l'état des opérations privilégiées) ; `credentials/mode` et `plugins/<id>/enabled` sont les autres clés historiques. |
| Une nouvelle langue | Un `translations/<code>.json` (clé = la chaîne source, valeur = la traduction), une entrée dans `resources/resources.qrc` pour l'embarquer, et une entrée dans `AppSettings::knownLanguages()` avec son endonyme. |
## Les préférences
+3 -3
View File
@@ -171,7 +171,7 @@ paquets système ne sont jamais bloquées :
L'apparence reprend le **design system du site FWS**
(`p/assets/styles/var.css` du dépôt `FWS-Website`). Une seule feuille de style
est appliquée à la fenêtre (`appStyleSheet()` dans `src/main-window.cpp`) : un
est appliquée à la fenêtre (`appStyleSheet()` dans `app/main-window.cpp`) : un
fichier d'écran ne décrit que sa mise en page et son texte, jamais ses couleurs.
Une exception : les menus déroulants. Un `QMenu` est une **fenêtre native
@@ -230,9 +230,9 @@ de style ne fait que fixer la couleur du texte.
| Besoin | Endroit |
| --- | --- |
| Une couleur, une bordure, un rayon | `appStyleSheet()` dans `src/main-window.cpp`. |
| Une couleur, une bordure, un rayon | `appStyleSheet()` dans `app/main-window.cpp`. |
| Ce que la feuille de style n'atteint pas (marge des menus déroulants, ombres de popup) | `MainWindow::appPalette()`, appliquée dans `main.cpp`. Même tableau de tokens, mais en rôles de palette : Qt 6 n'a pas de rôle `Menu`, c'est `Window` qui remplit la marge du popup. |
| Un badge, une pastille, un compteur | `pages/ui-kit.cpp`. |
| Un badge, une pastille, un compteur | `pages/base/ui-kit.cpp`. |
| Une couleur de statut dans une table | La page concernée (`QTableWidgetItem::setForeground`). |
| Une icône | `resources/icons/*.svg` (le trait suit la couleur du texte). |
+1 -1
View File
@@ -2,7 +2,7 @@
PacManager se met à jour lui-même : au lancement puis une fois par jour, il
interroge la dernière release du dépôt et propose de l'installer. Toute la
logique est dans `include/update-manager.h` / `src/update-manager.cpp`.
logique est dans `update/update-manager.h` / `update/update-manager.cpp`.
L'utilisateur peut couper ce contrôle, et le suspendre pour un temps, depuis
l'écran **Paramètres → Mises à jour de PacManager** (voir
+1 -1
View File
@@ -85,7 +85,7 @@ Aucun outil ne rapporte sa progression d'une façon directement utilisable :
### Le modèle
`include/progress-tracker.h` modélise le travail en **deux moitiés** — le
`include/sdk/progress-tracker.h` modélise le travail en **deux moitiés** — le
téléchargement, puis l'application (installation, mise à niveau, suppression) —
parce que c'est la forme que tous les outils ont : ils récupèrent, puis
écrivent.
+3 -3
View File
@@ -5,10 +5,10 @@ Pas de catalogue, pas de réseau, pas de bouton « Installer » : **le fichier e
la distribution**. whoever l'a construit vous l'a donné, et c'est celui que
PacManager ouvre.
- Code : `include/plugin-package.h`, `src/plugin-package.cpp`
- Lecture d'archive : `include/zip-archive.h`, `src/zip-archive.cpp`
- Code : `plugins/plugin-package.h`, `plugins/plugin-package.cpp`
- Lecture d'archive : `archive/zip-archive.h`, `archive/zip-archive.cpp`
- Script de création : `make-plugin-package.py` (à la racine du dépôt)
- Écran : bas de la page **Plugins** (`pages/plugins-page.cpp`)
- Écran : bas de la page **Plugins** (`pages/extensions/plugins-page.cpp`)
## Ce qu'il se passe
+5 -5
View File
@@ -56,7 +56,7 @@ fws_plugin_install_hint() optionnel : paquet OS qui fournit l'outil
```
Deux macros écrivent tout cela pour vous
(`include/provider-plugin.h`) :
(`include/sdk/provider-plugin.h`) :
```cpp
#include "provider-plugin.h"
@@ -80,7 +80,7 @@ l'outil »** : le plugin dit par exemple `"flatpak"`, et l'application lance
## Écrire un fournisseur
Un fournisseur implémente `IPackageManager` (`include/package-manager.h`).
Un fournisseur implémente `IPackageManager` (`include/sdk/package-manager.h`).
Copiez `plugins/example-provider/example-provider.cpp` comme point de départ.
| Méthode | Obligatoire | Rôle |
@@ -160,7 +160,7 @@ affiché une fois, avec les deux origines.
## Écrire une extension (addon)
Une extension implémente `IPlugin` (`include/plugin.h`) :
Une extension implémente `IPlugin` (`include/sdk/plugin.h`) :
| Membre | Quand | À quoi ça sert |
| --- | --- | --- |
@@ -184,8 +184,8 @@ cmake --build build
Pour un plugin hors du dépôt :
```bash
g++ -std=c++17 -fPIC -shared -I<PacManager>/include \
-I<PacManager>/plugins/flatpak-provider \
g++ -std=c++17 -fPIC -shared -I<PacManager>/include/sdk \
-I<PacManager>/providers/flatpak-provider \
my-provider.cpp -o libmy-provider.so
# La façon de le distribuer : un paquet que l'utilisateur dépose sur la fenêtre.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.