c339a6161d
Selecting an app now opens a detail window (name, state, description) with Back / Install-Update-Reinstall / Delete, where delete needs confirmation and refuses to remove AppStore itself. Install progress replaces the button hints in that window instead of a full-screen status. Catalog entries are kept as raw lines and expanded only for drawn rows, and the catalog is released before net.wifiConnect() then rebuilt from the SD cache, which is what caused OOM when bringing up Wi-Fi. Status screens use REFRESH_FAST between updates rather than REFRESH_HALF.
41 lines
1.7 KiB
Markdown
41 lines
1.7 KiB
Markdown
# AppStore
|
|
|
|
Installs new Lua apps from one or more public Xteink repositories.
|
|
|
|
## Bootstrap
|
|
|
|
Copy this directory to `/.apps/AppStore` on the SD card. On first launch, AppStore creates `repositories.txt` from `repositories.default.txt`.
|
|
|
|
Repository entries use this format:
|
|
|
|
```text
|
|
XTEINK-REPOSITORIES|1
|
|
Name|https://host/path/catalog.txt
|
|
```
|
|
|
|
## Screens
|
|
|
|
Repositories → Apps → app detail. Opening a repository always fetches its catalog over Wi-Fi, so
|
|
the list is current on every launch. The validated catalog is then kept on the SD card and re-read
|
|
when returning to the Apps list, which avoids a second fetch after an install.
|
|
|
|
The detail screen shows the app name, install state, and description, with `Back` / `Install`
|
|
(`Update` or `Reinstall` when already present) / `Delete`. Install progress replaces the button
|
|
hints in that same window rather than taking over the screen. Delete asks for confirmation and
|
|
refuses to remove AppStore itself.
|
|
|
|
## Memory
|
|
|
|
Catalog entries are held as raw lines and expanded only for the rows being drawn — expanding all 64
|
|
into tables costs roughly 30 KB, which has to coexist with the Wi-Fi and TLS stacks on a 380 KB
|
|
device. The catalog is released entirely before `net.wifiConnect()` and rebuilt from the SD cache
|
|
afterwards.
|
|
|
|
## Installation
|
|
|
|
Packages download into `/.apps/.install-<AppId>`, verify declared sizes and SHA-256 hashes, require
|
|
`main.lua`, then rename into place. Updates rename the existing tree aside first and restore it if
|
|
the swap fails. Install state comes from the `.manifest.hash` marker written at install time.
|
|
|
|
HTTPS is encrypted without peer-certificate authentication. An active network attacker can replace both metadata and payload hashes.
|