Expand description
The desktop app’s help, downloaded on the first Help press (help_local).
The desktop app’s HELP, downloaded to this machine the first time Help is
pressed (owner 2026-11-27). The browser build serves the help site beside
the page (help/index.html); a desktop build has nothing there, so:
- Help with a copy for THIS app version already in
<data dir>/brep-app/help/<version>/opens itsindex.htmlin the default browser at once, offline. - Otherwise the app asks the site for
brep-help-<version>.json, the help bundle’s manifest (./build.sh appwrites it and the archive beside the published web build,web/help-bundle/). When this version is not on the site any more it asks forbrep-help-latest.jsoninstead, opens that, and says the help is for another version. - The archive (
.tar.gz) is fetched over HTTPS from the same server as the updates, with progress and Cancel in a notice; it must match the manifest’s length and sha256 before anything is unpacked. It unpacks into.partial-*and only a complete tree is renamed to<version>/, so a half copy is never opened. Only plain files and folders are taken: no links, no absolute or..paths. - A failure (offline, a bad hash, no bundle) opens the newest copy already on this machine if there is one, and otherwise says why and offers the online help.
Nothing is fetched unless a desktop main turned the source on
(HelpDownloader::start_site); a headless or embedded app keeps the old
behaviour (the relative help URL) until a script points it at a test server
(help_fixture).
Modules§
- fixture
- A local stand-in for the site’s
web/help-bundle/, for the help download’s tests and thehelp_fixturecommand: a tiny bundle served on 127.0.0.1, never the real site. It can serve the archive halfway and HOLD there until released, so a script readsdownloadingand presses Cancel without a race.
Structs§
- Bundle
Manifest - What
brep-help-<version>.jsonsays about the archive beside it. - Fetched
- A copy ready to open.
- Help
Downloader - The Help button’s desktop half: the local copy, the download and its notice.
- Progress
- What a running download reports, and its cancel switch.
- Source
- Where a bundle comes from: the manifests’ and archive’s base URL, and the online help offered when nothing downloads.
Enums§
- Phase
- Where Help stands, as the notice and
__brepHelpshow it.
Constants§
- APP_
VERSION - This app’s version: the help copy it looks for.
- BUNDLE_
PATH - Where the published web build keeps the bundle, on the update server.
- CANCELLED
- The error a cancelled download ends with.
- FORMAT
- The first field of every bundle manifest.
- ONLINE_
PATH - The help site of the published web build, for when nothing downloads.
Functions§
- data_
dir - The per-user data directory (
brep-appunder it), from the environment. - data_
dir_ from data_dirwith the environment and system passed in:XDG_DATA_HOME, else%LOCALAPPDATA%(Windows),~/Library/Application Support(macOS) or~/.local/share.- fetch_
bundle - Fetch, check and unpack the help for
want(else the latest) fromsourceintoroot. Blocking: run it off the UI thread. - file_
url - A
file://URL for a local path, percent-encoded (spaces, non-ASCII), with a Windows drive path asfile:///C:/…. - installed
- The installed copy of
versionunderroot: itsindex.html, when the copy is complete (unpacked whole and renamed into place). - newest_
installed - The newest complete copy under
root, of any version. - unpack
- Unpack a checked archive into
root/<version>/, whole or not at all.