fix: decide bundled files per setup on the site

comes_with_app called installed_with_emulator without a platform, so
hcl, cdogs, hurrican, ikemen, linapple, solarus and touchhle pages said
every file came with the app and printed no install command, while
install/batocera.json serves 667 hcl files. The route now asks per setup,
and a page naming no setup treats not_bundled_on files as files to get.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 21:42:18 +01:00
1 parent 2f9cfc8e8d
commit e0339e2f20
2 files changed
+21 -7

No files matched your search

+9
View File
@@ -742,6 +742,15 @@ class InstallBlockWhereItWorks(unittest.TestCase):
command, setups, oses = sitegen_install.emulator_install_route("cxbx-reloaded", _profile("cxbx-reloaded"))
self.assertEqual(oses, ("windows",))
def test_a_setup_whose_package_leaves_the_files_out_gets_the_command(self) -> None:
# hcl's release bundles every file, Batocera's package does not, and
# install/batocera.json serves its 667 files: the page said they all
# came with the app and printed no command.
profile = _profile("hcl")
command, setups, _oses = sitegen_install.emulator_install_route("hcl", profile)
self.assertEqual((command, setups), ("hcl", ["batocera"]))
self.assertFalse(any(sitegen_install.comes_with_app(f) for f in profile["files"]))
def test_a_lone_app_is_named_with_the_setup_that_launches_it(self) -> None:
text = "\n".join(sitegen_install.install_block("ryujinx", _profile("ryujinx")))
self.assertRegex(text, r"With [^:]*EmuDeck[^:]*: the installer finds")