feat(recomps): add Decomp Buddy's catalog and plans, and install arm64 twins

Decomp Buddy's catalog.json and plans.json become the first source: its
plans name the exact release file, the program in it, a scanned sha256
and the game files needed. The 32 MB plans file is read as a stream.
Store installs are matched with Decomp Buddy's title rules, and a plan's
expected file finds the folder inside the install.

Before installing an x86-64 Linux build, the release is checked for its
arm64 twin with a plain download request. When a project's own download
fails, Decomp Buddy's scanned copy is used. Debian packages unpack to
their data.tar, and installs are also matched by repo.
This commit is contained in:
Kurt Himebauch committed 2026-12-01 11:13:15 -05:00
1 parent d55da2f3c7
commit 3f0952fece
10 files changed
+465 -86

No files matched your search

+56 -39
View File
@@ -36,41 +36,47 @@ DroidDeck is signed in to. It never downloads ROMs, disc images or game files.
## Catalog
DroidDeck keeps no catalog. `RecompCatalog` downloads the two community catalogs, caches them in
`files/recomps/`, revalidates each with its ETag after 6 hours, and merges them on the device. Parsing
both takes about 0.4 s.
DroidDeck keeps no catalog. `RecompCatalog` downloads three community catalogs, caches them in
`files/recomps/`, revalidates each with its ETag after 6 hours, and merges them on the device. An
earlier catalog wins every field it sets; a later one with the same GitHub repo (or id) adds builds the
entry lacks.
1. Recomp Launcher's `https://recomplauncher.com/pc-catalog.json` (about 2.4 MB gzipped) supplies
Windows and Linux builds:
- `assets` globs become patterns, and `files` names give pinned files and sha256s.
- `boot.start` / `start_linux` name the program, `boot.files.what` or `needs` the data, and
`setup_required` / `setup_steps` the setup note.
- Archived, `soon`, non-GitHub and `installer` / `not-a-game` / `source` entries are left out, as
are Flatpak bundles and 32-bit or arm64 Windows builds.
2. Recompa's `https://recompa.app/index.json` (about 1.2 MB gzipped) supplies Android APKs. Each port
uses its fork with the most downloads that has a sha256, a package and a signer. `assets[0]` becomes
the data requirement, with accepted sha1s. Ports without arm64, or needing a newer SDK, are left out,
as is Recompa's own app.
1. **Decomp Buddy** (`TanookiStudios/decomp-buddy`, GPL-3.0):
- `https://tanookistudios.com/decomp-buddy/catalog.json`, about 4,900 games.
- `plans.json`, about 32 MB. `DecompBuddyPlans` reads it as a stream and keeps only the `windows`,
`linux`, `linux-arm64` and `android` targets: the release file, its tag, the program, the scanned
sha256, the Android package and the game files needed.
- Games without a `release` plan are left out.
2. **Recomp Launcher** (`https://recomplauncher.com/pc-catalog.json`):
- `assets` globs and `files` pins; `boot.start` / `start_linux` name the program.
- `setup_required` / `setup_steps` become the setup note.
- Archived, `soon`, non-GitHub, `installer` / `not-a-game` / `source` entries and Flatpak bundles are
left out.
3. **Recompa** (`https://recompa.app/index.json`): Android APKs with a package name and signing
certificate. A Recompa signer is added to a Decomp Buddy APK with the same package.
A Recompa port with the same GitHub repo (or id) as a Recomp Launcher app adds its APK to that app.
The card lists the catalogs an entry came from, and the README credits both. As of 2026-11-30 this
gives 2,646 entries:
As of 2026-12-01 this gives 4,764 entries, 1,812 of them found in more than one catalog:
| Build | Entries |
|---|---|
| Linux arm64 | 40 |
| Linux x86-64 | 1,141 |
| Windows x86-64 | 2,007 |
| Android | 768 |
| Linux arm64 | 214 |
| Linux x86-64 | 2,349 |
| Windows x86-64 | 4,036 |
| Android | 836 |
82% of builds name their release file, so they download without the GitHub releases API. The others
are resolved through that API at install time, which allows 60 unauthenticated calls an hour per
address.
The two parses and the merge take about 1.3 s on a desktop JVM. 96% of builds name their release
file, so they download without the GitHub releases API.
The build is chosen in the order linux-arm64 (native), android, linux-x64 (FEX), windows-x64
(Proton). When the catalog names no program, one is 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.
(Proton).
- **Linux x86-64:** before installing, the release is checked for an arm64 twin, the same file name
with `aarch64`/`arm64` in place of `x86_64`/`amd64`/`x64` (Decomp Buddy's `armSibling` rule). The
check uses a plain request to the download URL. If the twin exists, it is installed natively instead.
- **No program named:** an AppImage, else the executable ELF closest to the project's name (Linux), or
`GameExePicker`'s best exe (Windows).
- **Download fails:** if the project's own download fails and Decomp Buddy scanned that file, it is
fetched from `files.decompbuddy.com/<sha256>/<name>`. That copy is a fallback only, because Decomp
Buddy's hosting runs on donations.
## Installing
@@ -78,8 +84,8 @@ The build is chosen in the order linux-arm64 (native), android, linux-x64 (FEX),
1. Downloads the asset, checking its sha256.
2. **Linux build:** `bsdtar` in the guest unpacks it into the app cache, keeping modes and
symlinks, and unpacks once more when the result is a single archive (Zelda's zip holds a
tar.gz). It then finds `entry` up to four folders down. An AppImage, whether downloaded
symlinks, and unpacks again when the result is a single archive (Zelda's zip holds a tar.gz) or
a Debian package (its `data.tar`), up to three levels. It then finds `entry` up to four folders down. An AppImage, whether downloaded
directly or found inside the archive, goes to `AppImageManager.import`. Anything else becomes
a user app (`UserApps.addPrepared`): the unpacked tree moves to
`/opt/droiddeck-apps/<id>/files`, and a `droiddeck-recomp` wrapper, which starts the program from
@@ -93,22 +99,29 @@ The build is chosen in the order linux-arm64 (native), android, linux-x64 (FEX),
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
5. Writes `recomp-id`, `recomp-tag`, `recomp-published`, `recomp-platform` and `recomp-repo` beside the
install. `RecompInstaller.installed` finds installs by those files. An install belongs to the entry
with its id, or else its repo, since a higher-ranked catalog can rename an entry. An update installs the
new release first and then deletes the old folder.
## Game data
The catalogs name the game a PC port needs (`game`), but not its store ids. For PC ports,
`RecompData` compares that title with the player's installs (store sidecars and Steam client
libraries) and owned games (`StoresState.library` and the Steam page). Titles are compared without
case, punctuation, a leading "The", or edition words such as GOTY, Definitive, Enhanced or Complete.
For PC ports (Decomp Buddy's "PC (Windows)" and "IBM PC (MS-DOS)", Recomp Launcher's `pc`), `RecompData`
matches the game's title against the player's installs (store sidecars and Steam client libraries) and
owned games. It uses Decomp Buddy's rules:
- A subtitle after a colon or dash is fine, so "Fallout 2: A Post Nuclear Role Playing Game" is
Fallout 2.
- A leading possessive such as "Sid Meier's" is dropped.
- Only store-edition words (GOTY, Gold, Complete, Definitive, ...) may follow the title, so "Fallout 2"
is not "Fallout".
- **Installed:** the card shows "Installed on Steam" and the guest folder to point the program at.
- **Owned:** the card offers "Install game".
- **Otherwise:** the card shows what the catalog says the game needs.
Where a plan names the file the port needs in a folder (`expected_filename`, for example `DIABDAT.MPQ`),
the folder holding that file inside the install is the one shown. An install without that file does not
count.
Console recomps are never matched, because no store sells their dumps.
- **Installed:** "Installed on Steam" and the guest folder to point the port at.
- **Owned:** "Install game".
- **Otherwise:** what the catalog says the game needs. Console recomps are never matched.
## UI
@@ -151,6 +164,10 @@ same code.
matching, release picking, program guessing and the wrapper (run under `/bin/sh`). `NavTabsTest`
covers the tab.
- GZDoom 4.14.2 from Decomp Buddy's `linux-arm64` plan (a `.deb` naming no program), on the Pocket FIT:
installed in about 5 s and started natively to its own "Cannot find a game IWAD" screen. With all
three catalogs the FIT loaded 4,764 entries in 6 s.
## Not done yet
- **Recompa delivery rules.** Hand a chosen ROM to an Android port the way Recompa's `delivery`