App registry and app manager
CrossPad apps live in repos of their own. The registry lists them, the app manager adds them to your firmware project, and the build finds them by itself. For the steps, see Install and remove apps; to list your own app, see Publish an app.
The registry
Section titled “The registry”The registry is one file, registry.json in
CrossPad/crosspad-apps: every official app with its repo, version,
description and the platforms it runs on. The app manager reads it over plain HTTPS, with no GitHub account, and keeps
a copy for an hour. The App catalog is the same list as a page.
Adding an app to the firmware
Section titled “Adding an app to the firmware”An installed app is a git submodule in the firmware project, under components/crosspad-<name>/. The app manager runs
as idf.py commands, or as CP Tools, a full-screen menu with the same functions:
| Command | What it does |
|---|---|
idf.py app-list | apps that run on this platform (--all for every app) |
idf.py app-install --app <id> | add an app (--ref for a version or branch) |
idf.py app-remove --app <id> | take an app out |
idf.py app-update --app <id> | update an app (--all for every app) |
idf.py app-status | what each app follows, and its state on disk |
idf.py app-track --app <id> --mode <mode> | what an app follows (below) |
idf.py app-config | the firmware’s feature flags |
idf.py app-profile | apply a named set of apps and flags, such as lite |
idf.py app-backup, idf.py app-restore | snapshot an app’s local work, and bring it back |
idf.py app-device | what the connected CrossPad runs, against your checkout |
How an app joins the firmware
Section titled “How an app joins the firmware”An app registers itself with REGISTER_APP, or REGISTER_APP_PL for an app with pad logic. At build time the
platform scans every app’s sources for these macros and generates the list of apps. Nothing is added to a list by
hand. After you install or remove an app, run a clean build so the list is generated again.
The versions of the installed apps are built into the firmware. Settings → Info on the CrossPad lists them, and
idf.py app-device compares them with your checkout.
What an app follows
Section titled “What an app follows”| Mode | The app follows |
|---|---|
registry | the newest release |
branch | the newest commit of a branch |
pinned | one commit, which stays |
local | your own copy, which the app manager leaves alone |
Your work is safe
Section titled “Your work is safe”The app manager never runs over local work. An update skips an app with uncommitted or unpushed changes, an app on
an unexpected branch and an app on a fork. With --force it goes ahead, but saves the work first under
.crosspad/backups/<app>/, and idf.py app-restore brings it back.
Feature flags and profiles
Section titled “Feature flags and profiles”crosspad.config.json in the firmware project holds your choices: what each app follows and the feature flags.
Only the flags you change from their defaults go into the build, so an untouched project builds exactly as the
headers say. A profile, such as lite, is a named set of apps and flags that idf.py app-profile applies in one go.