From fad5b10665f447960e0d3d16922c32894dab73e9 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Mon, 26 Oct 2026 21:14:24 +0100 Subject: [PATCH] feat: ship the muos glyph the app header names --- ports/muos/glyph/retrobios.png | Bin 0 -> 1354 bytes scripts/build_port.py | 4 ++++ tests/test_handheld_launchers.py | 22 ++++++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 ports/muos/glyph/retrobios.png diff --git a/ports/muos/glyph/retrobios.png b/ports/muos/glyph/retrobios.png new file mode 100644 index 0000000000000000000000000000000000000000..e869124c65889f2807aa5afdae6735df5c4d276b GIT binary patch literal 1354 zcmV-Q1-1H#P)-y&UV=i@nuv+fNc6SF2OmWGQetY$n*<;9 zNhL-TGz1e9lm~^jyK9An5H2{^x=d`}JDNV?h`MFpy z6grwP)3YL4Y|!gFup2l(Cq6rU2RenU)>CpsQRvU0DyMVXP)-Y3ji>ammEIizAWR)M zYyimJGJr{46g4JtzNGhNt@Q2)0JCdpqtBFVU(49!JcpF<{4onXQzBLaUf=tB35D0t z(!;uuNM?lFfP)+P6f!Y=x*O-&a5dzmTp%ph^?u_Fz6=icfB&xmcsqK!DDV@oj>H*x zF)-Bk9hd{?r7i6#A7g1sslo`bHxc<8Vx;P!P1q%nT28{kwOMf2R)DKwgVYL7{Dnu% zz*b!*`E)D}Z1J`^01ijc+=;A>z@Tjy?J{`{TiTNQ(8kvo$zrPb_Y3(0ds?7r-;;6y z#!xtL3?ALT7fL- zPO}^+JVWsjCy^yNp2u^}EUhE7S`gp_Bj|rbiHs-&KZi?Y8 zfRlvs3t1a1>G(Jp>|*`FD? z3`?^&3&uGv>Dsy(h)t0BLNEwlv}Cr( z-AqJ!5EfQLC=xd1T|Q8&GSx7ONv6KO7Mfq*E&0gQ91Qn;0nZ+N7ZkfHQ}^HppTVu) z|CHk`?LF-)tD#I+nQF+-ig%r8QPX1uKwdAM#4S-Aw%l$U4j_smjmx>{Z`Enn4*>4V zw}I90dAWwJYg!G>DDNSL=@q@o@(LFAR~96mD^{k}aLotFN}}a%P+Sh#Pt7laimA8! z{yNFWBT-nI3q$#qdQgQ6@Gm?zodLo5ryS^4D_!t^d6Joc$UaK(VWf+6H*t~d%1{&U z7fI+c2g+P1TaZ~lL#28m_b84qAzDxE4&S_~&OC3v7^*lao z!r6HmgSYUJQ%RY2)k@EbiaulS2K@s70RR8yAmT*;000I_L_t&o0N#3dE)u`Ca{vGU M07*qoM6N<$f}y8&e*gdg literal 0 HcmV?d00001 diff --git a/scripts/build_port.py b/scripts/build_port.py index b8ca5d671..6259433d8 100644 --- a/scripts/build_port.py +++ b/scripts/build_port.py @@ -109,6 +109,10 @@ def archive_members(name: str, root: Path = REPO_ROOT) -> list[tuple[str, Path | members = [ ("RetroBIOS/mux_launch.sh", source / "mux_launch.sh"), ("RetroBIOS/README.md", source / "README.md"), + # muOS draws an application's list glyph from glyph/.png + # in its own folder (apply_app_glyph, frontend common/ui/glyph.c): + # `# ICON: retrobios` resolved to nothing without it. + ("RetroBIOS/glyph/retrobios.png", source / "glyph" / "retrobios.png"), *_engine("RetroBIOS", root), ] elif name == TOOLS_ZIP: diff --git a/tests/test_handheld_launchers.py b/tests/test_handheld_launchers.py index 1427af7ac..3db152f52 100644 --- a/tests/test_handheld_launchers.py +++ b/tests/test_handheld_launchers.py @@ -309,6 +309,28 @@ class TheArchives(unittest.TestCase): self.assertEqual(top, []) self.assertIn("RetroBIOS/retrobios.gptk", names) + def test_the_muos_icon_is_the_glyph_its_header_names(self): + """muOS reads glyph/.png in the application's folder, and the + muxapp named an icon it did not carry.""" + header = (REPO_ROOT / "ports" / "muos" / "mux_launch.sh").read_text() + icon = re.search(r"^# ICON: (\S+)$", header, re.MULTILINE).group(1) + name = build_port.MUOS_APP + with zipfile.ZipFile(build_port.build_archive(name, self.out / name)) as zf: + data = zf.read(f"RetroBIOS/glyph/{icon}.png") + self.assertEqual(data[:8], b"\x89PNG\r\n\x1a\n") + + def test_no_tools_support_file_is_a_menu_entry(self): + """EmulationStation lists a folder only when it holds a file of the + system's extension (.sh for Tools and Ports): batocera-emulationstation + and EmulationStation-fcamod SystemData.cpp drop a folder with none. + The support folders must keep none, or each shows up in the menu.""" + for name in (build_port.TOOLS_ZIP, build_port.PORT_ZIP, build_port.BATOCERA_ZIP): + with self.subTest(archive=name): + with zipfile.ZipFile(build_port.build_archive(name, self.out / name)) as zf: + inside = [n for n in zf.namelist() + if "/" in n and n.lower().endswith(".sh")] + self.assertEqual(inside, []) + def test_each_carries_the_pinned_installer(self): pinned = build_port.pinned_installer_sha256() for name, (_script, folder) in self.LAYOUT.items():