diff --git a/install.ps1 b/install.ps1 index 01c164290..75133bb13 100644 --- a/install.ps1 +++ b/install.ps1 @@ -16,7 +16,7 @@ # and Invoke-WebRequest throws on a cut transfer before the hash is read: # the site's build rewrites this line there (scripts/sitebootstrap.py). $mismatchAdvice = "The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." - $defaultInstallSha256 = "3a78bf2e5a910d0f5c21bc2dc490aa600fc3273c56ae01e9ce5061d9b3578f07" + $defaultInstallSha256 = "b17220355845692a087bbc29cdb4a1008f68b1423d1126f34f00fa0259b53184" $maximumInstallerBytes = 2MB $installerExit = 0 $installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null } diff --git a/install.py b/install.py index a5cf46c28..25a140e36 100644 --- a/install.py +++ b/install.py @@ -9831,11 +9831,15 @@ def games_root(setup: dict, bios_path: Path) -> Path | None: def _may_hold_games(bios_path: Path) -> bool: """Whether a rom folder could sit near this BIOS folder, said without the - network: a folder named roms in it or up to two levels above it, or a - path that runs through one (roms, games).""" + network: a folder named roms in it or up to two levels above it, a path + that runs through one (roms, games), or a handheld's games part, whose + console folders sit beside bios (ArkOS's EASYROMS plugged into a + computer was never offered its games).""" holders = [bios_path, *list(bios_path.absolute().parents)[:2]] if any(part.casefold() in ("roms", "games") for part in bios_path.absolute().parts[-3:]): return True + if games_part(bios_path.parent) is not None: + return True return any(entry.name.casefold() == "roms" and _entry_is_dir(entry) for holder in holders for entry in _list_dir(holder)) diff --git a/install.sh b/install.sh index fce43f99f..768eb8535 100755 --- a/install.sh +++ b/install.sh @@ -23,7 +23,7 @@ DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/ins # curl or wget stop on a cut transfer before the hash is read: the site's # build rewrites this line there (scripts/sitebootstrap.py). MISMATCH_ADVICE="The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." -DEFAULT_INSTALL_SHA256="3a78bf2e5a910d0f5c21bc2dc490aa600fc3273c56ae01e9ce5061d9b3578f07" +DEFAULT_INSTALL_SHA256="b17220355845692a087bbc29cdb4a1008f68b1423d1126f34f00fa0259b53184" MAX_INSTALLER_BYTES=2097152 cleanup() { diff --git a/tests/test_install_tui.py b/tests/test_install_tui.py index f8a7eea48..610c70221 100644 --- a/tests/test_install_tui.py +++ b/tests/test_install_tui.py @@ -12923,6 +12923,9 @@ class DriveIsACardByItsFiles(unittest.TestCase): self.assertEqual(install.games_setups(index, "retroarch", arkos / "bios"), ["arkos"]) self.assertEqual(install.games_setups(index, "retroarch", self.root / "bios"), ["retroarch"]) + # Its games are offered without --for-games: EASYROMS keeps no + # roms folder, its console folders sit beside bios. + self.assertTrue(install._may_hold_games(arkos / "bios")) def test_a_card_beside_a_data_drive_comes_first(self): """The ArkOS card and the data drive mounted,