From 06f87cf957fa496e1e3d915680e292af98d4f077 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 24 Nov 2026 00:18:04 +0100 Subject: [PATCH] refactor: size --list-cores with core_files --- install.ps1 | 2 +- install.py | 6 +----- install.sh | 2 +- install/launchers/index.json | 16 ++++++++-------- installer/run_files.py | 8 ++------ 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/install.ps1 b/install.ps1 index 4c242fda2..d93f98f23 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 = "8a5606206be6b53db269d6003d13a22487c4dde99c7121aaef608e65eb2546c3" + $defaultInstallSha256 = "c56f884f958819a641571ee75eeee8b14b6ecd24e2fd24229944418c104c3cb9" # The pin above refuses any changed byte: this cap only stops a body that # cannot be the installer (a sign-in portal's page) before it is hashed. $maximumInstallerBytes = 8MB diff --git a/install.py b/install.py index b307c8c5c..e922090f0 100644 --- a/install.py +++ b/install.py @@ -22200,11 +22200,7 @@ def _print_choices( labels = {name: _system_label(name, manifest) if systems else name for name in names} width = min(max(len(label) for label in labels.values()), 40) for name in names: - held = ( - [f for f in files if _chosen(f, {name})] - if systems - else _filter_by_target([f for f in files if f.get("cores") is not None], [name]) - ) + held = [f for f in files if _chosen(f, {name})] if systems else core_files(files, name) print(f" {labels[name]:<{width}} " f"{_system_sized(held) if systems else _core_sized(held)}") diff --git a/install.sh b/install.sh index a25084036..b25e7bcec 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="8a5606206be6b53db269d6003d13a22487c4dde99c7121aaef608e65eb2546c3" +DEFAULT_INSTALL_SHA256="c56f884f958819a641571ee75eeee8b14b6ecd24e2fd24229944418c104c3cb9" # The pin above refuses any changed byte: this cap only stops a body that # cannot be the installer (a sign-in portal's page) before it is hashed. MAX_INSTALLER_BYTES=8388608 diff --git a/install/launchers/index.json b/install/launchers/index.json index 19662e747..6472aa6d0 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": 1488572, - "sha256": "8a5606206be6b53db269d6003d13a22487c4dde99c7121aaef608e65eb2546c3", + "size": 1488472, + "sha256": "c56f884f958819a641571ee75eeee8b14b6ecd24e2fd24229944418c104c3cb9", "executable": false }, { @@ -71,8 +71,8 @@ "muos": { "archive": { "dest": "ARCHIVE/RetroBIOS.muxapp", - "size": 1542197, - "sha256": "3634e306defdfaecd44315a693884c3f754829cf3f8df6bd4bd1866cbcdad8da" + "size": 1542097, + "sha256": "5c45dcaa61b1853642902536ef01c0d7069f03c8767b54ac5416c32b0de75a29" }, "members": [ { @@ -92,8 +92,8 @@ { "name": "RetroBIOS/install.py", "repo_path": "install.py", - "size": 1488572, - "sha256": "8a5606206be6b53db269d6003d13a22487c4dde99c7121aaef608e65eb2546c3", + "size": 1488472, + "sha256": "c56f884f958819a641571ee75eeee8b14b6ecd24e2fd24229944418c104c3cb9", "executable": false }, { @@ -166,8 +166,8 @@ { "dest": ".config/modules/retrobios/install.py", "repo_path": "install.py", - "size": 1488572, - "sha256": "8a5606206be6b53db269d6003d13a22487c4dde99c7121aaef608e65eb2546c3", + "size": 1488472, + "sha256": "c56f884f958819a641571ee75eeee8b14b6ecd24e2fd24229944418c104c3cb9", "executable": false }, { diff --git a/installer/run_files.py b/installer/run_files.py index 7d99746ad..49b14a947 100644 --- a/installer/run_files.py +++ b/installer/run_files.py @@ -19,6 +19,7 @@ from installer.choices import ( _requested_narrowing, _standalone_builds, available_choices, + core_files, emulator_names, records_selection, ) @@ -54,7 +55,6 @@ from installer.lists import ListFailure, fetch_manifest, fetch_targets, load_tar from installer.manifest import GAME_DATA from installer.narrowing import ( _chosen, - _filter_by_target, board_target, designated_cores, find_by_hash, @@ -117,11 +117,7 @@ def _print_choices( labels = {name: _system_label(name, manifest) if systems else name for name in names} width = min(max(len(label) for label in labels.values()), 40) for name in names: - held = ( - [f for f in files if _chosen(f, {name})] - if systems - else _filter_by_target([f for f in files if f.get("cores") is not None], [name]) - ) + held = [f for f in files if _chosen(f, {name})] if systems else core_files(files, name) print(f" {labels[name]:<{width}} " f"{_system_sized(held) if systems else _core_sized(held)}")