mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-23 20:29:06 -05:00
docs: first install for the full screen
The one-liner opens the full screen, and the page walked through the line questions. It now shows the first screen, the keys and the controller, Install, the copy from an old card and the result titles. Troubleshooting no longer asks to move a nested bios folder by hand.
This commit is contained in:
1 parent
e534f11713
commit
bbbf551140
5 files changed
+73
-57
No files matched your search
+16
-13
@@ -699,13 +699,14 @@ class FirstInstallWalkthrough(unittest.TestCase):
|
||||
step3 = _section(self.run, "The file index and the download")
|
||||
step4 = _section(self.run, "The end of the run")
|
||||
step5 = _section(self.run, "A later check")
|
||||
# First install names the three endings a run prints, and no count:
|
||||
# a figure from one setup read as the size of every install.
|
||||
# First install names the three endings the full screen shows as
|
||||
# its title, and no count: a figure from one setup read as the size
|
||||
# of every install.
|
||||
source = (ROOT / "install.py").read_text(encoding="utf-8")
|
||||
for ending in ("Done.", "Finished with errors.", "Nothing was installed."):
|
||||
for ending in ("Done", "Finished with errors", "Nothing installed"):
|
||||
with self.subTest(ending=ending):
|
||||
self.assertIn(f"`{ending}`", _section(self.text, "5. Read the last line"))
|
||||
self.assertIn(f'"\\n{ending} ', source)
|
||||
self.assertIn(f"**{ending}**", _section(self.text, "5. Read the result"))
|
||||
self.assertIn(f'title = "{ending}"', source)
|
||||
self.assertNotRegex(self.text, r"Done\. \d+ files")
|
||||
count, size = re.search(r"\n (\d+) files \(([\d.]+ [KMG]B)\)", step3).groups()
|
||||
self.assertIn(f"0/{count} present", step3)
|
||||
@@ -726,15 +727,17 @@ class FirstInstallWalkthrough(unittest.TestCase):
|
||||
self.assertIn(f"all {required} belong", step4)
|
||||
self.assertIn(f"other {total - required} are optional", step4)
|
||||
|
||||
def test_no_platform_detected_reads_like_the_installer(self):
|
||||
source = (ROOT / "install.py").read_text(encoding="utf-8")
|
||||
branch = source.split('print(" No supported platform detected.")', 1)[1][:1600]
|
||||
self.assertIn("if not interactive or listing:", branch)
|
||||
self.assertIn("_prompt_manual_platform(os_type)", branch)
|
||||
def test_nothing_found_reads_like_the_installer(self):
|
||||
# The one-liner hands the terminal to the installer, which opens the
|
||||
# full screen: its first screen says the heading and offers the row.
|
||||
import install
|
||||
|
||||
self.assertIn('"$INSTALLER" "$@" </dev/tty', (ROOT / "install.sh").read_text(encoding="utf-8"))
|
||||
section = _section(self.text, "No supported platform detected.")
|
||||
self.assertIn("a menu follows", section)
|
||||
self.assertIn("--no-input", section)
|
||||
state = install.TuiState()
|
||||
screen = "\n".join(install.tui_view(state, 80, 24))
|
||||
self.assertIn("Nothing was found here.", screen)
|
||||
section = _section(self.text, "Nothing was found here.")
|
||||
self.assertIn(f"**{install.tui_rows(state)[-1].label}**", section)
|
||||
self.assertNotIn("cannot stop and ask", section)
|
||||
|
||||
|
||||
|
||||
@@ -125,15 +125,21 @@ class FirstInstallEnds(unittest.TestCase):
|
||||
"""C7, B15: the page said `Done.` may list failures, and sent a wrong
|
||||
folder to a section with no answer for it."""
|
||||
|
||||
def test_the_wrong_folder_answer_is_dest(self):
|
||||
section = _section(_wiki("first-install.md"), "2. Check the folder it found")
|
||||
self.assertIn("--dest", section)
|
||||
def test_the_wrong_folder_answer_is_on_the_screen(self):
|
||||
# The one-liner opens the full screen: its first screen has the
|
||||
# answer, a row the page names as the interface spells it.
|
||||
import install
|
||||
|
||||
section = _section(_wiki("first-install.md"), "2. Check the setup it found")
|
||||
state = install.TuiState()
|
||||
row = install.tui_rows(state)[-1].label
|
||||
self.assertIn(f"**{row}**", section)
|
||||
self.assertIn("<your setup>", section)
|
||||
self.assertNotIn("Batocera", section)
|
||||
|
||||
def test_the_diagram_follows_the_steps(self):
|
||||
text = _wiki("first-install.md")
|
||||
self.assertLess(text.index("## 5. Read the last line"), text.index("<!-- image: install-flow -->"))
|
||||
self.assertLess(text.index("## 5. Read the result"), text.index("<!-- image: install-flow -->"))
|
||||
|
||||
|
||||
class OneNamePerPage(unittest.TestCase):
|
||||
|
||||
@@ -251,11 +251,21 @@ class SmallCopyFixes(unittest.TestCase):
|
||||
self.assertIn("`retroarch/cores/system/` on the SD card", guides)
|
||||
self.assertIn("--dest E:\\retroarch\\cores\\system", section)
|
||||
|
||||
def test_the_end_line_is_the_printed_one(self):
|
||||
section = _section(_wiki("first-install.md"), "5. Read the last line")
|
||||
self.assertIn("`N files installed, M already up to date.`", section)
|
||||
source = (REPO_ROOT / "install.py").read_text(encoding="utf-8")
|
||||
self.assertIn("installed, \"\n f\"{_plural(up_to_date, 'file')} already up to date.", source)
|
||||
def test_the_end_is_the_shown_one(self):
|
||||
# The one-liner opens the full screen: the page names the titles
|
||||
# its result screen shows, as tui_outcome writes them.
|
||||
import install
|
||||
|
||||
section = _section(_wiki("first-install.md"), "5. Read the result")
|
||||
state = install.TuiState()
|
||||
state.stack, state.code = ["result"], 0
|
||||
for summary in ({"installed": 3, "up_to_date": 0, "failed": []},
|
||||
{"installed": 2, "failed": [{"dest": "a.bin", "reason": "HTTP 404"}]},
|
||||
{"installed": 0, "failed": [{"dest": "a.bin", "reason": "HTTP 404"}]}):
|
||||
state.summary = summary
|
||||
title, _lines = install.tui_outcome(state)
|
||||
with self.subTest(title=title):
|
||||
self.assertIn(f"**{title}**", section)
|
||||
|
||||
|
||||
class CommunityAnswers(unittest.TestCase):
|
||||
|
||||
+30
-34
@@ -67,44 +67,44 @@ curl -fsSL https://raw.githubusercontent.com/Abdess/retrobios/main/install.sh |
|
||||
On Batocera, Recalbox and similar setups, see
|
||||
[Get your files](../which-pack.md).
|
||||
|
||||
## 2. Check the folder it found
|
||||
## 2. Check the setup it found
|
||||
|
||||
It shows your setup and its BIOS folder:
|
||||
It opens a menu:
|
||||
|
||||
```
|
||||
Found <your setup> at <its folder>
|
||||
RetroBIOS: Where do you play?
|
||||
Found on this machine:
|
||||
> <your setup>
|
||||
Another setup or folder
|
||||
BIOS folder: <its folder>
|
||||
```
|
||||
|
||||
- **Right folder?** Go on.
|
||||
- **Wrong folder?** Press Ctrl+C. Run it again with your folder:
|
||||
- **Right folder?** Press Enter.
|
||||
- **Wrong folder?** Choose **Another setup or folder**, then browse to yours.
|
||||
- **A handheld's SD card in a reader?** It is listed, as **muOS SD card**.
|
||||
|
||||
<!-- os-tabs windows: --dest D:\path\to\bios -->
|
||||
```sh
|
||||
curl -fsSL https://raw.githubusercontent.com/Abdess/retrobios/main/install.sh | sh -s -- --dest ~/path/to/bios
|
||||
```
|
||||
Arrows move, Enter chooses, Esc goes back. A controller's A and B do the same.
|
||||
|
||||
## 3. Choose what to install
|
||||
## 3. Install
|
||||
|
||||
```
|
||||
Enter) install everything
|
||||
i) only what the installed cores read
|
||||
c) choose systems, cores and regions
|
||||
q) quit
|
||||
```
|
||||
The next screen counts the missing files and the free space.
|
||||
Press Enter on **Install**. **Choose systems** keeps the consoles you
|
||||
play.
|
||||
|
||||
**Enter** installs everything. **c** lets you pick consoles.
|
||||
**Old card?** In a card reader, choose **Copy the BIOS files from your old
|
||||
card or a folder**, then the card. It stays unchanged.
|
||||
|
||||
## 4. Wait
|
||||
|
||||
Ctrl+C stops it. Run the command again to carry on.
|
||||
B or Ctrl+C stops it. Run it again to carry on.
|
||||
|
||||
## 5. Read the last line
|
||||
## 5. Read the result
|
||||
|
||||
- **`Done.`** `N files installed, M already up to date.` All files are in place.
|
||||
- **`Finished with errors.`** Some files failed. Run the same command again.
|
||||
It retries only those.
|
||||
- **`Nothing was installed.`** The lines above it say why. See
|
||||
[If it stops](#if-it-stops).
|
||||
- **Done**: all files are in place.
|
||||
- **Finished with errors**: run the command again. It retries only those.
|
||||
- **Nothing installed**: the screen says why. See [If it stops](#if-it-stops).
|
||||
|
||||
For questions line by line (screen readers), add `--plain`.
|
||||
|
||||
## What the command does
|
||||
|
||||
@@ -127,18 +127,14 @@ All good:
|
||||
|
||||
## Undo
|
||||
|
||||
Every file it replaces goes to a `retrobios-backup` folder next to your BIOS
|
||||
folder. The last lines say how to put them back.
|
||||
Files it replaces go to a `retrobios-backup` folder beside your BIOS folder.
|
||||
The result says how to restore them.
|
||||
|
||||
## If it stops
|
||||
|
||||
### No supported platform detected.
|
||||
### Nothing was found here.
|
||||
|
||||
At a terminal, a menu follows. Pick your setup by its number, then type its
|
||||
BIOS folder, or press Enter for the usual one.
|
||||
|
||||
With `--no-input`, or without a terminal, it stops and prints the command to
|
||||
use.
|
||||
Choose **Another setup or folder**, then your setup and its folder.
|
||||
|
||||
### Error: Python 3.8 or newer is required.
|
||||
|
||||
@@ -157,9 +153,9 @@ The download was cut short. Nothing was changed. Run the command again.
|
||||
|
||||
You cannot write there. Do what the message says.
|
||||
|
||||
### Not enough space on the drive holding ...
|
||||
### The card is full
|
||||
|
||||
Nothing was written. Free some space, or pick another drive with `--dest`.
|
||||
Nothing was written. Free some space, or choose another folder.
|
||||
|
||||
### The game still does not start
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ Run it without `--check`. It adds missing files and replaces wrong ones.
|
||||
- **Right folder?** [Get your files](../which-pack.md) names it.
|
||||
- **Exact name?** `scph5501.bin` and `SCPH-5501.BIN` differ. On Linux,
|
||||
capitals count too.
|
||||
- **A `bios` folder inside your BIOS folder?** Move its files up one level.
|
||||
- **A `bios` folder inside your BIOS folder?** Run the installer: it copies
|
||||
those files up one level.
|
||||
- **Unzipped by hand on Linux?** The command adds names that differ by
|
||||
capitals.
|
||||
- **A ZIP in parts, like `Pack.part1of2.zip`?** Unzip every part into one
|
||||
|
||||
Reference in new issue
Block a user