mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 20:45:43 +00:00
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:
1 parent
3b27cbece0
commit
c878284319
14 files changed
+1172
-493
No files matched your search
@@ -107,6 +107,16 @@ DroidDeck is [GPL-3.0](LICENSE). Steam and Proton belong to Valve Corporation. V
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Recomps</b></summary>
|
||||
|
||||
- The Recomps tab's list combines DroidDeck's own entries with two community catalogs, rebuilt by `tools/recomps/build_catalog.py`. Each entry shows which catalog it came from.
|
||||
- [Recomp Launcher](https://recomplauncher.com) ([elripalda/RecompLauncher](https://github.com/elripalda/RecompLauncher), GPL-3.0) by [@elripalda](https://github.com/elripalda), [@Xarishark](https://github.com/Xarishark) and contributors: its `pc-catalog.json` supplies the Windows and Linux recomps, their release pins and checksums, start programs, setup notes and the game data each needs.
|
||||
- [Recompa](https://recompa.app) ([kalasyan/recompa](https://github.com/kalasyan/recompa), GPL-3.0) by [@kalasyan](https://github.com/kalasyan): its `index.json` supplies the Android ports, their APK checksums, package names and signing certificates, and the ROMs or files each needs.
|
||||
- Every game's build is downloaded from its own developers' releases and keeps its own licence. DroidDeck ships no ROMs or game files.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Audio, video and HUD</b></summary>
|
||||
|
||||
|
||||
@@ -1,423 +1 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"recomps": [
|
||||
{
|
||||
"id": "zelda64recomp",
|
||||
"name": "Zelda 64: Recompiled",
|
||||
"game": "The Legend of Zelda: Majora's Mask",
|
||||
"origin": "N64",
|
||||
"type": "recomp",
|
||||
"repo": "Zelda64Recomp/Zelda64Recomp",
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://raw.githubusercontent.com/Zelda64Recomp/Zelda64Recomp/dev/icons/512.png",
|
||||
"builds": {
|
||||
"linux-arm64": {
|
||||
"asset": "^Zelda64Recompiled-.*-Linux-ARM64\\.zip$",
|
||||
"entry": "Zelda64Recompiled",
|
||||
"file": "Zelda64Recompiled-v1.2.2-Linux-ARM64.zip",
|
||||
"sha256": "2e49b96aced578363065e1764ca96eaa5590cb6f7e80efd10e8ce1a08462b933"
|
||||
},
|
||||
"linux-x64": {
|
||||
"asset": "^Zelda64Recompiled-.*-Linux-X64\\.zip$",
|
||||
"entry": "Zelda64Recompiled",
|
||||
"file": "Zelda64Recompiled-v1.2.2-Linux-X64.zip",
|
||||
"sha256": "de8b19cdb4e3ad0c10fd6d8127f7a6cc2a9eba106d89c753439178b718887c42"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^Zelda64Recompiled-.*-Windows\\.zip$",
|
||||
"entry": "Zelda64Recompiled.exe",
|
||||
"file": "Zelda64Recompiled-v1.2.2-Windows.zip",
|
||||
"sha256": "d02b95f1cf5e4d44d6587fa6136c6db521f61aa41ba8700c05f91bea8b0a26d0"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "rom",
|
||||
"label": "Majora's Mask (USA) N64 ROM",
|
||||
"sha1": [
|
||||
"d6133ace5afaa0882cf214cf88daba39e266c078"
|
||||
],
|
||||
"note": "Choose the ROM from the recomp's own start screen."
|
||||
},
|
||||
"release": {
|
||||
"tag": "v1.2.2",
|
||||
"published": "2025-08-27T00:58:35Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "starfox64recomp",
|
||||
"name": "Starfox 64: Recompiled",
|
||||
"game": "Star Fox 64",
|
||||
"origin": "N64",
|
||||
"type": "recomp",
|
||||
"repo": "sonicdcer/Starfox64Recomp",
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://raw.githubusercontent.com/sonicdcer/Starfox64Recomp/main/icons/512.png",
|
||||
"builds": {
|
||||
"linux-arm64": {
|
||||
"asset": "^Starfox64Recompiled-.*-Linux-ARM64-Release\\.zip$",
|
||||
"entry": "Starfox64Recompiled",
|
||||
"file": "Starfox64Recompiled-v1.0.3-Linux-ARM64-Release.zip",
|
||||
"sha256": "85408daa5ceac1fc208a744b0a35fb316c417d62c709761aceb242353fb2a1c0"
|
||||
},
|
||||
"linux-x64": {
|
||||
"asset": "^Starfox64Recompiled-.*-Linux-X64-Release\\.zip$",
|
||||
"entry": "Starfox64Recompiled",
|
||||
"file": "Starfox64Recompiled-v1.0.3-Linux-X64-Release.zip",
|
||||
"sha256": "e74932bd0edb6186a015dabaa87b6b24af3d3b5511ff3b0293a2c3331840cdf0"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^Starfox64Recompiled-.*-Windows-.*\\.zip$",
|
||||
"entry": "Starfox64Recompiled.exe",
|
||||
"file": "Starfox64Recompiled-v1.0.3-Windows-RelWithDebInfo.zip",
|
||||
"sha256": "768c18b0aeb325a0102f722338f09a270a76eeebea29154764147a93d0bde530"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "rom",
|
||||
"label": "Star Fox 64 (USA) N64 ROM",
|
||||
"note": "Choose the ROM from the recomp's own start screen."
|
||||
},
|
||||
"release": {
|
||||
"tag": "1.0.3",
|
||||
"published": "2025-12-30T04:13:00Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "banjorecomp",
|
||||
"name": "Banjo: Recompiled",
|
||||
"game": "Banjo-Kazooie",
|
||||
"origin": "N64",
|
||||
"type": "recomp",
|
||||
"repo": "BanjoRecomp/BanjoRecomp",
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://raw.githubusercontent.com/BanjoRecomp/BanjoRecomp/main/icons/app.png",
|
||||
"builds": {
|
||||
"linux-arm64": {
|
||||
"asset": "^BanjoRecompiled-.*-Linux-ARM64\\.tar\\.gz$",
|
||||
"entry": "BanjoRecompiled",
|
||||
"file": "BanjoRecompiled-v1.0.2-Linux-ARM64.tar.gz",
|
||||
"sha256": "53515be8bc453bc32ed8cbc72e3cd06350ab4a28bd94b0aa6499d4b963a83757"
|
||||
},
|
||||
"linux-x64": {
|
||||
"asset": "^BanjoRecompiled-.*-Linux-X64\\.tar\\.gz$",
|
||||
"entry": "BanjoRecompiled",
|
||||
"file": "BanjoRecompiled-v1.0.2-Linux-X64.tar.gz",
|
||||
"sha256": "a34a4d361221171ea638e0165301fff817c53b9cd46167c5affd37867cfc7ad0"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^BanjoRecompiled-.*-Windows\\.zip$",
|
||||
"entry": "BanjoRecompiled.exe",
|
||||
"file": "BanjoRecompiled-v1.0.2-Windows.zip",
|
||||
"sha256": "fc34aad48e06681878bedd13b88d5332a2f21f6a98cafc931c94d54892a4dd92"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "rom",
|
||||
"label": "Banjo-Kazooie (USA) N64 ROM",
|
||||
"note": "Choose the ROM from the recomp's own start screen."
|
||||
},
|
||||
"release": {
|
||||
"tag": "v1.0.2",
|
||||
"published": "2026-07-31T19:43:17Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "2ship2harkinian",
|
||||
"name": "2 Ship 2 Harkinian",
|
||||
"game": "The Legend of Zelda: Majora's Mask",
|
||||
"origin": "N64",
|
||||
"type": "port",
|
||||
"repo": "2ship2harkinian/2ship2harkinian",
|
||||
"license": "CC0-1.0",
|
||||
"art": "https://raw.githubusercontent.com/2ship2harkinian/2ship2harkinian/develop/mm/linux/2s2hIcon.png",
|
||||
"builds": {
|
||||
"linux-x64": {
|
||||
"asset": "^2Ship-.*-Linux\\.zip$",
|
||||
"entry": "2ship.appimage",
|
||||
"file": "2Ship-Battler-Bravo-Linux.zip",
|
||||
"sha256": "6cdd4fe06f3f9b095e99c86fef70b9265cc921fb6faa7ba1e18e94e90ed0b345"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^2Ship-.*-Win64\\.zip$",
|
||||
"entry": "2ship.exe",
|
||||
"file": "2Ship-Battler-Bravo-Win64.zip",
|
||||
"sha256": "a46664a01623ad5d7cc82d29a9889699f6a98c9501c7a959a089f34380c1f078"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "rom",
|
||||
"label": "Majora's Mask (USA) N64 ROM",
|
||||
"sha1": [
|
||||
"d6133ace5afaa0882cf214cf88daba39e266c078"
|
||||
],
|
||||
"note": "The port asks for the ROM on first start and builds its asset archive from it."
|
||||
},
|
||||
"release": {
|
||||
"tag": "5.0.1",
|
||||
"published": "2026-08-25T17:54:43Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "unleashedrecomp",
|
||||
"name": "Unleashed Recompiled",
|
||||
"game": "Sonic Unleashed",
|
||||
"origin": "Xbox 360",
|
||||
"type": "recomp",
|
||||
"repo": "hedge-dev/UnleashedRecomp",
|
||||
"license": "GPL-3.0",
|
||||
"builds": {
|
||||
"windows-x64": {
|
||||
"asset": "^UnleashedRecomp-Windows\\.zip$",
|
||||
"entry": "UnleashedRecomp.exe",
|
||||
"file": "UnleashedRecomp-Windows.zip"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "dump",
|
||||
"label": "Sonic Unleashed Xbox 360 game files and title update",
|
||||
"note": "The installer inside the recomp asks for your dumped game, update and DLC folders."
|
||||
},
|
||||
"release": {
|
||||
"tag": "v1.0.3",
|
||||
"published": "2025-04-03T22:04:45Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "devilutionx",
|
||||
"name": "DevilutionX",
|
||||
"game": "Diablo",
|
||||
"origin": "PC",
|
||||
"type": "port",
|
||||
"repo": "diasurgical/DevilutionX",
|
||||
"license": "Sustainable Use License",
|
||||
"art": "https://raw.githubusercontent.com/diasurgical/DevilutionX/master/Packaging/resources/icon.png",
|
||||
"builds": {
|
||||
"linux-arm64": {
|
||||
"asset": "^devilutionx-linux-aarch64\\.tar\\.xz$",
|
||||
"entry": "devilutionx",
|
||||
"args": [
|
||||
"--data-dir",
|
||||
"{data}"
|
||||
],
|
||||
"file": "devilutionx-linux-aarch64.tar.xz",
|
||||
"sha256": "71f34342cd750dc6dec1effefa250e90a5fe0f127e79d4c9c66f4d07706c3442"
|
||||
},
|
||||
"linux-x64": {
|
||||
"asset": "^devilutionx-linux-x86_64\\.tar\\.xz$",
|
||||
"entry": "devilutionx",
|
||||
"args": [
|
||||
"--data-dir",
|
||||
"{data}"
|
||||
],
|
||||
"file": "devilutionx-linux-x86_64.tar.xz",
|
||||
"sha256": "3c0a79afad682054c4d11a91728887617b9f5dfbd8b6810dbb9226c380474432"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^devilutionx-windows-x86_64\\.zip$",
|
||||
"entry": "devilutionx.exe",
|
||||
"file": "devilutionx-windows-x86_64.zip",
|
||||
"sha256": "a20cfb62cd611f76aac78f9bf09a28f57794fbfe63ae6da9245deca446680b2b"
|
||||
},
|
||||
"android": {
|
||||
"asset": "^devilutionx-android\\.apk$",
|
||||
"file": "devilutionx-android.apk",
|
||||
"sha256": "c5a53ff35223e367eba75ef8ed2caa31ea8e78792d8aff00f2cee51a0566b28f"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "Diablo (GOG)",
|
||||
"stores": [
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1412601690"
|
||||
}
|
||||
],
|
||||
"probe": "DIABDAT.MPQ"
|
||||
},
|
||||
"release": {
|
||||
"tag": "1.5.5",
|
||||
"published": "2025-10-30T17:00:17Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ironwail",
|
||||
"name": "Ironwail",
|
||||
"game": "Quake",
|
||||
"origin": "PC",
|
||||
"type": "port",
|
||||
"repo": "andrei-drexler/ironwail",
|
||||
"license": "GPL-2.0",
|
||||
"art": "https://shared.steamstatic.com/store_item_assets/steam/apps/2310/library_600x900.jpg",
|
||||
"builds": {
|
||||
"linux-x64": {
|
||||
"asset": "^ironwail-.*-linux-x64\\.tar\\.gz$",
|
||||
"entry": "ironwail",
|
||||
"args": [
|
||||
"-basedir",
|
||||
"{data}"
|
||||
],
|
||||
"file": "ironwail-0.8.2-linux-x64.tar.gz",
|
||||
"sha256": "fcb0219d13c50f64728892f0558b4761ba5578319a6cc01021fad981c6333aa5"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^ironwail-.*-win64\\.zip$",
|
||||
"entry": "ironwail.exe",
|
||||
"file": "ironwail-0.8.2-win64.zip",
|
||||
"sha256": "0e54e9089ce72bad73c288148cfb5474a00b05d9e1da1c8feb0b76665faf7d01"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "Quake (Steam or GOG)",
|
||||
"stores": [
|
||||
{
|
||||
"store": "steam",
|
||||
"id": "2310"
|
||||
},
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1440166133"
|
||||
}
|
||||
],
|
||||
"probe": "id1/pak0.pak"
|
||||
},
|
||||
"release": {
|
||||
"tag": "v0.8.2",
|
||||
"published": "2026-08-11T17:20:22Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "openrct2",
|
||||
"name": "OpenRCT2",
|
||||
"game": "RollerCoaster Tycoon 2",
|
||||
"origin": "PC",
|
||||
"type": "port",
|
||||
"repo": "OpenRCT2/OpenRCT2",
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://shared.steamstatic.com/store_item_assets/steam/apps/285330/library_600x900.jpg",
|
||||
"builds": {
|
||||
"linux-x64": {
|
||||
"asset": "^OpenRCT2-.*-linux-x86_64\\.AppImage$",
|
||||
"file": "OpenRCT2-v0.5.7-linux-x86_64.AppImage",
|
||||
"sha256": "d02ecb52d946d1e5f00db53a164fadbd41bbb8636f6f5cdddb44d954a3bcdb64"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^OpenRCT2-.*-windows-portable-x64\\.zip$",
|
||||
"entry": "openrct2.exe",
|
||||
"file": "OpenRCT2-v0.5.7-windows-portable-x64.zip",
|
||||
"sha256": "c8759848d0035a5de41985c5c6b8adb69aa197731f28a6f7e7441830912b0300"
|
||||
},
|
||||
"android": {
|
||||
"asset": "^OpenRCT2-.*-android\\.apk$",
|
||||
"file": "OpenRCT2-v0.5.7-android.apk",
|
||||
"sha256": "3cc3b3078a120ae5a65b259c21bc989765a7008883f3298604976c607032cb0d"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "RollerCoaster Tycoon 2 (Steam or GOG)",
|
||||
"stores": [
|
||||
{
|
||||
"store": "steam",
|
||||
"id": "285330"
|
||||
},
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1207658957"
|
||||
}
|
||||
],
|
||||
"probe": "Data/g1.dat",
|
||||
"note": "OpenRCT2 asks for this folder on first start."
|
||||
},
|
||||
"release": {
|
||||
"tag": "v0.5.7",
|
||||
"published": "2026-11-01T10:57:49Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fallout2-ce",
|
||||
"name": "Fallout 2 Community Edition",
|
||||
"game": "Fallout 2",
|
||||
"origin": "PC",
|
||||
"type": "port",
|
||||
"repo": "alexbatalov/fallout2-ce",
|
||||
"license": "Sustainable Use License",
|
||||
"art": "https://shared.steamstatic.com/store_item_assets/steam/apps/38410/library_600x900.jpg",
|
||||
"builds": {
|
||||
"linux-x64": {
|
||||
"asset": "^fallout2-ce-linux-x64\\.tar\\.gz$",
|
||||
"entry": "fallout2-ce",
|
||||
"workdir": "data",
|
||||
"file": "fallout2-ce-linux-x64.tar.gz"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^fallout2-ce-windows-x64\\.zip$",
|
||||
"entry": "fallout2-ce.exe",
|
||||
"file": "fallout2-ce-windows-x64.zip"
|
||||
},
|
||||
"android": {
|
||||
"asset": "^fallout2-ce-android\\.apk$",
|
||||
"file": "fallout2-ce-android.apk"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "Fallout 2 (Steam or GOG)",
|
||||
"stores": [
|
||||
{
|
||||
"store": "steam",
|
||||
"id": "38410"
|
||||
},
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1440166436"
|
||||
}
|
||||
],
|
||||
"probe": "master.dat"
|
||||
},
|
||||
"release": {
|
||||
"tag": "v1.3.0",
|
||||
"published": "2024-04-21T10:16:02Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "openmw",
|
||||
"name": "OpenMW",
|
||||
"game": "The Elder Scrolls III: Morrowind",
|
||||
"origin": "PC",
|
||||
"type": "engine",
|
||||
"repo": "OpenMW/openmw",
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://shared.steamstatic.com/store_item_assets/steam/apps/22320/library_600x900.jpg",
|
||||
"builds": {
|
||||
"linux-x64": {
|
||||
"asset": "^openmw-[0-9.]+-Linux-64Bit\\.tar\\.gz$",
|
||||
"entry": "openmw-launcher",
|
||||
"file": "openmw-0.51.0-Linux-64Bit.tar.gz",
|
||||
"sha256": "a39459e6adad06163eb0ffd4d80229e13aec8748211c3dfd5bf95c204ae68f0b"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "Morrowind GOTY (Steam or GOG)",
|
||||
"stores": [
|
||||
{
|
||||
"store": "steam",
|
||||
"id": "22320"
|
||||
},
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1440163901"
|
||||
}
|
||||
],
|
||||
"probe": "Data Files/Morrowind.esm",
|
||||
"note": "The OpenMW launcher's install wizard asks for the Morrowind folder."
|
||||
},
|
||||
"release": {
|
||||
"tag": "openmw-0.51.0",
|
||||
"published": "2026-06-19T19:58:46Z"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
{"schema":1,"sources":{"droiddeck":{"name":"DroidDeck","url":"https://github.com/Droid-Deck/DroidDeck"},"recomp-launcher":{"name":"Recomp Launcher","url":"https://recomplauncher.com","updated":"2026-12-01T02:17:39+00:00"},"recompa":{"name":"Recompa","url":"https://recompa.app","updated":"2026-12-01T00:18:11Z"}},"recomps":[{"id":"zelda64recomp","name":"Zelda 64: Recompiled","game":"The Legend of Zelda: Majora's Mask","origin":"N64","type":"recomp","repo":"Zelda64Recomp/Zelda64Recomp","license":"GPL-3.0","art":"https://raw.githubusercontent.com/Zelda64Recomp/Zelda64Recomp/dev/icons/512.png","builds":{"linux-arm64":{"asset":"^Zelda64Recompiled-.*-Linux-ARM64\\.zip$","entry":"Zelda64Recompiled","file":"Zelda64Recompiled-v1.2.2-Linux-ARM64.zip","sha256":"2e49b96aced578363065e1764ca96eaa5590cb6f7e80efd10e8ce1a08462b933"},"linux-x64":{"asset":"^Zelda64Recompiled-.*-Linux-X64\\.zip$","entry":"Zelda64Recompiled","file":"Zelda64Recompiled-v1.2.2-Linux-X64.zip","sha256":"de8b19cdb4e3ad0c10fd6d8127f7a6cc2a9eba106d89c753439178b718887c42"},"windows-x64":{"asset":"^Zelda64Recompiled-.*-Windows\\.zip$","entry":"Zelda64Recompiled.exe","file":"Zelda64Recompiled-v1.2.2-Windows.zip","sha256":"d02b95f1cf5e4d44d6587fa6136c6db521f61aa41ba8700c05f91bea8b0a26d0"}},"data":{"kind":"rom","label":"Majora's Mask (USA) N64 ROM","sha1":["d6133ace5afaa0882cf214cf88daba39e266c078"],"note":"Choose the ROM from the recomp's own start screen."},"release":{"tag":"v1.2.2","published":"2025-08-27T00:58:35Z"},"sources":["droiddeck","recomp-launcher"],"popularity":415396},{"id":"starfox64recomp","name":"Starfox 64: Recompiled","game":"Star Fox 64","origin":"N64","type":"recomp","repo":"sonicdcer/Starfox64Recomp","license":"GPL-3.0","art":"https://raw.githubusercontent.com/sonicdcer/Starfox64Recomp/main/icons/512.png","builds":{"linux-arm64":{"asset":"^Starfox64Recompiled-.*-Linux-ARM64-Release\\.zip$","entry":"Starfox64Recompiled","file":"Starfox64Recompiled-v1.0.3-Linux-ARM64-Release.zip","sha256":"85408daa5ceac1fc208a744b0a35fb316c417d62c709761aceb242353fb2a1c0"},"linux-x64":{"asset":"^Starfox64Recompiled-.*-Linux-X64-Release\\.zip$","entry":"Starfox64Recompiled","file":"Starfox64Recompiled-v1.0.3-Linux-X64-Release.zip","sha256":"e74932bd0edb6186a015dabaa87b6b24af3d3b5511ff3b0293a2c3331840cdf0"},"windows-x64":{"asset":"^Starfox64Recompiled-.*-Windows-.*\\.zip$","entry":"Starfox64Recompiled.exe","file":"Starfox64Recompiled-v1.0.3-Windows-RelWithDebInfo.zip","sha256":"768c18b0aeb325a0102f722338f09a270a76eeebea29154764147a93d0bde530"}},"data":{"kind":"rom","label":"Star Fox 64 (USA) N64 ROM","note":"Choose the ROM from the recomp's own start screen."},"release":{"tag":"1.0.3","published":"2025-12-30T04:13:00Z"},"sources":["droiddeck","recomp-launcher"],"popularity":33951},{"id":"banjorecomp","name":"Banjo: Recompiled","game":"Banjo-Kazooie","origin":"N64","type":"recomp","repo":"BanjoRecomp/BanjoRecomp","license":"GPL-3.0","art":"https://raw.githubusercontent.com/BanjoRecomp/BanjoRecomp/main/icons/app.png","builds":{"linux-arm64":{"asset":"^BanjoRecompiled-.*-Linux-ARM64\\.tar\\.gz$","entry":"BanjoRecompiled","file":"BanjoRecompiled-v1.0.2-Linux-ARM64.tar.gz","sha256":"53515be8bc453bc32ed8cbc72e3cd06350ab4a28bd94b0aa6499d4b963a83757"},"linux-x64":{"asset":"^BanjoRecompiled-.*-Linux-X64\\.tar\\.gz$","entry":"BanjoRecompiled","file":"BanjoRecompiled-v1.0.2-Linux-X64.tar.gz","sha256":"a34a4d361221171ea638e0165301fff817c53b9cd46167c5affd37867cfc7ad0"},"windows-x64":{"asset":"^BanjoRecompiled-.*-Windows\\.zip$","entry":"BanjoRecompiled.exe","file":"BanjoRecompiled-v1.0.2-Windows.zip","sha256":"fc34aad48e06681878bedd13b88d5332a2f21f6a98cafc931c94d54892a4dd92"}},"data":{"kind":"rom","label":"Banjo-Kazooie (USA) N64 ROM","note":"Choose the ROM from the recomp's own start screen."},"release":{"tag":"v1.0.2","published":"2026-07-31T19:43:17Z"},"sources":["droiddeck","recomp-launcher"],"popularity":161572},{"id":"2ship2harkinian","name":"2 Ship 2 Harkinian","game":"The Legend of Zelda: Majora's Mask","origin":"N64","type":"port","repo":"2ship2harkinian/2ship2harkinian","license":"CC0-1.0","art":"https://raw.githubusercontent.com/2ship2harkinian/2ship2harkinian/develop/mm/linux/2s2hIcon.png","builds":{"linux-x64":{"asset":"^2Ship-.*-Linux\\.zip$","entry":"2ship.appimage","file":"2Ship-Battler-Bravo-Linux.zip","sha256":"6cdd4fe06f3f9b095e99c86fef70b9265cc921fb6faa7ba1e18e94e90ed0b345"},"windows-x64":{"asset":"^2Ship-.*-Win64\\.zip$","entry":"2ship.exe","file":"2Ship-Battler-Bravo-Win64.zip","sha256":"a46664a01623ad5d7cc82d29a9889699f6a98c9501c7a959a089f34380c1f078"},"android":{"asset":"^2s2h\\.apk$","file":"2s2h.apk","url":"https://github.com/Waterdish/2ship2harkinian-Android/releases/download/v1.1.2P1/2s2h.apk","sha256":"737280de7dda915a4e6ae1d22baae5c220a08a5aaa6f054886036c8d889a0bbf","package":"com.dishii.mm","signer":"92e4da94a3395ffc9fe9f52aa73f8490d7435171c7915fafcc29babdda356629"}},"data":{"kind":"rom","label":"Majora's Mask (USA) N64 ROM","sha1":["d6133Line truncated
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.droiddeck.launcher.runtime
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.content.pm.PackageInstaller
|
||||
import android.content.pm.PackageManager
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.widget.Toast
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.update.SelfInstaller
|
||||
import java.io.File
|
||||
|
||||
object RecompAndroid {
|
||||
const val ACTION_STATUS = "com.droiddeck.launcher.recomps.INSTALL_STATUS"
|
||||
private const val RECORDS = "recomps-android"
|
||||
|
||||
@Volatile private var registered = false
|
||||
@Volatile var onChanged: () -> Unit = {}
|
||||
|
||||
private fun record(context: Context, pkg: String) = File(File(context.filesDir, RECORDS), pkg)
|
||||
|
||||
fun installed(context: Context, entries: List<RecompCatalog.Entry>): Map<String, RecompInstaller.Installed> {
|
||||
val pm = context.packageManager
|
||||
return entries.mapNotNull { e ->
|
||||
val pkg = e.android?.pkg ?: return@mapNotNull null
|
||||
runCatching { pm.getPackageInfo(pkg, 0) }.getOrNull() ?: return@mapNotNull null
|
||||
val lines = FileUtils.readString(record(context, pkg))?.lines().orEmpty()
|
||||
e.id to RecompInstaller.Installed(e.id, "android:$pkg", lines.getOrNull(0)?.takeIf { it.isNotEmpty() },
|
||||
lines.getOrNull(1), RecompCatalog.Platform.ANDROID.key, record(context, pkg))
|
||||
}.toMap()
|
||||
}
|
||||
|
||||
// Runs on a worker thread. The APK must carry the package name and signing certificate the catalog
|
||||
// names, so a replaced release asset cannot install as, or over, a different app.
|
||||
fun install(context: Context, entry: RecompCatalog.Entry, build: RecompCatalog.Build, release: RecompInstaller.Release, apk: File): String? {
|
||||
val pkg = build.pkg ?: return context.getString(R.string.recomps_apk_mismatch)
|
||||
if (!SelfInstaller.canInstall(context)) {
|
||||
context.startActivity(SelfInstaller.permissionIntent(context).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
|
||||
return context.getString(R.string.recomps_allow_installs)
|
||||
}
|
||||
val flags = if (Build.VERSION.SDK_INT >= 28) PackageManager.GET_SIGNING_CERTIFICATES else @Suppress("DEPRECATION") PackageManager.GET_SIGNATURES
|
||||
val info = context.packageManager.getPackageArchiveInfo(apk.path, flags) ?: return context.getString(R.string.recomps_apk_mismatch)
|
||||
if (info.packageName != pkg) return context.getString(R.string.recomps_apk_mismatch)
|
||||
if (build.signer != null && build.signer !in SelfInstaller.archiveSignerDigests(info)) return context.getString(R.string.recomps_apk_mismatch)
|
||||
listen(context)
|
||||
FileUtils.writeString(record(context, pkg).apply { parentFile?.mkdirs() }, "${release.tag}\n${release.published}\n")
|
||||
SelfInstaller.install(context, apk, pkg, ACTION_STATUS)
|
||||
return null
|
||||
}
|
||||
|
||||
fun launch(context: Context, pkg: String): Boolean {
|
||||
val intent = context.packageManager.getLaunchIntentForPackage(pkg) ?: return false
|
||||
return runCatching { context.startActivity(intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) }.isSuccess
|
||||
}
|
||||
|
||||
fun uninstall(context: Context, pkg: String) {
|
||||
record(context, pkg).delete()
|
||||
runCatching {
|
||||
context.startActivity(Intent(Intent.ACTION_DELETE, Uri.parse("package:$pkg")).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
|
||||
}
|
||||
}
|
||||
|
||||
private fun listen(context: Context) {
|
||||
if (registered) return
|
||||
registered = true
|
||||
val app = context.applicationContext
|
||||
val receiver = object : BroadcastReceiver() {
|
||||
override fun onReceive(c: Context, intent: Intent) {
|
||||
when (val status = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, PackageInstaller.STATUS_FAILURE)) {
|
||||
PackageInstaller.STATUS_PENDING_USER_ACTION -> {
|
||||
val confirm = if (Build.VERSION.SDK_INT >= 33) intent.getParcelableExtra(Intent.EXTRA_INTENT, Intent::class.java)
|
||||
else @Suppress("DEPRECATION") intent.getParcelableExtra(Intent.EXTRA_INTENT)
|
||||
confirm?.let { SelfInstaller.safeConfirmIntent(app, it) }?.let { runCatching { app.startActivity(it) } }
|
||||
}
|
||||
PackageInstaller.STATUS_SUCCESS -> onChanged()
|
||||
else -> {
|
||||
val message = SelfInstaller.describeFailure(app, status, intent.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE))
|
||||
Toast.makeText(app, message, Toast.LENGTH_LONG).show()
|
||||
onChanged()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
val filter = IntentFilter(ACTION_STATUS)
|
||||
if (Build.VERSION.SDK_INT >= 33) app.registerReceiver(receiver, filter, Context.RECEIVER_NOT_EXPORTED)
|
||||
else app.registerReceiver(receiver, filter)
|
||||
}
|
||||
}
|
||||
@@ -21,13 +21,17 @@ object RecompCatalog {
|
||||
}
|
||||
}
|
||||
|
||||
// A build DroidDeck can run, in the order it is preferred: native arm64 Linux, x86-64 Linux through FEX,
|
||||
// then Windows through Proton. Android APKs are listed but installed by the system package installer.
|
||||
val PREFERENCE = listOf(Platform.LINUX_ARM64, Platform.LINUX_X64, Platform.WINDOWS_X64)
|
||||
// Native arm64 Linux first, then an Android APK, then x86-64 Linux through FEX, then Windows through Proton.
|
||||
val PREFERENCE = listOf(Platform.LINUX_ARM64, Platform.ANDROID, Platform.LINUX_X64, Platform.WINDOWS_X64)
|
||||
|
||||
const val SOURCE_DROIDDECK = "droiddeck"
|
||||
const val SOURCE_RECOMP_LAUNCHER = "recomp-launcher"
|
||||
const val SOURCE_RECOMPA = "recompa"
|
||||
|
||||
class Build(
|
||||
val platform: Platform, val asset: Regex, val entry: String, val args: List<String>, val inData: Boolean,
|
||||
val file: String? = null, val sha256: String? = null,
|
||||
val file: String? = null, val sha256: String? = null, val url: String? = null,
|
||||
val pkg: String? = null, val signer: String? = null,
|
||||
)
|
||||
|
||||
enum class DataKind { STORE, ROM, DUMP, NONE }
|
||||
@@ -44,11 +48,17 @@ object RecompCatalog {
|
||||
val repo: String, val license: String, val homepage: String, val art: String?,
|
||||
val builds: List<Build>, val data: Data, val prerelease: Boolean,
|
||||
val tag: String? = null, val published: String = "",
|
||||
val sources: List<String> = listOf(SOURCE_DROIDDECK), val popularity: Long = 0, val setup: String? = null,
|
||||
val androidTag: String? = null, val androidPublished: String = "",
|
||||
) {
|
||||
fun build(platform: Platform) = builds.firstOrNull { it.platform == platform }
|
||||
|
||||
fun preferred(): Build? = PREFERENCE.firstNotNullOfOrNull { build(it) }
|
||||
|
||||
fun tagFor(platform: Platform) = if (platform == Platform.ANDROID) androidTag ?: tag else tag
|
||||
|
||||
fun publishedFor(platform: Platform) = if (platform == Platform.ANDROID && androidTag != null) androidPublished else published
|
||||
|
||||
val android get() = build(Platform.ANDROID)
|
||||
}
|
||||
|
||||
@@ -90,10 +100,14 @@ object RecompCatalog {
|
||||
b.keys().asSequence().mapNotNull { key ->
|
||||
val platform = Platform.of(key) ?: return@mapNotNull null
|
||||
val spec = b.getJSONObject(key)
|
||||
Build(platform, Regex(spec.getString("asset"), RegexOption.IGNORE_CASE), spec.optString("entry"), strings(spec.optJSONArray("args")),
|
||||
Build(platform, Regex(spec.getString("asset"), RegexOption.IGNORE_CASE),
|
||||
spec.optString("entry").takeIf { '/' !in it && it != "." && it != ".." }.orEmpty(), strings(spec.optJSONArray("args")),
|
||||
spec.optString("workdir") == "data",
|
||||
spec.optString("file").takeIf { it.isNotEmpty() && '/' !in it && it != "." && it != ".." },
|
||||
spec.optString("sha256").lowercase().takeIf { Regex("[0-9a-f]{64}").matches(it) })
|
||||
spec.optString("sha256").lowercase().takeIf { Regex("[0-9a-f]{64}").matches(it) },
|
||||
spec.optString("url").takeIf { it.startsWith("https://") },
|
||||
spec.optString("package").takeIf { Regex("[A-Za-z][\\w]*(\\.[A-Za-z][\\w]*)+").matches(it) },
|
||||
spec.optString("signer").lowercase().takeIf { Regex("[0-9a-f]{64}").matches(it) })
|
||||
}.toList()
|
||||
}.orEmpty()
|
||||
val d = o.optJSONObject("data") ?: JSONObject()
|
||||
@@ -114,6 +128,11 @@ object RecompCatalog {
|
||||
o.optBoolean("prerelease", false),
|
||||
o.optJSONObject("release")?.optString("tag")?.takeIf { it.isNotEmpty() },
|
||||
o.optJSONObject("release")?.optString("published").orEmpty(),
|
||||
strings(o.optJSONArray("sources")).ifEmpty { listOf(SOURCE_DROIDDECK) },
|
||||
o.optLong("popularity", 0),
|
||||
o.optString("setup").takeIf { it.isNotEmpty() },
|
||||
o.optJSONObject("android_release")?.optString("tag")?.takeIf { it.isNotEmpty() },
|
||||
o.optJSONObject("android_release")?.optString("published").orEmpty(),
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.droiddeck.launcher.core.Downloader
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.core.Hashes
|
||||
import com.droiddeck.launcher.frontend.AddedGames
|
||||
import com.droiddeck.launcher.frontend.GameExePicker
|
||||
import com.droiddeck.launcher.stores.StoreInstallRoot
|
||||
import org.json.JSONArray
|
||||
import java.io.File
|
||||
@@ -61,10 +62,10 @@ object RecompInstaller {
|
||||
// The catalog pins a release so installs download straight from the release, which GitHub does not
|
||||
// rate-limit; the releases API, limited to 60 unauthenticated calls an hour per address, only finds newer ones.
|
||||
fun pinned(entry: RecompCatalog.Entry, build: RecompCatalog.Build): Release? {
|
||||
val tag = entry.tag ?: return null
|
||||
val tag = entry.tagFor(build.platform) ?: return null
|
||||
val file = build.file ?: return null
|
||||
return Release(tag, entry.published, file,
|
||||
"https://github.com/${entry.repo}/releases/download/${android.net.Uri.encode(tag)}/${android.net.Uri.encode(file)}", build.sha256)
|
||||
val url = build.url ?: "https://github.com/${entry.repo}/releases/download/${android.net.Uri.encode(tag)}/${android.net.Uri.encode(file)}"
|
||||
return Release(tag, entry.publishedFor(build.platform), file, url, build.sha256)
|
||||
}
|
||||
|
||||
fun latest(entry: RecompCatalog.Entry, build: RecompCatalog.Build): Release? {
|
||||
@@ -87,7 +88,7 @@ object RecompInstaller {
|
||||
}
|
||||
|
||||
fun isNewer(release: Release, installed: Installed): Boolean =
|
||||
release.tag != installed.tag && isAfter(release, installed)
|
||||
installed.tag != null && release.tag != installed.tag && isAfter(release, installed)
|
||||
|
||||
private fun isAfter(release: Release, installed: Installed): Boolean =
|
||||
if (!installed.published.isNullOrEmpty() && release.published.isNotEmpty()) release.published > installed.published
|
||||
@@ -96,7 +97,8 @@ object RecompInstaller {
|
||||
fun install(
|
||||
context: Context, entry: RecompCatalog.Entry, build: RecompCatalog.Build, wanted: Release?, onProgress: (String, Int) -> Unit,
|
||||
): String? {
|
||||
if (!LinuxRuntime.isInstalled(context)) return context.getString(R.string.user_apps_runtime_required)
|
||||
val android = build.platform == RecompCatalog.Platform.ANDROID
|
||||
if (!android && !LinuxRuntime.isInstalled(context)) return context.getString(R.string.user_apps_runtime_required)
|
||||
val release = wanted ?: pinned(entry, build) ?: run {
|
||||
onProgress(context.getString(R.string.user_apps_github_checking, entry.repo), -1)
|
||||
val body = Downloader.downloadString("https://api.github.com/repos/${entry.repo}/releases?per_page=15")
|
||||
@@ -111,6 +113,7 @@ object RecompInstaller {
|
||||
val ok = Downloader.downloadFile(release.url, download, true, release.sha256) { f -> onProgress(label, if (f < 0) -1 else Math.round(f * 100f)) }
|
||||
if (!ok) return context.getString(R.string.user_apps_download_failed)
|
||||
val meta = mapOf(META_ID to entry.id, META_TAG to release.tag, META_PUBLISHED to release.published, META_PLATFORM to build.platform.key)
|
||||
if (android) return RecompAndroid.install(context, entry, build, release, download)
|
||||
val previous = installed(context)[entry.id]
|
||||
val problem = if (build.platform == RecompCatalog.Platform.WINDOWS_X64) {
|
||||
installWindows(context, entry, build, download, meta, previous, onProgress)
|
||||
@@ -121,7 +124,8 @@ object RecompInstaller {
|
||||
stage.mkdirs()
|
||||
onProgress(context.getString(R.string.recomps_unpacking, release.asset), -1)
|
||||
unpack(context, download, stage)
|
||||
val found = findEntry(stage, build.entry) ?: return context.getString(R.string.recomps_entry_missing, build.entry)
|
||||
val found = (if (build.entry.isEmpty()) guessEntry(stage, entry) else findEntry(stage, build.entry))
|
||||
?: return context.getString(R.string.recomps_entry_missing, build.entry.ifEmpty { entry.name })
|
||||
if (found.name.endsWith(".appimage", ignoreCase = true)) {
|
||||
AppImageManager.import(context, found, entry.name, null, meta) { onProgress(it, -1) }
|
||||
} else {
|
||||
@@ -161,7 +165,8 @@ object RecompInstaller {
|
||||
onProgress(context.getString(R.string.recomps_unpacking, download.name), -1)
|
||||
if (download.name.endsWith(".exe", ignoreCase = true)) download.copyTo(File(target, download.name), true)
|
||||
else unpack(context, download, target)
|
||||
val exe = findEntry(target, build.entry.ifEmpty { download.name }) ?: return context.getString(R.string.recomps_entry_missing, build.entry)
|
||||
val exe = (if (build.entry.isNotEmpty()) findEntry(target, build.entry) else GameExePicker.rank(target).exes.firstOrNull())
|
||||
?: return context.getString(R.string.recomps_entry_missing, build.entry.ifEmpty { entry.name })
|
||||
meta.forEach { (k, v) -> FileUtils.writeString(File(target, k), v) }
|
||||
return when (AddedGames.addExe(context, exe)) {
|
||||
is AddedGames.AddResult.Added, is AddedGames.AddResult.Existing, is AddedGames.AddResult.Switched -> null
|
||||
@@ -186,6 +191,40 @@ object RecompInstaller {
|
||||
}
|
||||
}
|
||||
|
||||
// Catalogs that do not name the program: an AppImage if there is one, else the executable ELF (not a
|
||||
// shared library) whose name is closest to the project's, nearest the top, then the largest.
|
||||
internal fun guessEntry(root: File, entry: RecompCatalog.Entry): File? {
|
||||
val files = root.walkTopDown().maxDepth(4).filter { it.isFile && !java.nio.file.Files.isSymbolicLink(it.toPath()) }.toList()
|
||||
files.filter { it.name.endsWith(".appimage", ignoreCase = true) }.minByOrNull { it.path.length }?.let { return it }
|
||||
val words = listOf(entry.id, entry.name, entry.repo.substringAfter('/')).map { key(it) }.filter { it.isNotEmpty() }
|
||||
return files.filter { !Regex("\\.so(\\.|$)").containsMatchIn(it.name) && isElf(it) && elfType(it) != SHARED_OBJECT_ONLY }
|
||||
.sortedWith(compareByDescending<File> { f -> val n = key(f.name); words.count { w -> n.isNotEmpty() && (w.contains(n) || n.contains(w)) } }
|
||||
.thenBy { it.relativeTo(root).path.count { c -> c == '/' } }
|
||||
.thenByDescending { it.length() })
|
||||
.firstOrNull()
|
||||
}
|
||||
|
||||
private const val SHARED_OBJECT_ONLY = -1
|
||||
|
||||
private fun key(s: String) = s.lowercase().filter { it.isLetterOrDigit() }
|
||||
|
||||
// ET_DYN libraries without a program interpreter are shared objects, not programs.
|
||||
private fun elfType(f: File): Int = runCatching {
|
||||
RandomAccessFile(f, "r").use { raf ->
|
||||
val head = ByteArray(64)
|
||||
if (raf.read(head) < 64) return@use 0
|
||||
val little = head[5].toInt() == 1
|
||||
fun u16(o: Int) = if (little) (head[o].toInt() and 0xff) or ((head[o + 1].toInt() and 0xff) shl 8) else ((head[o].toInt() and 0xff) shl 8) or (head[o + 1].toInt() and 0xff)
|
||||
val type = u16(16)
|
||||
if (type != 3) return@use type
|
||||
val bytes = raf.length().coerceAtMost(1L shl 16).toInt()
|
||||
raf.seek(0)
|
||||
val buf = ByteArray(bytes)
|
||||
raf.readFully(buf)
|
||||
if (String(buf, Charsets.ISO_8859_1).contains("/ld-linux")) type else SHARED_OBJECT_ONLY
|
||||
}
|
||||
}.getOrDefault(0)
|
||||
|
||||
internal fun findEntry(root: File, name: String): File? {
|
||||
if (name.isEmpty()) return null
|
||||
var level = listOf(root)
|
||||
|
||||
@@ -7,6 +7,7 @@ import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.runtime.RecompAndroid
|
||||
import com.droiddeck.launcher.runtime.RecompCatalog
|
||||
import com.droiddeck.launcher.runtime.RecompData
|
||||
import com.droiddeck.launcher.runtime.RecompInstaller
|
||||
@@ -26,6 +27,7 @@ object RecompsState {
|
||||
private set
|
||||
private var seq = 0
|
||||
private var checked = false
|
||||
private var lastSteam: List<Int> = emptyList()
|
||||
internal var fixed = false
|
||||
private set
|
||||
|
||||
@@ -40,11 +42,14 @@ object RecompsState {
|
||||
fun refresh(context: Context, steamOwned: Collection<Int>, reloadCatalog: Boolean = false) {
|
||||
if (fixed) return
|
||||
val app = context.applicationContext
|
||||
lastSteam = steamOwned.toList()
|
||||
RecompAndroid.onChanged = { main.post { refresh(app, lastSteam) } }
|
||||
val n = ++seq
|
||||
loading = entries.isEmpty()
|
||||
Thread({
|
||||
val list = runCatching { RecompCatalog.load(app, reloadCatalog) }.getOrDefault(emptyList())
|
||||
val have = runCatching { RecompInstaller.installed(app) }.getOrDefault(emptyMap())
|
||||
val have = runCatching { RecompAndroid.installed(app, list) }.getOrDefault(emptyMap()) +
|
||||
runCatching { RecompInstaller.installed(app) }.getOrDefault(emptyMap())
|
||||
val inputs = runCatching { RecompData.inputs(app, steamOwned) }.getOrNull()
|
||||
val states = list.associate { e -> e.id to (inputs?.let { RecompData.resolve(e, it) } ?: RecompData.State.Missing(e.data.stores)) }
|
||||
have.forEach { (id, i) -> RecompInstaller.link(i, (states[id] as? RecompData.State.Found)?.guest) }
|
||||
@@ -68,7 +73,8 @@ object RecompsState {
|
||||
|
||||
fun install(context: Context, entry: RecompCatalog.Entry, steamOwned: Collection<Int>, release: RecompInstaller.Release? = null) {
|
||||
val build = installed[entry.id]?.platform?.let { RecompCatalog.Platform.of(it) }?.let { entry.build(it) } ?: entry.preferred() ?: return
|
||||
UserAppsState.run(context, entry.name, R.string.recomps_installed, after = {
|
||||
val done = if (build.platform == RecompCatalog.Platform.ANDROID) R.string.recomps_android_started else R.string.recomps_installed
|
||||
UserAppsState.run(context, entry.name, done, after = {
|
||||
updates = updates - entry.id
|
||||
refresh(context, steamOwned)
|
||||
}) { app, progress -> RecompInstaller.install(app, entry, build, release, progress) }
|
||||
|
||||
@@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
||||
import androidx.compose.foundation.layout.FlowRow
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
@@ -41,6 +42,7 @@ import androidx.compose.ui.unit.sp
|
||||
import coil.compose.AsyncImage
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.frontend.Library
|
||||
import com.droiddeck.launcher.runtime.RecompAndroid
|
||||
import com.droiddeck.launcher.runtime.RecompCatalog
|
||||
import com.droiddeck.launcher.runtime.RecompData
|
||||
import com.droiddeck.launcher.runtime.RecompInstaller
|
||||
@@ -67,15 +69,20 @@ internal fun RecompRow.matches(filter: RecompFilter): Boolean = when (filter) {
|
||||
RecompFilter.INSTALLED -> installed != null
|
||||
}
|
||||
|
||||
// Installed first, then the ones whose game you already own, then the rest, each alphabetical.
|
||||
// Installed first, then the ones whose game you already own, then the rest, each by popularity.
|
||||
internal fun RecompRow.rank(): Int = when {
|
||||
installed != null -> 0
|
||||
data is RecompData.State.Found -> 1
|
||||
data is RecompData.State.Owned || data is RecompData.State.Incomplete -> 2
|
||||
data is RecompData.State.BringYourOwn -> 3
|
||||
else -> 4
|
||||
else -> 3
|
||||
}
|
||||
|
||||
internal fun RecompRow.matches(query: String): Boolean = query.isBlank() || query.trim().split(Regex("\\s+")).all { word ->
|
||||
listOf(entry.name, entry.game, entry.origin, entry.repo).any { it.contains(word, ignoreCase = true) }
|
||||
}
|
||||
|
||||
private const val SHOWN_LIMIT = 300
|
||||
|
||||
@Composable
|
||||
internal fun RecompsPage(s: FrontEndState, a: FrontEndActions, onSelect: (String) -> Unit, modifier: Modifier) {
|
||||
val ctx = LocalContext.current
|
||||
@@ -84,37 +91,68 @@ internal fun RecompsPage(s: FrontEndState, a: FrontEndActions, onSelect: (String
|
||||
RecompsState.refresh(ctx, steamOwned)
|
||||
UserAppsState.refresh(ctx)
|
||||
}
|
||||
var filter by rememberSaveable { mutableStateOf(RecompFilter.ALL) }
|
||||
val rows = recompRows().sortedWith(compareBy<RecompRow> { it.rank() }.thenBy { it.entry.name.lowercase() })
|
||||
Column(modifier.verticalScroll(rememberScrollState()).padding(bottom = 24.dp)) {
|
||||
PageHeader(stringResource(R.string.rail_recomps))
|
||||
Lede(stringResource(R.string.recomps_lede))
|
||||
Row(Modifier.fillMaxWidth().horizontalScroll(rememberScrollState()).padding(bottom = 12.dp), horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
RecompFilter.entries.forEach { f ->
|
||||
val count = rows.count { it.matches(f) }
|
||||
TabChip("${filterLabel(f)} · $count", filter == f, Modifier.testTag("recomps-filter-${f.name.lowercase()}")) { filter = f }
|
||||
}
|
||||
val lifecycle = androidx.compose.ui.platform.LocalLifecycleOwner.current.lifecycle
|
||||
androidx.compose.runtime.DisposableEffect(lifecycle) {
|
||||
val observer = androidx.lifecycle.LifecycleEventObserver { _, event ->
|
||||
if (event == androidx.lifecycle.Lifecycle.Event.ON_RESUME) RecompsState.refresh(ctx, steamOwned)
|
||||
}
|
||||
UserAppsState.lastError?.let { Note(it) }
|
||||
val shown = rows.filter { it.matches(filter) }
|
||||
when {
|
||||
RecompsState.loading -> Text("…", color = MaterialTheme.colorScheme.onSurfaceVariant)
|
||||
rows.isEmpty() -> Note(stringResource(R.string.recomps_empty))
|
||||
shown.isEmpty() -> Note(stringResource(R.string.recomps_none_here))
|
||||
else -> BoxWithConstraints(Modifier.fillMaxWidth()) {
|
||||
val columns = if (maxWidth >= 820.dp) 2 else 1
|
||||
val gap = 12.dp
|
||||
Column(verticalArrangement = Arrangement.spacedBy(gap)) {
|
||||
shown.chunked(columns).forEachIndexed { r, line ->
|
||||
Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(gap)) {
|
||||
line.forEachIndexed { c, row ->
|
||||
RecompCard(row, s, a, onSelect, first = r == 0 && c == 0, steamOwned = steamOwned, modifier = Modifier.weight(1f))
|
||||
}
|
||||
repeat(columns - line.size) { Spacer(Modifier.weight(1f)) }
|
||||
lifecycle.addObserver(observer)
|
||||
onDispose { lifecycle.removeObserver(observer) }
|
||||
}
|
||||
var filter by rememberSaveable { mutableStateOf(RecompFilter.ALL) }
|
||||
var query by rememberSaveable { mutableStateOf("") }
|
||||
val rows = androidx.compose.runtime.remember(RecompsState.entries, RecompsState.data, RecompsState.installed, RecompsState.updates) {
|
||||
recompRows().sortedWith(compareBy<RecompRow> { it.rank() }.thenByDescending { it.entry.popularity }.thenBy { it.entry.name.lowercase() })
|
||||
}
|
||||
val searched = rows.filter { it.matches(query) }
|
||||
val shown = searched.filter { it.matches(filter) }
|
||||
BoxWithConstraints(modifier) {
|
||||
val columns = if (maxWidth >= 820.dp) 2 else 1
|
||||
val full: androidx.compose.foundation.lazy.grid.LazyGridItemSpanScope.() -> androidx.compose.foundation.lazy.grid.GridItemSpan =
|
||||
{ androidx.compose.foundation.lazy.grid.GridItemSpan(maxLineSpan) }
|
||||
androidx.compose.foundation.lazy.grid.LazyVerticalGrid(
|
||||
columns = androidx.compose.foundation.lazy.grid.GridCells.Fixed(columns),
|
||||
horizontalArrangement = Arrangement.spacedBy(12.dp), verticalArrangement = Arrangement.spacedBy(12.dp),
|
||||
contentPadding = androidx.compose.foundation.layout.PaddingValues(bottom = 24.dp),
|
||||
modifier = Modifier.fillMaxSize().testTag("recomps-list"),
|
||||
) {
|
||||
item(key = "header", span = full) {
|
||||
Column {
|
||||
PageHeader(stringResource(R.string.rail_recomps))
|
||||
Lede(stringResource(R.string.recomps_lede))
|
||||
AdbTextField(
|
||||
value = query, onValueChange = { query = it }, label = "", keyboardType = androidx.compose.ui.text.input.KeyboardType.Text,
|
||||
imeAction = androidx.compose.ui.text.input.ImeAction.Search, placeholder = stringResource(R.string.recomps_search),
|
||||
compact = true, showLabel = false, modifier = Modifier.fillMaxWidth().padding(bottom = 10.dp).testTag("recomps-search"),
|
||||
)
|
||||
Row(Modifier.fillMaxWidth().horizontalScroll(rememberScrollState()), horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
RecompFilter.entries.forEach { f ->
|
||||
val count = searched.count { it.matches(f) }
|
||||
TabChip("${filterLabel(f)} · $count", filter == f, Modifier.testTag("recomps-filter-${f.name.lowercase()}")) { filter = f }
|
||||
}
|
||||
}
|
||||
UserAppsState.lastError?.let { Box(Modifier.padding(top = 10.dp)) { Note(it) } }
|
||||
}
|
||||
}
|
||||
when {
|
||||
RecompsState.loading -> item(key = "loading", span = full) { Text("…", color = MaterialTheme.colorScheme.onSurfaceVariant) }
|
||||
rows.isEmpty() -> item(key = "empty", span = full) { Note(stringResource(R.string.recomps_empty)) }
|
||||
shown.isEmpty() -> item(key = "none", span = full) { Note(stringResource(R.string.recomps_none_here)) }
|
||||
else -> {
|
||||
val visible = shown.take(SHOWN_LIMIT)
|
||||
items(visible.size, key = { visible[it].entry.id }) { i ->
|
||||
RecompCard(visible[i], s, a, onSelect, first = i == 0, steamOwned = steamOwned, modifier = Modifier.fillMaxWidth())
|
||||
}
|
||||
if (shown.size > visible.size) item(key = "more", span = full) {
|
||||
Text(stringResource(R.string.recomps_more_results, visible.size, shown.size), fontSize = 12.sp,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant)
|
||||
}
|
||||
}
|
||||
}
|
||||
item(key = "credits", span = full) {
|
||||
Text(stringResource(R.string.recomps_credits), fontSize = 11.sp, color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
modifier = Modifier.padding(top = 8.dp).testTag("recomps-credits"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,11 +170,18 @@ private fun buildLabel(platform: RecompCatalog.Platform?) = stringResource(when
|
||||
RecompCatalog.Platform.LINUX_ARM64 -> R.string.recomps_build_linux_arm64
|
||||
RecompCatalog.Platform.LINUX_X64 -> R.string.recomps_build_linux_x64
|
||||
RecompCatalog.Platform.WINDOWS_X64 -> R.string.recomps_build_windows_x64
|
||||
RecompCatalog.Platform.ANDROID -> R.string.recomps_build_android
|
||||
else -> R.string.recomps_build_none
|
||||
})
|
||||
|
||||
private fun storeName(store: Store) = store.shortLabel
|
||||
|
||||
private fun sourceName(source: String): String? = when (source) {
|
||||
RecompCatalog.SOURCE_RECOMP_LAUNCHER -> "Recomp Launcher"
|
||||
RecompCatalog.SOURCE_RECOMPA -> "Recompa"
|
||||
else -> null
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun dataLine(data: RecompData.State): Pair<String, Boolean>? = when (data) {
|
||||
RecompData.State.NotNeeded -> null
|
||||
@@ -144,7 +189,7 @@ private fun dataLine(data: RecompData.State): Pair<String, Boolean>? = when (dat
|
||||
is RecompData.State.Owned -> stringResource(R.string.recomps_data_owned, storeName(data.store)) to false
|
||||
is RecompData.State.Incomplete -> stringResource(R.string.recomps_data_incomplete, storeName(data.store)) to false
|
||||
is RecompData.State.Missing -> stringResource(R.string.recomps_data_missing, data.refs.map { storeName(it.store) }.distinct().joinToString(" / ")) to false
|
||||
is RecompData.State.BringYourOwn -> stringResource(R.string.recomps_data_bring, data.data.label) to false
|
||||
is RecompData.State.BringYourOwn -> stringResource(R.string.recomps_data_bring, data.data.label.removePrefix("Your ").removePrefix("your ")) to false
|
||||
}
|
||||
|
||||
internal fun storeUrl(ref: RecompCatalog.StoreRef, game: String): String = when (ref.store) {
|
||||
@@ -185,7 +230,9 @@ private fun RecompCard(
|
||||
FlowRow(horizontalArrangement = Arrangement.spacedBy(6.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) {
|
||||
Chip(buildLabel(build), ok = row.installed != null)
|
||||
dataLine(row.data)?.let { (t, ok) -> Chip(t, ok) }
|
||||
if (e.android != null) Chip(stringResource(R.string.recomps_android_too), ok = false)
|
||||
if (e.android != null && build != RecompCatalog.Platform.ANDROID) Chip(stringResource(R.string.recomps_android_too), ok = false)
|
||||
if (e.setup != null) Chip(stringResource(R.string.recomps_setup), ok = false)
|
||||
e.sources.mapNotNull { sourceName(it) }.forEach { Chip(stringResource(R.string.recomps_via, it), ok = false) }
|
||||
}
|
||||
val found = row.data as? RecompData.State.Found
|
||||
if (found != null) Text(stringResource(R.string.recomps_data_folder, found.guest), fontSize = 11.sp, color = colors.onSurfaceVariant,
|
||||
@@ -193,6 +240,7 @@ private fun RecompCard(
|
||||
if (row.data is RecompData.State.BringYourOwn && row.data.data.note.isNotEmpty()) {
|
||||
Text(row.data.data.note, fontSize = 11.sp, color = colors.onSurfaceVariant, maxLines = 2, overflow = TextOverflow.Ellipsis)
|
||||
}
|
||||
if (e.setup != null) Text(e.setup, fontSize = 11.sp, color = colors.onSurfaceVariant, maxLines = 3, overflow = TextOverflow.Ellipsis)
|
||||
if (mine && UserAppsState.stage != null) Text(UserAppsState.stage.orEmpty(), fontSize = 11.sp, color = pal.signal, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
val focus = if (first) Modifier.paneEntry() else Modifier.paneItem("recomp:${e.id}")
|
||||
FlowRow(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
@@ -203,6 +251,8 @@ private fun RecompCard(
|
||||
compact = true, progress = progress, modifier = focus.testTag("recomp-install-${e.id}")) {
|
||||
RecompsState.install(ctx, e, steamOwned)
|
||||
}
|
||||
inst.appKey.startsWith("android:") -> PrimaryButton(stringResource(R.string.recomps_play), main = true, compact = true,
|
||||
modifier = focus.testTag("recomp-play-${e.id}")) { RecompAndroid.launch(ctx, inst.appKey.removePrefix("android:")) }
|
||||
inst.appKey.startsWith("added:") -> PrimaryButton(stringResource(R.string.recomps_open_games), main = true, compact = true, modifier = focus) {
|
||||
onSelect("games")
|
||||
}
|
||||
@@ -224,7 +274,9 @@ private fun RecompCard(
|
||||
else -> {}
|
||||
}
|
||||
if (inst != null) SecondaryButton(stringResource(R.string.recomps_remove), enabled = busy == null, compact = true) {
|
||||
if (inst.appKey.startsWith("added:")) {
|
||||
if (inst.appKey.startsWith("android:")) {
|
||||
RecompAndroid.uninstall(ctx, inst.appKey.removePrefix("android:"))
|
||||
} else if (inst.appKey.startsWith("added:")) {
|
||||
UserAppsState.run(ctx, e.name, R.string.recomps_removed, after = { RecompsState.refresh(ctx, steamOwned) }) { app, _ ->
|
||||
RecompInstaller.remove(app, inst); null
|
||||
}
|
||||
|
||||
@@ -4439,6 +4439,15 @@
|
||||
<string name="recomps_unpacking">Unpacking %1$s</string>
|
||||
<string name="recomps_unpack_failed">Unpacking failed (exit %1$d)</string>
|
||||
<string name="recomps_entry_missing">The download has no %1$s</string>
|
||||
<string name="recomps_android_started">%1$s downloaded. Confirm the install.</string>
|
||||
<string name="recomps_apk_mismatch">The APK isn\'t the app the catalog lists, so it wasn\'t installed</string>
|
||||
<string name="recomps_allow_installs">Allow DroidDeck to install apps, then press Install again</string>
|
||||
<string name="recomps_build_android">Android app</string>
|
||||
<string name="recomps_search">Search recomps</string>
|
||||
<string name="recomps_setup">Needs setup first</string>
|
||||
<string name="recomps_via">via %1$s</string>
|
||||
<string name="recomps_credits">The list combines DroidDeck\'s own entries with the Recomp Launcher catalog (recomplauncher.com, by elripalda and contributors) and the Recompa catalog (recompa.app, by kalasyan). Each game\'s build comes from its own developers.</string>
|
||||
<string name="recomps_more_results">Showing %1$d of %2$d. Search to narrow the list.</string>
|
||||
<string name="recomps_add_failed">The Windows build couldn\'t be added to your games</string>
|
||||
<string name="decky_tab_installed">Installed · %1$d</string>
|
||||
<string name="decky_tab_store">Store</string>
|
||||
|
||||
@@ -21,25 +21,64 @@ class RecompsTest {
|
||||
private val bundled by lazy { RecompCatalog.parse(File("src/main/assets/${RecompCatalog.BUNDLED}").readText())!! }
|
||||
|
||||
@Test fun theBundledCatalogParsesAndEveryEntryHasARunnableBuild() {
|
||||
assertTrue(bundled.size >= 8)
|
||||
assertTrue(bundled.size >= 1000)
|
||||
assertEquals(bundled.size, bundled.map { it.id }.distinct().size)
|
||||
for (e in bundled) {
|
||||
assertNotNull(e.id, e.preferred())
|
||||
for (b in e.builds.filter { it.platform != RecompCatalog.Platform.ANDROID && it.platform != RecompCatalog.Platform.WINDOWS_X64 }) {
|
||||
assertTrue("${e.id} ${b.platform} needs an entry or an AppImage", b.entry.isNotEmpty() || b.asset.pattern.contains("AppImage", ignoreCase = true))
|
||||
}
|
||||
assertTrue(e.id, e.sources.isNotEmpty())
|
||||
e.android?.let { assertNotNull(e.id, it.pkg); assertNotNull(e.id, it.url) }
|
||||
if (e.data.kind == RecompCatalog.DataKind.STORE) {
|
||||
assertTrue(e.id, e.data.stores.isNotEmpty())
|
||||
assertNotNull(e.id, e.data.probe)
|
||||
}
|
||||
}
|
||||
val zelda = bundled.first { it.id == "zelda64recomp" }
|
||||
assertTrue(RecompCatalog.SOURCE_DROIDDECK in zelda.sources && RecompCatalog.SOURCE_RECOMP_LAUNCHER in zelda.sources)
|
||||
assertTrue(bundled.any { RecompCatalog.SOURCE_RECOMPA in it.sources && it.android != null })
|
||||
}
|
||||
|
||||
@Test fun anAndroidBuildUsesItsOwnReleaseAndUrl() {
|
||||
val e = RecompCatalog.parse("""{"schema":1,"recomps":[{"id":"a","name":"A","repo":"o/r","release":{"tag":"v9"},
|
||||
"android_release":{"tag":"apk-3","published":"p3"},"sources":["recompa"],"popularity":5,
|
||||
"builds":{"linux-x64":{"asset":"x","file":"x.zip"},"android":{"asset":"a","file":"a.apk","url":"https://h/a.apk",
|
||||
"sha256":"${"c".repeat(64)}","package":"com.example.game","signer":"${"d".repeat(64)}"}}}]}""")!!.single()
|
||||
assertEquals(RecompCatalog.Platform.ANDROID, e.preferred()?.platform)
|
||||
val apk = RecompInstaller.pinned(e, e.android!!)!!
|
||||
assertEquals("apk-3", apk.tag)
|
||||
assertEquals("https://h/a.apk", apk.url)
|
||||
assertEquals("com.example.game", e.android!!.pkg)
|
||||
assertEquals("v9", RecompInstaller.pinned(e, e.build(RecompCatalog.Platform.LINUX_X64)!!)!!.tag)
|
||||
assertEquals(listOf(RecompCatalog.SOURCE_RECOMPA), e.sources)
|
||||
assertNull(RecompCatalog.parse("""{"schema":1,"recomps":[{"id":"b","name":"B","repo":"o/r","builds":{"android":{"asset":"a","package":"not a package"}}}]}""")!!
|
||||
.single().android!!.pkg)
|
||||
}
|
||||
|
||||
@Test fun anUnnamedProgramIsGuessedFromTheArchive() {
|
||||
val root = temporary.newFolder("guess")
|
||||
fun elf(path: String, size: Int, program: Boolean) = File(root, path).apply {
|
||||
parentFile.mkdirs()
|
||||
val bytes = ByteArray(size)
|
||||
byteArrayOf(0x7f, 'E'.code.toByte(), 'L'.code.toByte(), 'F'.code.toByte(), 2, 1).copyInto(bytes)
|
||||
bytes[16] = 3
|
||||
if (program) "/lib/ld-linux-x86-64.so.2".toByteArray().copyInto(bytes, 64)
|
||||
writeBytes(bytes)
|
||||
}
|
||||
val e = RecompCatalog.parse("""{"schema":1,"recomps":[{"id":"sonic-recomp","name":"Sonic Recompiled","repo":"o/SonicRecomp","builds":{"linux-x64":{"asset":"x"}}}]}""")!!.single()
|
||||
elf("Game/libSDL2.so", 4000, program = false)
|
||||
elf("Game/lib/helper", 9000, program = false)
|
||||
elf("Game/crashpad", 5000, program = true)
|
||||
val main = elf("Game/SonicRecompiled", 3000, program = true)
|
||||
assertEquals(main, RecompInstaller.guessEntry(root, e))
|
||||
val image = File(root, "Game/Sonic.AppImage").apply { writeText("x") }
|
||||
assertEquals(image, RecompInstaller.guessEntry(root, e))
|
||||
}
|
||||
|
||||
@Test fun nativeArmIsPreferredOverFexAndFexOverProton() {
|
||||
val zelda = bundled.first { it.id == "zelda64recomp" }
|
||||
assertEquals(RecompCatalog.Platform.LINUX_ARM64, zelda.preferred()?.platform)
|
||||
assertEquals(RecompCatalog.Platform.LINUX_X64, bundled.first { it.id == "ironwail" }.preferred()?.platform)
|
||||
assertEquals(RecompCatalog.Platform.WINDOWS_X64, bundled.first { it.id == "unleashedrecomp" }.preferred()?.platform)
|
||||
assertEquals(RecompCatalog.Platform.ANDROID, bundled.first { it.id == "unleashedrecomp" }.preferred()?.platform)
|
||||
assertTrue(bundled.any { it.preferred()?.platform == RecompCatalog.Platform.WINDOWS_X64 })
|
||||
}
|
||||
|
||||
@Test fun aNewerSchemaAndBadEntriesAreRefused() {
|
||||
|
||||
+56
-17
@@ -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.
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Build DroidDeck's recomp catalog from its curated list, Recomp Launcher's and Recompa's.
|
||||
|
||||
Sources, merged in this order (an earlier source wins a field; later ones add builds and credits):
|
||||
tools/recomps/curated.json DroidDeck's own entries: store ids, data probes, launch args
|
||||
https://recomplauncher.com/pc-catalog.json Recomp Launcher (github.com/elripalda/RecompLauncher):
|
||||
Windows and Linux builds of PC recomps and ports
|
||||
https://recompa.app/index.json Recompa (github.com/kalasyan/recompa): Android APKs
|
||||
|
||||
Entries are matched by GitHub repo, then by id. Only builds DroidDeck can run are kept (Linux x86-64 or
|
||||
arm64, Windows x86-64, Android arm64), and an entry with none is dropped. Every entry lists the catalogs it
|
||||
came from in "sources", which the Recomps tab shows. Pins use each catalog's tag and sha256; a Linux or Windows
|
||||
asset that only has a glob is resolved through the releases API when GITHUB_TOKEN or a signed-in `gh` is
|
||||
available, and otherwise keeps a pattern the app resolves at install time.
|
||||
"""
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import urllib.request
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
CURATED = os.path.join(HERE, "curated.json")
|
||||
OUTPUT = os.path.join(HERE, "..", "..", "app", "src", "main", "assets", "recomps", "catalog.json")
|
||||
RL_URL = "https://recomplauncher.com/pc-catalog.json"
|
||||
RECOMPA_URL = "https://recompa.app/index.json"
|
||||
ORIGINS = {
|
||||
"pc": "PC", "n64": "N64", "x360": "Xbox 360", "xbox360": "Xbox 360", "xbox": "Xbox", "ps1": "PS1", "ps2": "PS2",
|
||||
"ps3": "PS3", "ps4": "PS4", "switch": "Switch", "snes": "SNES", "nes": "NES", "gc": "GameCube", "wii": "Wii",
|
||||
"gba": "GBA", "nds": "DS", "ds": "DS", "3ds": "3DS", "arcade": "Arcade", "dreamcast": "Dreamcast", "saturn": "Saturn",
|
||||
"genesis": "Genesis", "megadrive": "Mega Drive", "psp": "PSP", "vita": "Vita", "gb": "Game Boy", "gbc": "Game Boy Color",
|
||||
}
|
||||
ARCHIVE = re.compile(r"\.(zip|7z|tar|tgz|tar\.(gz|xz|bz2|zst)|appimage)$", re.I)
|
||||
ID = re.compile(r"[^a-z0-9-]+")
|
||||
HUBS = {"io.github.kalasyan.recompa"}
|
||||
|
||||
|
||||
def fetch(url, local=None):
|
||||
if local:
|
||||
with open(local, encoding="utf-8") as f:
|
||||
return json.load(f)
|
||||
req = urllib.request.Request(url, headers={"User-Agent": "DroidDeck-catalog-builder"})
|
||||
with urllib.request.urlopen(req, timeout=120) as r:
|
||||
return json.load(r)
|
||||
|
||||
|
||||
_releases = {}
|
||||
|
||||
|
||||
def releases(repo):
|
||||
if repo in _releases:
|
||||
return _releases[repo]
|
||||
token = os.environ.get("GITHUB_TOKEN")
|
||||
path = f"repos/{repo}/releases?per_page=15"
|
||||
data = None
|
||||
if token:
|
||||
req = urllib.request.Request("https://api.github.com/" + path, headers={"Authorization": f"Bearer {token}"})
|
||||
try:
|
||||
with urllib.request.urlopen(req, timeout=30) as r:
|
||||
data = json.load(r)
|
||||
except Exception:
|
||||
data = None
|
||||
elif subprocess.run(["gh", "auth", "status"], capture_output=True).returncode == 0:
|
||||
out = subprocess.run(["gh", "api", path], capture_output=True, text=True)
|
||||
data = json.loads(out.stdout) if out.returncode == 0 else None
|
||||
_releases[repo] = data
|
||||
return data
|
||||
|
||||
|
||||
def glob_regex(glob):
|
||||
return "^" + "".join(".*" if c == "*" else re.escape(c) for c in glob) + "$"
|
||||
|
||||
|
||||
def slug(s):
|
||||
return ID.sub("-", s.lower()).strip("-")[:48] or "recomp"
|
||||
|
||||
|
||||
def repo_of(url):
|
||||
m = re.match(r"https?://github\.com/([\w.-]+/[\w.-]+?)(?:\.git)?/?$", url or "")
|
||||
return m.group(1) if m else None
|
||||
|
||||
|
||||
def first_line(md):
|
||||
text = re.sub(r"[`*_#>\[\]]", "", md or "").strip()
|
||||
return text.splitlines()[0][:200] if text else ""
|
||||
|
||||
|
||||
def rl_builds(app, resolve):
|
||||
out = {}
|
||||
assets = app.get("assets") or {}
|
||||
files = app.get("files") or {}
|
||||
boot = app.get("boot") or {}
|
||||
tag = app.get("tag")
|
||||
for os_name in ("linux", "windows"):
|
||||
glob = assets.get(os_name)
|
||||
if not glob or "flatpak" in glob.lower() or not ARCHIVE.search(glob) and not glob.lower().endswith(".exe"):
|
||||
continue
|
||||
if os_name == "linux":
|
||||
key = "linux-arm64" if re.search(r"aarch64|arm64", glob, re.I) else "linux-x64"
|
||||
start = boot.get("start_linux") or ""
|
||||
else:
|
||||
if re.search(r"arm64|aarch64|win32|x86(?!_64|-64)", glob, re.I):
|
||||
continue
|
||||
key = "windows-x64"
|
||||
start = boot.get("start") if (boot.get("start") or "").lower().endswith(".exe") else ""
|
||||
build = {"asset": glob_regex(glob)}
|
||||
if start and "/" not in start:
|
||||
build["entry"] = start
|
||||
pinned = files.get(os_name) or {}
|
||||
if pinned.get("name"):
|
||||
build["file"] = pinned["name"]
|
||||
if re.fullmatch(r"[0-9a-f]{64}", pinned.get("sha256") or ""):
|
||||
build["sha256"] = pinned["sha256"]
|
||||
elif "*" not in glob and tag:
|
||||
build["file"] = glob
|
||||
elif resolve and tag:
|
||||
for r in releases(app["repo"]) or []:
|
||||
if r.get("tag_name") != tag:
|
||||
continue
|
||||
a = next((a for a in r.get("assets", []) if re.search(build["asset"], a["name"], re.I)), None)
|
||||
if a:
|
||||
build["file"] = a["name"]
|
||||
d = a.get("digest") or ""
|
||||
if d.startswith("sha256:"):
|
||||
build["sha256"] = d[7:]
|
||||
out[key] = build
|
||||
return out
|
||||
|
||||
|
||||
def from_rl(app, resolve):
|
||||
if app.get("archived") or app.get("soon") or (app.get("host") or "github") != "github" or not app.get("repo"):
|
||||
return None
|
||||
boot = app.get("boot") or {}
|
||||
if boot.get("kind") in ("installer", "not-a-game", "source"):
|
||||
return None
|
||||
builds = rl_builds(app, resolve)
|
||||
if not builds:
|
||||
return None
|
||||
files = boot.get("files") or {}
|
||||
what = files.get("what") or app.get("needs") or ""
|
||||
origin = (app.get("origin") or "").lower()
|
||||
entry = {
|
||||
"id": slug(app["id"]), "name": app.get("name") or app["id"], "game": app.get("game") or app.get("name") or app["id"],
|
||||
"origin": ORIGINS.get(origin, origin.upper()), "type": "recomp" if "recomp" in (app["id"] + app["repo"]).lower() else "port",
|
||||
"repo": app["repo"], "license": app.get("license") or "", "art": app.get("icon") or app.get("cover") or "",
|
||||
"popularity": int(app.get("downloads") or 0),
|
||||
"builds": builds,
|
||||
"data": {"kind": "dump", "label": what, "note": app.get("blurb") or ""} if what else {"kind": "none"},
|
||||
"sources": ["recomp-launcher"],
|
||||
}
|
||||
if app.get("tag"):
|
||||
entry["release"] = {"tag": app["tag"], "published": app.get("released_at") or ""}
|
||||
if app.get("setup_required"):
|
||||
steps = app.get("setup_steps") or []
|
||||
entry["setup"] = " ".join(steps[:2])[:300] if steps else "Needs a setup step on a PC first."
|
||||
return entry
|
||||
|
||||
|
||||
def best_fork(port):
|
||||
forks = [f for f in port.get("forks") or [] if ((f.get("release") or {}).get("asset") or {}).get("sha256")
|
||||
and f.get("signer_sha256") and f.get("package")]
|
||||
return max(forks, key=lambda f: (f.get("downloads") or 0), default=None)
|
||||
|
||||
|
||||
def from_recompa(port):
|
||||
req = port.get("requirements") or {}
|
||||
if req.get("abi") and "arm64-v8a" not in req["abi"]:
|
||||
return None
|
||||
if (req.get("min_sdk") or 0) > 34:
|
||||
return None
|
||||
fork = best_fork(port)
|
||||
if not fork or fork["package"] in HUBS:
|
||||
return None
|
||||
asset = fork["release"]["asset"]
|
||||
android = {
|
||||
"asset": "^" + re.escape(asset["name"]) + "$", "file": asset["name"], "url": asset["url"], "sha256": asset["sha256"],
|
||||
"package": fork["package"], "signer": fork["signer_sha256"],
|
||||
}
|
||||
data = {"kind": "none"}
|
||||
assets = port.get("assets") or []
|
||||
if assets:
|
||||
a = assets[0]
|
||||
data = {"kind": "rom" if port.get("original_platform") not in ("pc", "other") else "dump", "label": a.get("label") or "",
|
||||
"sha1": [x["sha1"].lower() for x in a.get("accepted") or [] if re.fullmatch(r"[0-9a-fA-F]{40}", x.get("sha1") or "")],
|
||||
"note": first_line(a.get("instructions_md"))}
|
||||
origin = (port.get("original_platform") or "").lower()
|
||||
return {
|
||||
"id": slug(port["id"]), "name": fork.get("name") or port.get("name") or port["id"], "game": port.get("game") or port.get("name") or "",
|
||||
"origin": ORIGINS.get(origin, origin.upper() if origin != "other" else ""), "type": port.get("type") or "port",
|
||||
"repo": repo_of(port.get("upstream")) or fork["repo"], "license": "", "art": (port.get("art") or {}).get("cover") or "",
|
||||
"popularity": int(fork.get("downloads") or 0),
|
||||
"release": {"tag": fork["release"].get("tag") or "", "published": fork["release"].get("published_at") or ""},
|
||||
"builds": {"android": android}, "data": data, "sources": ["recompa"],
|
||||
"android_release": {"tag": fork["release"].get("tag") or "", "published": fork["release"].get("published_at") or ""},
|
||||
}
|
||||
|
||||
|
||||
def merge(base, extra):
|
||||
for key, build in extra["builds"].items():
|
||||
if key not in base["builds"] or key == "android" and "package" not in base["builds"][key]:
|
||||
base["builds"][key] = build
|
||||
if key == "android":
|
||||
base["android_release"] = extra.get("android_release") or extra.get("release")
|
||||
for source in extra["sources"]:
|
||||
if source not in base.setdefault("sources", ["droiddeck"]):
|
||||
base["sources"].append(source)
|
||||
if (base.get("data") or {}).get("kind", "none") == "none" and extra["data"].get("kind") != "none":
|
||||
base["data"] = extra["data"]
|
||||
if "release" not in base and extra.get("release") and "android" not in extra["builds"]:
|
||||
base["release"] = extra["release"]
|
||||
for field in ("art", "license", "origin"):
|
||||
if not base.get(field) and extra.get(field):
|
||||
base[field] = extra[field]
|
||||
base["popularity"] = max(base.get("popularity", 0), extra.get("popularity", 0))
|
||||
if extra.get("setup") and not base.get("setup") and "droiddeck" not in base["sources"]:
|
||||
base["setup"] = extra["setup"]
|
||||
|
||||
|
||||
def build(curated, rl, recompa, resolve):
|
||||
out, by_repo, by_id = [], {}, {}
|
||||
|
||||
def add(entry):
|
||||
key = entry["repo"].lower()
|
||||
hit = by_repo.get(key) or by_id.get(entry["id"])
|
||||
if hit:
|
||||
merge(hit, entry)
|
||||
return
|
||||
base = entry["id"]
|
||||
n = 2
|
||||
while entry["id"] in by_id:
|
||||
entry["id"] = f"{base[:44]}-{n}"
|
||||
n += 1
|
||||
out.append(entry)
|
||||
by_repo.setdefault(key, entry)
|
||||
by_id[entry["id"]] = entry
|
||||
|
||||
for e in curated["recomps"]:
|
||||
e = json.loads(json.dumps(e))
|
||||
e.setdefault("sources", ["droiddeck"])
|
||||
add(e)
|
||||
for app in rl.get("apps") or []:
|
||||
e = from_rl(app, resolve)
|
||||
if e:
|
||||
add(e)
|
||||
for port in recompa.get("ports") or []:
|
||||
e = from_recompa(port)
|
||||
if e:
|
||||
add(e)
|
||||
for e in out:
|
||||
if "android_release" in e and e.get("release", {}).get("tag") == e["android_release"].get("tag"):
|
||||
del e["android_release"]
|
||||
if "release" not in e and "android_release" in e and set(e["builds"]) == {"android"}:
|
||||
e["release"] = e.pop("android_release")
|
||||
return {
|
||||
"schema": 1,
|
||||
"sources": {
|
||||
"droiddeck": {"name": "DroidDeck", "url": "https://github.com/Droid-Deck/DroidDeck"},
|
||||
"recomp-launcher": {"name": "Recomp Launcher", "url": "https://recomplauncher.com",
|
||||
"updated": rl.get("updated", "")},
|
||||
"recompa": {"name": "Recompa", "url": "https://recompa.app", "updated": recompa.get("generated_at", "")},
|
||||
},
|
||||
"recomps": out,
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||
p.add_argument("--recomp-launcher", help="local copy of pc-catalog.json")
|
||||
p.add_argument("--recompa", help="local copy of index.json")
|
||||
p.add_argument("--no-resolve", action="store_true", help="do not call the releases API for unpinned globs")
|
||||
p.add_argument("-o", "--output", default=OUTPUT)
|
||||
args = p.parse_args()
|
||||
with open(CURATED, encoding="utf-8") as f:
|
||||
curated = json.load(f)
|
||||
catalog = build(curated, fetch(RL_URL, args.recomp_launcher), fetch(RECOMPA_URL, args.recompa), not args.no_resolve)
|
||||
os.makedirs(os.path.dirname(os.path.abspath(args.output)), exist_ok=True)
|
||||
with open(args.output, "w", encoding="utf-8") as f:
|
||||
json.dump(catalog, f, ensure_ascii=False, separators=(",", ":"))
|
||||
f.write("\n")
|
||||
counts = {}
|
||||
for e in catalog["recomps"]:
|
||||
for k in e["builds"]:
|
||||
counts[k] = counts.get(k, 0) + 1
|
||||
print(f"{len(catalog['recomps'])} entries, builds {counts}, {os.path.getsize(args.output) // 1024} KB", file=sys.stderr)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,423 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"recomps": [
|
||||
{
|
||||
"id": "zelda64recomp",
|
||||
"name": "Zelda 64: Recompiled",
|
||||
"game": "The Legend of Zelda: Majora's Mask",
|
||||
"origin": "N64",
|
||||
"type": "recomp",
|
||||
"repo": "Zelda64Recomp/Zelda64Recomp",
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://raw.githubusercontent.com/Zelda64Recomp/Zelda64Recomp/dev/icons/512.png",
|
||||
"builds": {
|
||||
"linux-arm64": {
|
||||
"asset": "^Zelda64Recompiled-.*-Linux-ARM64\\.zip$",
|
||||
"entry": "Zelda64Recompiled",
|
||||
"file": "Zelda64Recompiled-v1.2.2-Linux-ARM64.zip",
|
||||
"sha256": "2e49b96aced578363065e1764ca96eaa5590cb6f7e80efd10e8ce1a08462b933"
|
||||
},
|
||||
"linux-x64": {
|
||||
"asset": "^Zelda64Recompiled-.*-Linux-X64\\.zip$",
|
||||
"entry": "Zelda64Recompiled",
|
||||
"file": "Zelda64Recompiled-v1.2.2-Linux-X64.zip",
|
||||
"sha256": "de8b19cdb4e3ad0c10fd6d8127f7a6cc2a9eba106d89c753439178b718887c42"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^Zelda64Recompiled-.*-Windows\\.zip$",
|
||||
"entry": "Zelda64Recompiled.exe",
|
||||
"file": "Zelda64Recompiled-v1.2.2-Windows.zip",
|
||||
"sha256": "d02b95f1cf5e4d44d6587fa6136c6db521f61aa41ba8700c05f91bea8b0a26d0"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "rom",
|
||||
"label": "Majora's Mask (USA) N64 ROM",
|
||||
"sha1": [
|
||||
"d6133ace5afaa0882cf214cf88daba39e266c078"
|
||||
],
|
||||
"note": "Choose the ROM from the recomp's own start screen."
|
||||
},
|
||||
"release": {
|
||||
"tag": "v1.2.2",
|
||||
"published": "2025-08-27T00:58:35Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "starfox64recomp",
|
||||
"name": "Starfox 64: Recompiled",
|
||||
"game": "Star Fox 64",
|
||||
"origin": "N64",
|
||||
"type": "recomp",
|
||||
"repo": "sonicdcer/Starfox64Recomp",
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://raw.githubusercontent.com/sonicdcer/Starfox64Recomp/main/icons/512.png",
|
||||
"builds": {
|
||||
"linux-arm64": {
|
||||
"asset": "^Starfox64Recompiled-.*-Linux-ARM64-Release\\.zip$",
|
||||
"entry": "Starfox64Recompiled",
|
||||
"file": "Starfox64Recompiled-v1.0.3-Linux-ARM64-Release.zip",
|
||||
"sha256": "85408daa5ceac1fc208a744b0a35fb316c417d62c709761aceb242353fb2a1c0"
|
||||
},
|
||||
"linux-x64": {
|
||||
"asset": "^Starfox64Recompiled-.*-Linux-X64-Release\\.zip$",
|
||||
"entry": "Starfox64Recompiled",
|
||||
"file": "Starfox64Recompiled-v1.0.3-Linux-X64-Release.zip",
|
||||
"sha256": "e74932bd0edb6186a015dabaa87b6b24af3d3b5511ff3b0293a2c3331840cdf0"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^Starfox64Recompiled-.*-Windows-.*\\.zip$",
|
||||
"entry": "Starfox64Recompiled.exe",
|
||||
"file": "Starfox64Recompiled-v1.0.3-Windows-RelWithDebInfo.zip",
|
||||
"sha256": "768c18b0aeb325a0102f722338f09a270a76eeebea29154764147a93d0bde530"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "rom",
|
||||
"label": "Star Fox 64 (USA) N64 ROM",
|
||||
"note": "Choose the ROM from the recomp's own start screen."
|
||||
},
|
||||
"release": {
|
||||
"tag": "1.0.3",
|
||||
"published": "2025-12-30T04:13:00Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "banjorecomp",
|
||||
"name": "Banjo: Recompiled",
|
||||
"game": "Banjo-Kazooie",
|
||||
"origin": "N64",
|
||||
"type": "recomp",
|
||||
"repo": "BanjoRecomp/BanjoRecomp",
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://raw.githubusercontent.com/BanjoRecomp/BanjoRecomp/main/icons/app.png",
|
||||
"builds": {
|
||||
"linux-arm64": {
|
||||
"asset": "^BanjoRecompiled-.*-Linux-ARM64\\.tar\\.gz$",
|
||||
"entry": "BanjoRecompiled",
|
||||
"file": "BanjoRecompiled-v1.0.2-Linux-ARM64.tar.gz",
|
||||
"sha256": "53515be8bc453bc32ed8cbc72e3cd06350ab4a28bd94b0aa6499d4b963a83757"
|
||||
},
|
||||
"linux-x64": {
|
||||
"asset": "^BanjoRecompiled-.*-Linux-X64\\.tar\\.gz$",
|
||||
"entry": "BanjoRecompiled",
|
||||
"file": "BanjoRecompiled-v1.0.2-Linux-X64.tar.gz",
|
||||
"sha256": "a34a4d361221171ea638e0165301fff817c53b9cd46167c5affd37867cfc7ad0"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^BanjoRecompiled-.*-Windows\\.zip$",
|
||||
"entry": "BanjoRecompiled.exe",
|
||||
"file": "BanjoRecompiled-v1.0.2-Windows.zip",
|
||||
"sha256": "fc34aad48e06681878bedd13b88d5332a2f21f6a98cafc931c94d54892a4dd92"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "rom",
|
||||
"label": "Banjo-Kazooie (USA) N64 ROM",
|
||||
"note": "Choose the ROM from the recomp's own start screen."
|
||||
},
|
||||
"release": {
|
||||
"tag": "v1.0.2",
|
||||
"published": "2026-07-31T19:43:17Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "2ship2harkinian",
|
||||
"name": "2 Ship 2 Harkinian",
|
||||
"game": "The Legend of Zelda: Majora's Mask",
|
||||
"origin": "N64",
|
||||
"type": "port",
|
||||
"repo": "2ship2harkinian/2ship2harkinian",
|
||||
"license": "CC0-1.0",
|
||||
"art": "https://raw.githubusercontent.com/2ship2harkinian/2ship2harkinian/develop/mm/linux/2s2hIcon.png",
|
||||
"builds": {
|
||||
"linux-x64": {
|
||||
"asset": "^2Ship-.*-Linux\\.zip$",
|
||||
"entry": "2ship.appimage",
|
||||
"file": "2Ship-Battler-Bravo-Linux.zip",
|
||||
"sha256": "6cdd4fe06f3f9b095e99c86fef70b9265cc921fb6faa7ba1e18e94e90ed0b345"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^2Ship-.*-Win64\\.zip$",
|
||||
"entry": "2ship.exe",
|
||||
"file": "2Ship-Battler-Bravo-Win64.zip",
|
||||
"sha256": "a46664a01623ad5d7cc82d29a9889699f6a98c9501c7a959a089f34380c1f078"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "rom",
|
||||
"label": "Majora's Mask (USA) N64 ROM",
|
||||
"sha1": [
|
||||
"d6133ace5afaa0882cf214cf88daba39e266c078"
|
||||
],
|
||||
"note": "The port asks for the ROM on first start and builds its asset archive from it."
|
||||
},
|
||||
"release": {
|
||||
"tag": "5.0.1",
|
||||
"published": "2026-08-25T17:54:43Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "unleashedrecomp",
|
||||
"name": "Unleashed Recompiled",
|
||||
"game": "Sonic Unleashed",
|
||||
"origin": "Xbox 360",
|
||||
"type": "recomp",
|
||||
"repo": "hedge-dev/UnleashedRecomp",
|
||||
"license": "GPL-3.0",
|
||||
"builds": {
|
||||
"windows-x64": {
|
||||
"asset": "^UnleashedRecomp-Windows\\.zip$",
|
||||
"entry": "UnleashedRecomp.exe",
|
||||
"file": "UnleashedRecomp-Windows.zip"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "dump",
|
||||
"label": "Sonic Unleashed Xbox 360 game files and title update",
|
||||
"note": "The installer inside the recomp asks for your dumped game, update and DLC folders."
|
||||
},
|
||||
"release": {
|
||||
"tag": "v1.0.3",
|
||||
"published": "2025-04-03T22:04:45Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "devilutionx",
|
||||
"name": "DevilutionX",
|
||||
"game": "Diablo",
|
||||
"origin": "PC",
|
||||
"type": "port",
|
||||
"repo": "diasurgical/DevilutionX",
|
||||
"license": "Sustainable Use License",
|
||||
"art": "https://raw.githubusercontent.com/diasurgical/DevilutionX/master/Packaging/resources/icon.png",
|
||||
"builds": {
|
||||
"linux-arm64": {
|
||||
"asset": "^devilutionx-linux-aarch64\\.tar\\.xz$",
|
||||
"entry": "devilutionx",
|
||||
"args": [
|
||||
"--data-dir",
|
||||
"{data}"
|
||||
],
|
||||
"file": "devilutionx-linux-aarch64.tar.xz",
|
||||
"sha256": "71f34342cd750dc6dec1effefa250e90a5fe0f127e79d4c9c66f4d07706c3442"
|
||||
},
|
||||
"linux-x64": {
|
||||
"asset": "^devilutionx-linux-x86_64\\.tar\\.xz$",
|
||||
"entry": "devilutionx",
|
||||
"args": [
|
||||
"--data-dir",
|
||||
"{data}"
|
||||
],
|
||||
"file": "devilutionx-linux-x86_64.tar.xz",
|
||||
"sha256": "3c0a79afad682054c4d11a91728887617b9f5dfbd8b6810dbb9226c380474432"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^devilutionx-windows-x86_64\\.zip$",
|
||||
"entry": "devilutionx.exe",
|
||||
"file": "devilutionx-windows-x86_64.zip",
|
||||
"sha256": "a20cfb62cd611f76aac78f9bf09a28f57794fbfe63ae6da9245deca446680b2b"
|
||||
},
|
||||
"android": {
|
||||
"asset": "^devilutionx-android\\.apk$",
|
||||
"file": "devilutionx-android.apk",
|
||||
"sha256": "c5a53ff35223e367eba75ef8ed2caa31ea8e78792d8aff00f2cee51a0566b28f"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "Diablo (GOG)",
|
||||
"stores": [
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1412601690"
|
||||
}
|
||||
],
|
||||
"probe": "DIABDAT.MPQ"
|
||||
},
|
||||
"release": {
|
||||
"tag": "1.5.5",
|
||||
"published": "2025-10-30T17:00:17Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ironwail",
|
||||
"name": "Ironwail",
|
||||
"game": "Quake",
|
||||
"origin": "PC",
|
||||
"type": "port",
|
||||
"repo": "andrei-drexler/ironwail",
|
||||
"license": "GPL-2.0",
|
||||
"art": "https://shared.steamstatic.com/store_item_assets/steam/apps/2310/library_600x900.jpg",
|
||||
"builds": {
|
||||
"linux-x64": {
|
||||
"asset": "^ironwail-.*-linux-x64\\.tar\\.gz$",
|
||||
"entry": "ironwail",
|
||||
"args": [
|
||||
"-basedir",
|
||||
"{data}"
|
||||
],
|
||||
"file": "ironwail-0.8.2-linux-x64.tar.gz",
|
||||
"sha256": "fcb0219d13c50f64728892f0558b4761ba5578319a6cc01021fad981c6333aa5"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^ironwail-.*-win64\\.zip$",
|
||||
"entry": "ironwail.exe",
|
||||
"file": "ironwail-0.8.2-win64.zip",
|
||||
"sha256": "0e54e9089ce72bad73c288148cfb5474a00b05d9e1da1c8feb0b76665faf7d01"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "Quake (Steam or GOG)",
|
||||
"stores": [
|
||||
{
|
||||
"store": "steam",
|
||||
"id": "2310"
|
||||
},
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1440166133"
|
||||
}
|
||||
],
|
||||
"probe": "id1/pak0.pak"
|
||||
},
|
||||
"release": {
|
||||
"tag": "v0.8.2",
|
||||
"published": "2026-08-11T17:20:22Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "openrct2",
|
||||
"name": "OpenRCT2",
|
||||
"game": "RollerCoaster Tycoon 2",
|
||||
"origin": "PC",
|
||||
"type": "port",
|
||||
"repo": "OpenRCT2/OpenRCT2",
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://shared.steamstatic.com/store_item_assets/steam/apps/285330/library_600x900.jpg",
|
||||
"builds": {
|
||||
"linux-x64": {
|
||||
"asset": "^OpenRCT2-.*-linux-x86_64\\.AppImage$",
|
||||
"file": "OpenRCT2-v0.5.7-linux-x86_64.AppImage",
|
||||
"sha256": "d02ecb52d946d1e5f00db53a164fadbd41bbb8636f6f5cdddb44d954a3bcdb64"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^OpenRCT2-.*-windows-portable-x64\\.zip$",
|
||||
"entry": "openrct2.exe",
|
||||
"file": "OpenRCT2-v0.5.7-windows-portable-x64.zip",
|
||||
"sha256": "c8759848d0035a5de41985c5c6b8adb69aa197731f28a6f7e7441830912b0300"
|
||||
},
|
||||
"android": {
|
||||
"asset": "^OpenRCT2-.*-android\\.apk$",
|
||||
"file": "OpenRCT2-v0.5.7-android.apk",
|
||||
"sha256": "3cc3b3078a120ae5a65b259c21bc989765a7008883f3298604976c607032cb0d"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "RollerCoaster Tycoon 2 (Steam or GOG)",
|
||||
"stores": [
|
||||
{
|
||||
"store": "steam",
|
||||
"id": "285330"
|
||||
},
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1207658957"
|
||||
}
|
||||
],
|
||||
"probe": "Data/g1.dat",
|
||||
"note": "OpenRCT2 asks for this folder on first start."
|
||||
},
|
||||
"release": {
|
||||
"tag": "v0.5.7",
|
||||
"published": "2026-11-01T10:57:49Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fallout2-ce",
|
||||
"name": "Fallout 2 Community Edition",
|
||||
"game": "Fallout 2",
|
||||
"origin": "PC",
|
||||
"type": "port",
|
||||
"repo": "alexbatalov/fallout2-ce",
|
||||
"license": "Sustainable Use License",
|
||||
"art": "https://shared.steamstatic.com/store_item_assets/steam/apps/38410/library_600x900.jpg",
|
||||
"builds": {
|
||||
"linux-x64": {
|
||||
"asset": "^fallout2-ce-linux-x64\\.tar\\.gz$",
|
||||
"entry": "fallout2-ce",
|
||||
"workdir": "data",
|
||||
"file": "fallout2-ce-linux-x64.tar.gz"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^fallout2-ce-windows-x64\\.zip$",
|
||||
"entry": "fallout2-ce.exe",
|
||||
"file": "fallout2-ce-windows-x64.zip"
|
||||
},
|
||||
"android": {
|
||||
"asset": "^fallout2-ce-android\\.apk$",
|
||||
"file": "fallout2-ce-android.apk"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "Fallout 2 (Steam or GOG)",
|
||||
"stores": [
|
||||
{
|
||||
"store": "steam",
|
||||
"id": "38410"
|
||||
},
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1440166436"
|
||||
}
|
||||
],
|
||||
"probe": "master.dat"
|
||||
},
|
||||
"release": {
|
||||
"tag": "v1.3.0",
|
||||
"published": "2024-04-21T10:16:02Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "openmw",
|
||||
"name": "OpenMW",
|
||||
"game": "The Elder Scrolls III: Morrowind",
|
||||
"origin": "PC",
|
||||
"type": "engine",
|
||||
"repo": "OpenMW/openmw",
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://shared.steamstatic.com/store_item_assets/steam/apps/22320/library_600x900.jpg",
|
||||
"builds": {
|
||||
"linux-x64": {
|
||||
"asset": "^openmw-[0-9.]+-Linux-64Bit\\.tar\\.gz$",
|
||||
"entry": "openmw-launcher",
|
||||
"file": "openmw-0.51.0-Linux-64Bit.tar.gz",
|
||||
"sha256": "a39459e6adad06163eb0ffd4d80229e13aec8748211c3dfd5bf95c204ae68f0b"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "Morrowind GOTY (Steam or GOG)",
|
||||
"stores": [
|
||||
{
|
||||
"store": "steam",
|
||||
"id": "22320"
|
||||
},
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1440163901"
|
||||
}
|
||||
],
|
||||
"probe": "Data Files/Morrowind.esm",
|
||||
"note": "The OpenMW launcher's install wizard asks for the Morrowind folder."
|
||||
},
|
||||
"release": {
|
||||
"tag": "openmw-0.51.0",
|
||||
"published": "2026-06-19T19:58:46Z"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import subprocess
|
||||
import sys
|
||||
import urllib.request
|
||||
|
||||
DEFAULT = os.path.join(os.path.dirname(__file__), "..", "..", "app", "src", "main", "assets", "recomps", "catalog.json")
|
||||
DEFAULT = os.path.join(os.path.dirname(__file__), "curated.json")
|
||||
|
||||
|
||||
def releases(repo):
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
import importlib.util
|
||||
import json
|
||||
from pathlib import Path
|
||||
import unittest
|
||||
|
||||
spec = importlib.util.spec_from_file_location(
|
||||
'build_catalog', Path(__file__).resolve().parents[1] / 'recomps' / 'build_catalog.py')
|
||||
build_catalog = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(build_catalog)
|
||||
|
||||
CURATED = {"schema": 1, "recomps": [{
|
||||
"id": "zelda64recomp", "name": "Zelda 64: Recompiled", "repo": "Zelda64Recomp/Zelda64Recomp",
|
||||
"builds": {"linux-arm64": {"asset": "^Z-ARM64\\.zip$", "entry": "Zelda64Recompiled"}},
|
||||
"data": {"kind": "rom", "label": "Majora's Mask ROM"},
|
||||
}]}
|
||||
|
||||
RL = {"updated": "2026-11-30", "apps": [
|
||||
{"id": "zelda64recomp", "name": "Zelda 64", "repo": "Zelda64Recomp/Zelda64Recomp", "tag": "v1.2.2", "origin": "n64",
|
||||
"assets": {"windows": "Z-*-Windows.zip", "linux": "Z-*-Linux-X64.zip"},
|
||||
"files": {"windows": {"name": "Z-v1.2.2-Windows.zip", "sha256": "a" * 64}}, "downloads": 10},
|
||||
{"id": "otherm-recomp", "name": "Other M", "repo": "o/otherm", "tag": "1.0", "origin": "wii", "downloads": 5,
|
||||
"assets": {"windows": "OtherM.zip", "linux": "OtherM-Flatpak.zip"}, "boot": {"kind": "portable", "start": "OtherM.exe",
|
||||
"files": {"what": "Your Metroid: Other M disc"}}, "setup_required": True, "setup_steps": ["Run setup.bat once."]},
|
||||
{"id": "gone", "name": "Gone", "repo": "o/gone", "archived": True, "assets": {"windows": "g.zip"}},
|
||||
{"id": "tool", "name": "Tool", "repo": "o/tool", "boot": {"kind": "not-a-game"}, "assets": {"windows": "t.zip"}},
|
||||
]}
|
||||
|
||||
RECOMPA = {"generated_at": "2026-11-30", "ports": [
|
||||
{"id": "zelda64recomp", "name": "Majora", "upstream": "https://github.com/Zelda64Recomp/Zelda64Recomp", "original_platform": "n64",
|
||||
"requirements": {"abi": ["arm64-v8a"]}, "forks": [
|
||||
{"repo": "x/Zelda-Android", "name": "Zelda Android", "package": "com.z.mm", "signer_sha256": "b" * 64, "downloads": 9,
|
||||
"release": {"tag": "a1", "published_at": "p", "asset": {"name": "z.apk", "url": "https://h/z.apk", "sha256": "c" * 64}}}]},
|
||||
{"id": "x86only", "name": "X", "upstream": "https://github.com/o/x", "requirements": {"abi": ["x86_64"]}, "forks": []},
|
||||
{"id": "sm64", "name": "SM64", "upstream": "https://github.com/o/sm64", "original_platform": "n64", "type": "decomp",
|
||||
"requirements": {"abi": ["arm64-v8a"]},
|
||||
"assets": [{"label": "SM64 ROM", "accepted": [{"sha1": "9BEF1128717F958171A4AFAC3ED78EE2BB4E86CE"}], "instructions_md": "Pick `sm64.z64`.\n"}],
|
||||
"forks": [{"repo": "y/sm64", "package": "com.y.sm64", "signer_sha256": "d" * 64, "downloads": 1,
|
||||
"release": {"tag": "r2", "asset": {"name": "sm64.apk", "url": "https://h/s.apk", "sha256": "e" * 64}}}]},
|
||||
]}
|
||||
|
||||
|
||||
class RecompsCatalogTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.catalog = build_catalog.build(json.loads(json.dumps(CURATED)), RL, RECOMPA, resolve=False)
|
||||
self.by_id = {e["id"]: e for e in self.catalog["recomps"]}
|
||||
|
||||
def test_curated_entries_win_and_gain_builds_and_credits_from_both_catalogs(self):
|
||||
z = self.by_id["zelda64recomp"]
|
||||
self.assertEqual(["droiddeck", "recomp-launcher", "recompa"], z["sources"])
|
||||
self.assertEqual("Zelda 64: Recompiled", z["name"])
|
||||
self.assertEqual({"linux-arm64", "linux-x64", "windows-x64", "android"}, set(z["builds"]))
|
||||
self.assertEqual("Z-v1.2.2-Windows.zip", z["builds"]["windows-x64"]["file"])
|
||||
self.assertEqual("a" * 64, z["builds"]["windows-x64"]["sha256"])
|
||||
self.assertEqual("com.z.mm", z["builds"]["android"]["package"])
|
||||
self.assertEqual("a1", z["android_release"]["tag"])
|
||||
|
||||
def test_recomp_launcher_entries_keep_setup_and_data_and_drop_what_cannot_run(self):
|
||||
m = self.by_id["otherm-recomp"]
|
||||
self.assertEqual(["windows-x64"], list(m["builds"]))
|
||||
self.assertEqual("OtherM.exe", m["builds"]["windows-x64"]["entry"])
|
||||
self.assertEqual("OtherM.zip", m["builds"]["windows-x64"]["file"])
|
||||
self.assertEqual("Your Metroid: Other M disc", m["data"]["label"])
|
||||
self.assertIn("setup.bat", m["setup"])
|
||||
self.assertEqual("Wii", m["origin"])
|
||||
self.assertNotIn("gone", self.by_id)
|
||||
self.assertNotIn("tool", self.by_id)
|
||||
|
||||
def test_recompa_android_ports_bring_their_rom_requirements(self):
|
||||
self.assertNotIn("x86only", self.by_id)
|
||||
s = self.by_id["sm64"]
|
||||
self.assertEqual(["recompa"], s["sources"])
|
||||
self.assertEqual("r2", s["release"]["tag"])
|
||||
self.assertEqual("https://h/s.apk", s["builds"]["android"]["url"])
|
||||
self.assertEqual(["9bef1128717f958171a4afac3ed78ee2bb4e86ce"], s["data"]["sha1"])
|
||||
self.assertEqual("rom", s["data"]["kind"])
|
||||
self.assertEqual("Pick sm64.z64.", s["data"]["note"])
|
||||
|
||||
def test_globs_become_anchored_patterns(self):
|
||||
self.assertEqual("^Z\\-.*\\-Linux\\-X64\\.zip$", build_catalog.glob_regex("Z-*-Linux-X64.zip"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user