Both changes are what the third adapter asked for, the way the second one asked
for resolve_for_host.
`pick_release` now takes several kinds in order of preference. A desktop store on
Apple Silicon wants `mac_universal`, will settle for `mac_arm64`, and takes
`mac_x64` only as a last resort because that one runs under Rosetta. Release
order still wins over kind order: the newest release with any acceptable asset
beats an older release with a better one.
Records also carry `asset_path`, the catalog-side path, because not every asset
is a download — an `html` build is a hosted directory, and the desktop store
needs its URL rather than a file name.
The machine-wide uninstaller learned the third engine. It also had to stop
assuming one store per directory name: the RetroArch and desktop engines share a
store root, so a home is now identified by which engine file is in it, and the
launcher name is derived from the home rather than guessed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A store's own engine can take that store away. What was missing was a way to
take the framework off a machine without having to remember what is on it:
uninstall.sh finds every store home under both known roots, has each store's
own engine purge what it installed, and then removes the store, its launcher,
its Ports entry and the engine files.
It delegates the removing rather than repeating it, because only the engine's
state.json knows which ROMs, playlists, thumbnails or gamelist entries were a
store's. If an engine cannot finish — RetroArch running, a ROMs root unmounted
— the run stops there instead of deleting the engine that knew what it had
installed.
POSIX sh, not bash, so `curl … | sh` works on a machine whose /bin/sh is dash;
checked with dash. `prune_empty_dirs` moves here for the same reason the delete
guard `within()` did: both engines need it, and both need it to be careful. It
removes only directories that are actually empty, and only inside the subtree
the store owns, so one surprise file is enough to keep a directory.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>