mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
feat: tell RomM users to scan after an install
This commit is contained in:
1 parent
4dd43aa627
commit
3d694c7d70
7 files changed
+55
-10
No files matched your search
+1
-1
@@ -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 = "e7df99e3ac458c7717bd2ca415bc7d3d8701545652cd303ed19de67077531ab2"
|
||||
$defaultInstallSha256 = "38182a427e302ef13f994bad06ec51b8270f1b5949d9c1f9663b46437fdcd1fd"
|
||||
$maximumInstallerBytes = 2MB
|
||||
$installerExit = 0
|
||||
$installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null }
|
||||
|
||||
+12
@@ -15519,6 +15519,8 @@ def _install(args: argparse.Namespace, real_stdout: TextIO) -> None:
|
||||
print(f" {shown_path(bios_path)} stays: {exc.strerror}",
|
||||
file=sys.stderr)
|
||||
bulk_lines += hint
|
||||
if plat_name == "romm" and progress.installed:
|
||||
bulk_lines.append(ROMM_SCAN_WORDS)
|
||||
total_downloaded += progress.installed
|
||||
# The end line tells BIOS files from game data, as the menu
|
||||
# counted them, over the files that landed: matched by the end
|
||||
@@ -21830,6 +21832,8 @@ def tui_outcome(state: TuiState) -> tuple[str, list[str]]:
|
||||
# Said again with the result, as line mode ends: the system's own
|
||||
# BIOS check may mark the files just put in place.
|
||||
lines.append(state.version)
|
||||
if state.platform == "romm" and installed:
|
||||
lines.append(ROMM_SCAN_WORDS)
|
||||
fallback = (state.games or {}).get("fallback") or [] if state.for_games else []
|
||||
if fallback:
|
||||
# Named with the result, as line mode ends: they got every BIOS of
|
||||
@@ -23023,6 +23027,14 @@ def _closing_lines(state: TuiState) -> list[str]:
|
||||
|
||||
TUI_QUIT_WORDS = "RetroBIOS: quit. Nothing was installed."
|
||||
|
||||
# RomM serves the firmware rows its library scan records (rommapp/romm 5.4.0,
|
||||
# backend/endpoints/firmware.py:148,175 read db_firmware_handler.list_firmware),
|
||||
# and its folder watcher is off unless ENABLE_RESCAN_ON_FILESYSTEM_CHANGE is
|
||||
# set (backend/config/__init__.py:284, backend/watcher.py:106): files put in
|
||||
# place stay unseen by the player until a scan.
|
||||
ROMM_SCAN_WORDS = ("RomM lists the firmware its library scan has recorded: start a scan "
|
||||
"in RomM so that its player finds these files.")
|
||||
|
||||
# The result's remedy for the save files left out, as the terminal says it
|
||||
# once the screen is gone: Options are not there to choose from
|
||||
# (code_audit_20 P3-4). Line mode's words.
|
||||
|
||||
+1
-1
@@ -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="e7df99e3ac458c7717bd2ca415bc7d3d8701545652cd303ed19de67077531ab2"
|
||||
DEFAULT_INSTALL_SHA256="38182a427e302ef13f994bad06ec51b8270f1b5949d9c1f9663b46437fdcd1fd"
|
||||
MAX_INSTALLER_BYTES=2097152
|
||||
|
||||
cleanup() {
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
{
|
||||
"dest": "roms/ports/retrobios/install.py",
|
||||
"repo_path": "install.py",
|
||||
"size": 1087102,
|
||||
"sha256": "e7df99e3ac458c7717bd2ca415bc7d3d8701545652cd303ed19de67077531ab2",
|
||||
"size": 1087817,
|
||||
"sha256": "38182a427e302ef13f994bad06ec51b8270f1b5949d9c1f9663b46437fdcd1fd",
|
||||
"executable": false
|
||||
},
|
||||
{
|
||||
@@ -71,8 +71,8 @@
|
||||
"muos": {
|
||||
"archive": {
|
||||
"dest": "ARCHIVE/RetroBIOS.muxapp",
|
||||
"size": 1140729,
|
||||
"sha256": "5091f7a52ce8e2db24d3afa23a2d3e4a035fd3166d0a0389fb207dcc07fa0d3f"
|
||||
"size": 1141444,
|
||||
"sha256": "0a1054f931b20cb3dc4534304008aa3064af1f4ca6a9bab8f9659b506da4642d"
|
||||
},
|
||||
"members": [
|
||||
{
|
||||
@@ -92,8 +92,8 @@
|
||||
{
|
||||
"name": "RetroBIOS/install.py",
|
||||
"repo_path": "install.py",
|
||||
"size": 1087102,
|
||||
"sha256": "e7df99e3ac458c7717bd2ca415bc7d3d8701545652cd303ed19de67077531ab2",
|
||||
"size": 1087817,
|
||||
"sha256": "38182a427e302ef13f994bad06ec51b8270f1b5949d9c1f9663b46437fdcd1fd",
|
||||
"executable": false
|
||||
},
|
||||
{
|
||||
@@ -166,8 +166,8 @@
|
||||
{
|
||||
"dest": ".config/modules/retrobios/install.py",
|
||||
"repo_path": "install.py",
|
||||
"size": 1087102,
|
||||
"sha256": "e7df99e3ac458c7717bd2ca415bc7d3d8701545652cd303ed19de67077531ab2",
|
||||
"size": 1087817,
|
||||
"sha256": "38182a427e302ef13f994bad06ec51b8270f1b5949d9c1f9663b46437fdcd1fd",
|
||||
"executable": false
|
||||
},
|
||||
{
|
||||
|
||||
@@ -4048,6 +4048,20 @@ def _install_run(env: dict, *argv: str, **kwargs) -> subprocess.CompletedProcess
|
||||
)
|
||||
|
||||
|
||||
class RomMIsToldToScan(unittest.TestCase, _LoopbackRun):
|
||||
"""RomM serves the firmware its library scan records, and the run ended
|
||||
on "installed" with no word of the scan the player waits on."""
|
||||
|
||||
def test_the_end_of_an_install_names_the_scan(self):
|
||||
env = self.serve(self)
|
||||
dest = self.home / "library" / "bios"
|
||||
dest.mkdir(parents=True)
|
||||
proc = _install_run(env, "--platform", "romm", "--dest", str(dest),
|
||||
"--system", "atari-lynx", "--no-input")
|
||||
self.assertEqual(proc.returncode, 0, proc.stdout + proc.stderr)
|
||||
self.assertIn(install.ROMM_SCAN_WORDS, " ".join(proc.stdout.split()))
|
||||
|
||||
|
||||
class AnUnknownNameIsAnEvent(unittest.TestCase):
|
||||
"""--events carried start then end with code 1 for an unknown platform,
|
||||
target or system: the reason was on stderr only, which readers ignore."""
|
||||
|
||||
@@ -4591,6 +4591,20 @@ def _installed_state(dest: Path, code: int = 0, failed: list | None = None) -> i
|
||||
return state
|
||||
|
||||
|
||||
class TheRomMResultNamesTheScan(unittest.TestCase):
|
||||
"""RomM's player sees firmware its scan recorded: the result said
|
||||
"installed" and left the scan unsaid."""
|
||||
|
||||
def test_the_result_and_its_farewell_say_it(self):
|
||||
state = _installed_state(SYSTEM_DIR)
|
||||
state.platform = "romm"
|
||||
_title, lines = install.tui_outcome(state)
|
||||
self.assertIn(install.ROMM_SCAN_WORDS, lines)
|
||||
self.assertIn(install.ROMM_SCAN_WORDS, install._farewell_lines(state))
|
||||
state.platform = "retroarch"
|
||||
self.assertNotIn(install.ROMM_SCAN_WORDS, install.tui_outcome(state)[1])
|
||||
|
||||
|
||||
class AppOnTheCard(unittest.TestCase):
|
||||
"""The RetroBIOS app offered on the result screen and in the options."""
|
||||
|
||||
|
||||
@@ -1354,6 +1354,11 @@ folder, whose parent is the library. Run from the host of a container, where
|
||||
library laid out as `{platform}/roms` with no template found is refused
|
||||
rather than filled in the wrong place, and the message gives the command.
|
||||
|
||||
RomM's player reads the firmware its library scan has recorded, and RomM
|
||||
watches the library folder only when `ENABLE_RESCAN_ON_FILESYSTEM_CHANGE` is
|
||||
set. An install that put files in place ends by saying so: start a scan in
|
||||
RomM so that the player finds them.
|
||||
|
||||
## Android
|
||||
|
||||
Android reports itself as Linux, so the runtime is named from its own
|
||||
|
||||
Reference in new issue
Block a user