mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 13:05:47 +00:00
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.
209 lines
13 KiB
Markdown
209 lines
13 KiB
Markdown
# Recomps
|
||
|
||
The Recomps tab (More → Recomps, key `recomps`) lists PC builds of console and PC games made
|
||
by static recompilation, decompilation or engine reimplementation. It installs the build that
|
||
runs best on the device and links the game files the player already owns from a store
|
||
DroidDeck is signed in to. It never downloads ROMs, disc images or game files.
|
||
|
||
## The ecosystem (researched 2026-11-30)
|
||
|
||
- **Recomp Launcher** (`elripalda/RecompLauncher`, GPL-3.0; Xarishark is its most active
|
||
contributor). A Tauri desktop launcher for Windows, Linux x86-64 and macOS. It has no Android
|
||
or arm64 Linux build. Its catalog `https://recomplauncher.com/pc-catalog.json` lists about 2,270
|
||
apps, each with fields such as `repo, tag, assets{windows|linux|macos}, files{sha256}, needs,
|
||
setup_steps`. It never ships game data: "Easy Setup" asks for the player's disc or folder,
|
||
then runs the recomp's own prepare step. Recomps can describe that step in a
|
||
`recomplauncher.json` in their release (schema at
|
||
`https://recomplauncher.com/schema/recomplauncher.json`). The FAQ says it is free, has no ads
|
||
and keeps usage stats opt-in. The catalog data has no stated licence, and many `needs` lines
|
||
are machine-written.
|
||
- **Recompa** (`kalasyan/recompa`, GPL-3.0). An Android hub for recomps shipped as APKs. Its
|
||
`https://recompa.app/index.json` lists about 790 ports with Android package names, signer
|
||
hashes, ABIs and game-data requirements (accepted sha1s, conversions such as v64→z64, and
|
||
where the file goes). The data has no stated licence.
|
||
- **PortMaster** (`PortsMaster/PortMaster-New`, MIT). Its `ports.json` lists about 1,500 arm64
|
||
Linux ports. 266 of them link a Steam page and about 64 a GOG page, so they can be matched to
|
||
owned games. Ports expect PortMaster's runtime (`control.txt`, gptokeyb, gl4es).
|
||
- Most recomps need a console dump: N64 ROMs (Zelda64Recomp, Starfox64Recomp, BanjoRecomp, the
|
||
Ship of Harkinian family) or Xbox 360 files (XenonRecomp: UnleashedRecomp, MarathonRecomp).
|
||
The ones that fit DroidDeck's stores are source ports and engine reimplementations whose data
|
||
is sold on Steam or GOG: OpenMW (Morrowind), DevilutionX (Diablo, GOG), OpenRCT2, Fallout 1/2
|
||
CE, Quake ports, Xash3D (Half-Life), Julius/Augustus (Caesar III), VCMI and fheroes2 (Heroes
|
||
III and II), CorsixTH and OpenLoco.
|
||
- N64Recomp projects (Zelda, Starfox, Banjo), DevilutionX, Xash3D and fheroes2 publish **arm64
|
||
Linux** builds, which run natively in DroidDeck's runtime. Most others publish x86-64 Linux,
|
||
which runs through FEX, and Windows, which runs through Proton.
|
||
|
||
## Catalog
|
||
|
||
`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
|
||
{
|
||
"id": "devilutionx", // [a-z0-9-], also the install's recomp-id
|
||
"name": "DevilutionX", "game": "Diablo", "origin": "PC", "type": "recomp|port|engine",
|
||
"repo": "diasurgical/DevilutionX", "license": "...", "art": "https://...",
|
||
"prerelease": false,
|
||
"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": "...", "file": "...", "url": "https://...", "sha256": "...",
|
||
"package": "org.diasurgical.devilutionx", "signer": "<cert sha256>" }
|
||
},
|
||
"data": {
|
||
"kind": "store|rom|dump|none", "label": "Diablo (GOG)",
|
||
"stores": [{ "store": "gog", "id": "1412601690" }], // Store enum names; Steam ids are appids
|
||
"probe": "DIABDAT.MPQ", // relative path that marks the data folder
|
||
"sha1": ["..."], "note": "..."
|
||
}
|
||
}
|
||
```
|
||
|
||
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
|
||
GitHub's sha256 digests. `--check` exits 1 when a pin is out of date, which a scheduled job in
|
||
DroidDeck-Components can use. Installs download the pinned file from
|
||
`github.com/<repo>/releases/download/`, which GitHub does not rate-limit. The releases API (60
|
||
unauthenticated calls an hour, shared by every device on one address) is used only for entries
|
||
without a pin. On a household with several devices, that budget was already spent by update
|
||
checks during testing.
|
||
|
||
## Installing
|
||
|
||
`RecompInstaller.install`:
|
||
|
||
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
|
||
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 becomes its entry.
|
||
`droiddeck-script-run` launches it, so `droiddeck-fex` decides between native and FEX from
|
||
the folder's ELFs, exactly as for any added Linux app. It also shows on the Desktop page.
|
||
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. **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.
|
||
|
||
## Game data
|
||
|
||
`RecompData.inputs` collects the installs DroidDeck knows about:
|
||
|
||
- store installs, from their `.droiddeck-store.json` sidecar;
|
||
- Steam client libraries, from `SteamLibraryFolders.installed`, giving each game's host and
|
||
guest path;
|
||
- owned games, from `StoresState.library` and the Steam games on the Steam page.
|
||
|
||
`RecompData.resolve` returns one of these states:
|
||
|
||
| State | When | Card |
|
||
|---|---|---|
|
||
| Found | an install holds `probe` (each path part matched without case, shallowest folder up to 3 levels down) | green "Game files found (Steam)", and the guest folder |
|
||
| Incomplete | installed, but `probe` is missing | "Installed on GOG, but the needed files are missing" |
|
||
| Owned | owned, not installed | "Install game" starts the store install |
|
||
| Missing | not owned | "Store page" |
|
||
| BringYourOwn | ROM or dump | the label and the recomp's own instructions |
|
||
|
||
Found writes the guest folder to `recomp-data`. The wrapper reads it at every launch: it passes
|
||
`args` with `{data}` replaced, or, for `workdir: data` (Fallout 2 CE reads from its working
|
||
directory), `cd`s there first. Without a link it starts the program with no extra arguments, so
|
||
the recomp's own folder picker still works. AppImage installs (OpenRCT2) cannot take the
|
||
arguments, so the card shows the folder to choose in the program.
|
||
|
||
## UI
|
||
|
||
A page header, one line saying what the tab does, and filter chips with counts: All, You own
|
||
the game, Bring your own files, Installed. Cards are sorted installed first, then found, owned,
|
||
bring-your-own and the rest. Each card shows art (the project icon, or the store's 600×900
|
||
capsule), the game and kind, a build chip (green once installed), a data chip and an "Android
|
||
app too" chip. Its actions are Install, or Play / Open in Games; Update to <tag> when the catalog
|
||
pins a newer release; the store action; and Remove or Project page. The page shows two columns
|
||
from 820 dp and one below. Controller focus enters on the first card's primary button.
|
||
|
||
## Tested
|
||
|
||
- Zelda 64: Recompiled v1.2.2, linux-arm64, on the Retroid Pocket Duo: Install from the card,
|
||
Play, and it reached its own Select ROM screen natively. The top screen shows the page; the
|
||
bottom screen's rail is labelled Recomps.
|
||
- Ironwail v0.8.2 (Quake), linux-x64, on the Duo through FEX: pinned install in about 5 s, then
|
||
launch. With no Quake install linked, it asks for `-basedir`, which is the argument the
|
||
wrapper passes once Steam or GOG Quake is found.
|
||
- Pocket FIT Elite (portrait 1080×1920): the More tile and the single-column page. The first
|
||
install attempt there got 403 from the releases API (rate limit), which led to the pinned
|
||
downloads. After pinning, the install worked. Launching then stopped with exit 126: FEX needs
|
||
the Steam Linux Runtime (sniper), and that device had never opened Steam. This applies to
|
||
every x86 Linux app in DroidDeck; the card should say so (see below).
|
||
- Unit tests: `RecompsTest`, which runs the wrapper under `/bin/sh` and covers release picking
|
||
and pinning, data probing and resolution, and catalog validation, and `NavTabsTest`.
|
||
|
||
## Not done yet
|
||
|
||
- **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.
|
||
- **x86 runtime hint.** A linux-x64 build needs Steam opened once so the FEX runtime (sniper) is
|
||
installed. Show that on the card, or fall back to the Windows build.
|
||
- **Steam ownership** relies on the Steam page's library or the Steam store sign-in. A game
|
||
installed by the Steam client counts as Found regardless.
|
||
- **Recomp setup steps.** Some recomps build themselves from the player's data with bundled
|
||
Python (Recompia). They need executable storage, so they must stay inside the Linux root, never
|
||
under `/media`; see the Discord thread on Recompia from 2026-11-15.
|