feat(recomps): merge the Recomp Launcher and Recompa catalogs, and install Android ports

tools/recomps/build_catalog.py builds the bundled catalog from DroidDeck's
curated entries, Recomp Launcher's pc-catalog.json (Windows and Linux
recomps) and Recompa's index.json (Android ports), matched by repo. Each
entry records the catalogs it came from; the card and the README credit
them.

Android builds install through PackageInstaller after the APK's package
name and signing certificate match the catalog, and already-installed
ports are recognised. Builds without a named program get one guessed
after unpacking. The page is now a lazy grid with search, for the
2,646 entries.
This commit is contained in:
Kurt Himebauch committed 2026-11-30 21:53:23 -05:00
1 parent 3b27cbece0
commit c878284319
14 files changed
+1172 -493

No files matched your search

+56 -17
View File
@@ -36,9 +36,40 @@ DroidDeck is signed in to. It never downloads ROMs, disc images or game files.
## Catalog
`app/src/main/assets/recomps/catalog.json` is bundled. `RecompCatalog.load` prefers
`Droid-Deck/DroidDeck-Components/main/recomps.json` once that file exists, so the list can change
without an app release. Schema 1 (an app refuses a newer schema and uses the bundled copy):
`app/src/main/assets/recomps/catalog.json` is generated by `tools/recomps/build_catalog.py` from three
sources. Do not edit it by hand.
1. `tools/recomps/curated.json`, DroidDeck's own entries. These carry store ids, data probes and launch
arguments, and win every field they set.
2. Recomp Launcher's `https://recomplauncher.com/pc-catalog.json`, for Windows and Linux builds. The
script uses these fields:
- `assets` globs become patterns, and `files` provides pins and sha256s.
- `boot.start` / `start_linux` name the program.
- `boot.files.what` or `needs` describe the data.
- `setup_required` / `setup_steps` become the "Needs setup first" note.
- Archived, `soon`, non-GitHub and `installer` / `not-a-game` / `source` entries are left out.
Flatpak bundles are skipped.
3. Recompa's `https://recompa.app/index.json`, for Android APKs. The fork with the most downloads that
has a sha256, a package and a signer becomes the `android` build. `assets[0]` becomes the data
requirement, with accepted sha1s. Ports without arm64 are skipped.
Entries are matched by GitHub repo, then by id. A match adds the other catalog's builds and lists that
catalog in `sources`, which the card shows as "via Recomp Launcher" or "via Recompa". The README credits
both catalogs. As of 2026-11-30 the build gives 2,647 entries (about 2.3 MB):
| Build | Entries |
|---|---|
| Linux arm64 | 44 |
| Linux x86-64 | 1,142 |
| Windows x86-64 | 2,009 |
| Android | 769 |
Linux globs without a pin are resolved through the releases API when `GITHUB_TOKEN` or a signed-in
`gh` is available. Otherwise the app resolves them at install time.
`RecompCatalog.load` prefers `Droid-Deck/DroidDeck-Components/main/recomps.json` once it is
published. A scheduled job there can run `build_catalog.py` daily. Schema 1, as written by the
script (an app refuses a newer schema and uses the bundled copy):
```json
{
@@ -46,13 +77,17 @@ without an app release. Schema 1 (an app refuses a newer schema and uses the bun
"name": "DevilutionX", "game": "Diablo", "origin": "PC", "type": "recomp|port|engine",
"repo": "diasurgical/DevilutionX", "license": "...", "art": "https://...",
"prerelease": false,
"release": { "tag": "1.5.5", "published": "..." }, // written by tools/recomps/pin_catalog.py
"release": { "tag": "1.5.5", "published": "..." }, // pin_catalog.py for curated entries, else the source catalog
"android_release": { "tag": "...", "published": "..." }, // when the APK comes from another repo than the PC build
"sources": ["droiddeck", "recomp-launcher", "recompa"], "popularity": 415396,
"setup": "Run setup.sh with your game folder first.",
"builds": {
"linux-arm64": { "asset": "<regex>", "entry": "devilutionx", "args": ["--data-dir", "{data}"],
"file": "devilutionx-linux-aarch64.tar.xz", "sha256": "..." },
"linux-x64": { "asset": "...", "entry": "...", "workdir": "data" },
"windows-x64": { "asset": "...", "entry": "devilutionx.exe" },
"android": { "asset": "..." }
"android": { "asset": "...", "file": "...", "url": "https://...", "sha256": "...",
"package": "org.diasurgical.devilutionx", "signer": "<cert sha256>" }
},
"data": {
"kind": "store|rom|dump|none", "label": "Diablo (GOG)",
@@ -63,8 +98,10 @@ without an app release. Schema 1 (an app refuses a newer schema and uses the bun
}
```
The build is chosen in the order linux-arm64 (native), linux-x64 (FEX), windows-x64 (Proton).
Android builds are only listed for now.
The build is chosen in the order linux-arm64 (native), android, linux-x64 (FEX), windows-x64
(Proton). A build without `entry` gets one guessed after unpacking:
- Linux: an AppImage, else the executable ELF whose name is closest to the project's, nearest the top.
- Windows: `GameExePicker`'s best exe.
Run `tools/recomps/pin_catalog.py` (needs `gh` signed in or `GITHUB_TOKEN` set) after changing the
catalog. It pins every entry to its newest matching release and records the file names and
@@ -91,7 +128,11 @@ checks during testing.
3. **Windows build:** unpacks into `<first Games folder or the store install root>/Recomps/<id>`
and registers the exe with `AddedGames.addExe`. It then appears in the Library (Custom) and
runs through Proton.
4. Writes `recomp-id`, `recomp-tag`, `recomp-published` and `recomp-platform` beside the
4. **Android build:** checks the APK's package name and signing certificate against the catalog,
then installs it through `PackageInstaller` (`RecompAndroid`). The confirmation prompt comes from
the system. The install shows as Play and Remove on the card, and in the Apps tab. The installed tag
is kept in `files/recomps-android/<package>`.
5. Writes `recomp-id`, `recomp-tag`, `recomp-published` and `recomp-platform` beside the
install. `RecompInstaller.installed` finds installs by those files. An update installs the
new release first and then deletes the old folder, carrying the data link over.
@@ -148,15 +189,13 @@ from 820 dp and one below. Controller focus enters on the first card's primary b
## Not done yet
- **Android APKs (Recompa).** Install the `android` build through `PackageInstaller`, verify it
against Recompa's `signer_sha256`, and hand ROMs over with their `delivery` rules. Consuming
Recompa's `index.json` needs its author's permission (the data has no licence).
- **Recomp Launcher's catalog and `recomplauncher.json`.** Xarishark offered help on the DroidDeck
Discord (2026-11-12). Two things would be worth asking for:
- permission to read `pc-catalog.json`, or a feed filtered to entries with arm64 or x86-64
Linux builds;
- support for its `inputs` / `prepare` steps, so recomps that build from the player's dump
(Unleashed, Marathon) can be set up from DroidDeck.
- **Recompa delivery rules.** Hand a chosen ROM to an Android port the way Recompa's `delivery`
says: an in-app picker, a shared folder or an intent.
- **Recomp Launcher setup.** Run its `recomplauncher.json` `inputs` / `prepare` steps, so recomps that
build from the player's dump (Unleashed, Marathon, the `setup` entries) can be set up from DroidDeck.
Xarishark offered help on the DroidDeck Discord (2026-11-12).
- **Choosing a build.** Let the player choose another build when an entry has several (for example
the Android port instead of the FEX one).
- **Linking your own folder.** For data copied from a PC: a folder picker that sets `recomp-data`
by hand.
- **ROM checks.** Hash a chosen ROM against `sha1` and say whether it is the right one.