build: install the manual alone, into the prefix or the user datadir

The manual is the only thing udpscope installs, but the only way to get it
where `help:` resolves was a whole `cmake --install`. Two opt-in targets
now install just the set, each printing where it wrote:

- install-help goes through the install machinery into CMAKE_INSTALL_PREFIX
  (reachable via the new Help component), so a packager or a system-wide
  user points it at /usr and wraps it in sudo;
- install-help-user resolves the user data directory the way the app does
  ($XDG_DATA_HOME, else $HOME/.local/share) and copies there without root.

Neither is built by default and neither changes what `cmake --install`
does; the install() rule keeps its destination.
This commit is contained in:
Martino Ferrari committed 2026-10-14 22:28:23 +02:00
1 parent bb62b8178c
commit 669db6df9a
4 files changed
+110 -1

No files matched your search

+6 -1
View File
@@ -2467,7 +2467,12 @@ looks for the document under `$XDG_DATA_HOME/help/<lang>/org.udpscope.app/` then
`$XDG_DATA_DIRS/help/<lang>/org.udpscope.app/`, so with the set installed the alert names the missing
*viewer* (`yelp`), and without it the alert names the identifier, the expected installed path and the
install command — `cmake --install build --prefix ~/.local`, which writes
`~/.local/share/help/C/org.udpscope.app/`. A build tree has neither the installed copy nor a
`~/.local/share/help/C/org.udpscope.app/`. Two opt-in targets install the manual *alone*, without a
whole `cmake --install`: `cmake --build build --target install-help-user` writes the same
`$XDG_DATA_HOME` (default `~/.local/share`) copy the alert describes and needs no root, while
`cmake --build build --target install-help` writes to the configured `CMAKE_INSTALL_PREFIX` for a
packager or a system-wide user to wrap in `sudo`; both print where they wrote. A build tree has
neither the installed copy nor a
`help:` handler, and **either is enough to make `F1` do nothing**; that is the failure this names.
`cmake --build build --target test-help` checks the set the way `test-ui` checks the `.ui` files:
`yelp-check`'s offline subcommands (links, media, orphans, ids) and a `yelp-build html` render;