diff --git a/install.ps1 b/install.ps1 index 0f06a799e..2beaf7562 100644 --- a/install.ps1 +++ b/install.ps1 @@ -11,7 +11,7 @@ $ErrorActionPreference = "Stop" $defaultInstallUrl = "https://raw.githubusercontent.com/Abdess/retrobios/main/install.py" - $defaultInstallSha256 = "db262525b78f1a627d711bdfdaecd7774d9589db9b0f0aa62dd4d64f60948f70" + $defaultInstallSha256 = "0a21af2ef15c0ff2d97e76c0d65bad4595ae9f7857c0703963e408bb0a48d3f1" $maximumInstallerBytes = 2MB $installerExit = 0 $installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null } diff --git a/install.py b/install.py index 635517bdd..b702c17ef 100644 --- a/install.py +++ b/install.py @@ -15405,19 +15405,22 @@ def _status_after(state: TuiState) -> list[str]: def _view_browse(state: TuiState, width: int, height: int) -> tuple: where = "Drives" if state.browse_dir is None else middle(str(state.browse_dir), width) - after = _status_after(state) + hint: list = [] if state.browse_for == "from": # Two lines at 40 columns: the long form was cut after "copied,". whole = ("Choose the old card, a backup folder or a ZIP: its BIOS files are " "copied, each one checked, nothing on it is changed.") - after.insert(0, whole if len(_wrap(whole, width)) <= 2 - else "Choose the old card, a backup folder or a ZIP.") + hint = [whole if len(_wrap(whole, width)) <= 2 + else "Choose the old card, a backup folder or a ZIP."] elif state.browse_for == "save": - after.insert(0, f"Choose {display_name(state.platform)}'s save directory: some " - "cores read files there.") + hint = [f"Choose {display_name(state.platform)}'s save directory: some " + "cores read files there."] + # The hint is kept whole under the list, which scrolls: three folders at + # 40x12 cut it to "Choose the old card, a backup folder". return ("Copy from" if state.browse_for == "from" else "Save folder" if state.browse_for == "save" else "Browse for a folder", - _compose(state, width, height, [where], tui_rows(state), after), + _compose(state, width, height, [where], tui_rows(state), _status_after(state), + hint), ("A/Enter Open", "B/Esc Back", "? Help")) diff --git a/install.sh b/install.sh index 4fa8c7734..492e21d87 100755 --- a/install.sh +++ b/install.sh @@ -18,7 +18,7 @@ esac TEMP_INSTALLER="" TEMP_DIRECTORY="" DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/install.py" -DEFAULT_INSTALL_SHA256="db262525b78f1a627d711bdfdaecd7774d9589db9b0f0aa62dd4d64f60948f70" +DEFAULT_INSTALL_SHA256="0a21af2ef15c0ff2d97e76c0d65bad4595ae9f7857c0703963e408bb0a48d3f1" MAX_INSTALLER_BYTES=2097152 cleanup() { diff --git a/install/launchers/index.json b/install/launchers/index.json index b76ad310e..f178aa43b 100644 --- a/install/launchers/index.json +++ b/install/launchers/index.json @@ -27,8 +27,8 @@ { "dest": "roms/ports/retrobios/install.py", "repo_path": "install.py", - "size": 774796, - "sha256": "db262525b78f1a627d711bdfdaecd7774d9589db9b0f0aa62dd4d64f60948f70", + "size": 774938, + "sha256": "0a21af2ef15c0ff2d97e76c0d65bad4595ae9f7857c0703963e408bb0a48d3f1", "executable": false }, { @@ -71,8 +71,8 @@ "muos": { "archive": { "dest": "ARCHIVE/RetroBIOS.muxapp", - "size": 827345, - "sha256": "1c4e3b27bbd9159fb529820b73530cb72166d92d0098bf224266e40b29e04bce" + "size": 827487, + "sha256": "f10183e9aab6eb74f2e3e0cc12998af2cc53ece5cff4a1251dffa6b22c748bc3" }, "members": [ { @@ -92,8 +92,8 @@ { "name": "RetroBIOS/install.py", "repo_path": "install.py", - "size": 774796, - "sha256": "db262525b78f1a627d711bdfdaecd7774d9589db9b0f0aa62dd4d64f60948f70", + "size": 774938, + "sha256": "0a21af2ef15c0ff2d97e76c0d65bad4595ae9f7857c0703963e408bb0a48d3f1", "executable": false }, { @@ -166,8 +166,8 @@ { "dest": ".config/modules/retrobios/install.py", "repo_path": "install.py", - "size": 774796, - "sha256": "db262525b78f1a627d711bdfdaecd7774d9589db9b0f0aa62dd4d64f60948f70", + "size": 774938, + "sha256": "0a21af2ef15c0ff2d97e76c0d65bad4595ae9f7857c0703963e408bb0a48d3f1", "executable": false }, { diff --git a/tests/test_install_tui.py b/tests/test_install_tui.py index cddd3d7d8..1e05847cf 100644 --- a/tests/test_install_tui.py +++ b/tests/test_install_tui.py @@ -8184,13 +8184,22 @@ class AuditSixteenAndNineScreens(unittest.TestCase): self.assertIn("X, Space, Right/Left", " ".join(text.split())) def test_the_copy_hint_fits_at_40_columns(self): - """tui_audit_9 P3-16: cut after "copied,".""" + """tui_audit_9 P3-16: cut after "copied,". On the CI runner /home + held three folders, and the list cut the hint: it is kept whole, + the list scrolling, from a folder of this test's own.""" + home = Path(tempfile.mkdtemp(dir=REPO_ROOT / "tmp")) + self.addCleanup(shutil.rmtree, home, True) + for name in ("linuxbrew", "packer", "runner"): + (home / name).mkdir() state = checked_state() + state.home = home with mock.patch.object(install, "_mounted_cards", return_value=[]), \ mock.patch.object(install, "_listed", return_value=[]): install._open_from_browser(state) + self.assertEqual(state.browse_dir, home) text = " ".join(_screen_text(state, 40, 12).split()) self.assertIn("Choose the old card, a backup folder or a ZIP.", text) + self.assertIn("> Use this folder", text) def test_the_miyoo_bar_says_what_a_does(self): """tui_audit_9 P3-17: A Tick on All and None, where A unticks."""