refactor: release, installer_build, devtools pkgs

The release tools, the installer build tools and the repository's
commit and PR checks keep their commands and move their code into
three packages. The release record readers move to model.releaserecord,
romfolders to model, the buildbot check to scraper. The site reads the
handheld launchers and the bootstrap pin from installer_build.
This commit is contained in:
Abdessamad Derraz committed 2026-11-18 20:44:12 +01:00
1 parent 5b3b3f19e8
commit c4fdf12874
91 files changed
+3508 -3277

No files matched your search

+1 -4
View File
@@ -23,6 +23,7 @@ from pathlib import Path
from core.artifacts import write_if_changed
from model.guides import PS1_NAME, SH_NAME
from installer_build.pins import PIN
REPO_RAW = "https://raw.githubusercontent.com/Abdess/retrobios"
@@ -37,10 +38,6 @@ ADVICE: dict[str, re.Pattern[str]] = {
SH_NAME: re.compile(r'^(MISMATCH_ADVICE=")[^"]*(")', re.M),
PS1_NAME: re.compile(r'^(\s*\$mismatchAdvice = ")[^"]*(")', re.M),
}
PIN: dict[str, re.Pattern[str]] = {
SH_NAME: re.compile(r'^DEFAULT_INSTALL_SHA256="([0-9a-f]{64})"', re.M),
PS1_NAME: re.compile(r'^\s*\$defaultInstallSha256 = "([0-9a-f]{64})"', re.M),
}
# What the served copy says of a refused installer. It names a commit's
# install.py, which never changes, and both downloaders fail on a short
# transfer before the hash is read: neither a cut download nor caches of
+4 -3
View File
@@ -12,7 +12,7 @@ from dataclasses import dataclass
from pathlib import Path
from romrecipes import ledger
import release_record
from model import releaserecord
from model import siteinputs
from model.collection import _group_by_manufacturer, _slug
from model.composition import compute_composition
@@ -27,6 +27,7 @@ from packs.crossref import FileConsumers
from acquire.provenance import build_report, profile_needs
from resolve.cores import resolve_platform_cores
from resolve.review import load_platform_hashes, load_profile_hashes
from installer_build.handhelds import GROUP_PAGE
from sitegen import (
agents as siteagents,
bootstrap as sitebootstrap,
@@ -575,11 +576,11 @@ def _write_guide_pages(run: _SiteRun) -> None:
# One permanent download address per registered platform: the README's
# table links each of them.
print("Generating download pages...")
get_dir = docs / release_record.GET_DIR
get_dir = docs / releaserecord.GET_DIR
get_dir.mkdir(parents=True, exist_ok=True)
for name in run.platform_names:
write_if_changed(str(get_dir / f"{name}.md"), generate_get_page(name))
write_if_changed(str(get_dir / f"{sitehandheld.GROUP_PAGE}.md"),
write_if_changed(str(get_dir / f"{GROUP_PAGE}.md"),
sitehandheld.group_page(_REPO_ROOT))
write_if_changed(str(get_dir / "index.md"), generate_get_index())
+2 -2
View File
@@ -4,7 +4,7 @@ from __future__ import annotations
from datetime import datetime, timezone
import release_record
from model import releaserecord
from core.paths import REPO_ROOT
from model.safeparse import require_yaml
@@ -22,7 +22,7 @@ RELEASE_URL = f"{REPO_URL}/releases/latest"
DATA_LICENSE = "MIT (LICENSE: scripts, tooling, schemas, documentation and metadata)"
SITE_URL = "https://abdess.github.io/retrobios/"
GENERATED_DIRS = ["platforms", "systems", "emulators", "wiki", "api", "downloads", "files",
release_record.GET_DIR]
releaserecord.GET_DIR]
# Generated directories of files served as they are, not pages.
PUBLIC_DIRS = ("api", "downloads")
+2 -2
View File
@@ -8,7 +8,7 @@ import sys
import urllib.parse
from pathlib import Path
import release_record
from model import releaserecord
from model import siteinputs
from model.database import load_database
from sitegen import markup, measurements as sitemeasurements, starlight as sitestarlight
@@ -83,7 +83,7 @@ def page_level(relative: Path) -> str:
path = relative.as_posix()
if path in ("index.md", "which-pack.md"):
return "start"
if relative.parts[0] in ("platforms", release_record.GET_DIR):
if relative.parts[0] in ("platforms", releaserecord.GET_DIR):
return "setup"
if relative.parts[0] in ("systems", "emulators") or path == "explore.md":
return "explore"
+2 -2
View File
@@ -6,7 +6,7 @@ import html
import re
from pathlib import Path
import release_record
from model import releaserecord
from sitegen import measurements as sitemeasurements
from sitegen.config import SITE_NAME
@@ -133,7 +133,7 @@ def _section_description(markdown: str, relative: Path, title: str, browser: str
"""The description of a download, system, emulator or platform page,
or None for a page of another section."""
key = relative.as_posix()
if key.startswith(f"{release_record.GET_DIR}/"):
if key.startswith(f"{releaserecord.GET_DIR}/"):
size = re.search(r"^- (.+ to download\b.*?)\.?$", markdown, re.M)
if size:
return _shorten(f"{title}: the BIOS pack of this setup, {_plain_markdown(size[1])}. "
+6 -5
View File
@@ -5,11 +5,12 @@ from __future__ import annotations
import json
import re
import release_record
from model import releaserecord
from model import siteinputs
from model.guides import DEVICE_GROUPS, GROUP_TILES, GUIDES, HANDHELD_GUIDE
from model.platforms import load_platform_config
from model.registry import load_platform_registry
from installer_build.handhelds import GROUP_PAGE
from sitegen import handheld as sitehandheld, markup
from sitegen.config import RELEASE_URL, REPO_URL, _REPO_ROOT
from sitegen.descriptions import PAGE_DATA
@@ -55,15 +56,15 @@ def generate_get_page(platform_name: str) -> str:
never touches it: committing release.json rebuilds it."""
config = load_platform_config(platform_name, str(siteinputs.current().platforms))
display = config.get("platform", platform_name)
record = release_record.load_advertised()
pack = release_record.pack_for(platform_name, record)
record = releaserecord.load_advertised()
pack = releaserecord.pack_for(platform_name, record)
released = has_release_pack(platform_name)
title = get_page_title(platform_name, display)
# The page changes with the release it lists: its tag is its date, the
# one the sitemap gives (vYYYY.MM.DD).
tag_date = re.fullmatch(r"v(\d{4})\.(\d{2})\.(\d{2})", str(record.get("tag", "")))
if released and pack and tag_date:
PAGE_DATA[f"{release_record.GET_DIR}/{platform_name}.md"] = {"dateModified": "-".join(tag_date.groups())}
PAGE_DATA[f"{releaserecord.GET_DIR}/{platform_name}.md"] = {"dateModified": "-".join(tag_date.groups())}
if released and pack and pack.get("assets"):
description = (f"The BIOS pack for {display}: {_fmt_size(pack['download_size'])} to "
"download. The address stays the same and always gives the latest ZIP.")
@@ -147,6 +148,6 @@ def generate_get_index() -> str:
# handheld guide.
if any(HANDHELD_GUIDE and tile.link == HANDHELD_GUIDE.path
for tile in GROUP_TILES.get(group, ())):
lines.append(f"- [{sitehandheld.GROUP_TITLE}]({sitehandheld.GROUP_PAGE}.md)")
lines.append(f"- [{sitehandheld.GROUP_TITLE}]({GROUP_PAGE}.md)")
lines.append("")
return "\n".join(lines)
+9 -8
View File
@@ -5,7 +5,7 @@ from __future__ import annotations
import html
import json
import release_record
from model import releaserecord
from model import siteinputs
from model.collection import _profiles_on_disk
from model.guides import (
@@ -19,6 +19,7 @@ from model.guides import (
from model.platforms import load_platform_config
from model.registry import load_platform_registry
from resolve.nativemode import digest_algorithm
from installer_build.handhelds import GROUP_PAGE
from sitegen import handheld as sitehandheld, markup
from sitegen.config import _REPO_ROOT
from sitegen.guides import platform_args, terminal_tabs
@@ -40,7 +41,7 @@ def no_zip_line(display: str) -> str:
def get_page_link(platform_name: str, prefix: str = "") -> str:
"""The platform's permanent download page, as a site link."""
return f"{prefix}{release_record.GET_DIR}/{platform_name}.md"
return f"{prefix}{releaserecord.GET_DIR}/{platform_name}.md"
def get_page_title(platform_name: str, display: str) -> str:
@@ -85,7 +86,7 @@ def _pack_buttons(platform_name: str, label: str = "Pack", prefix: str = "../",
display = display or load_platform_config(platform_name, str(siteinputs.current().platforms)).get(
"platform", platform_name)
return f"{no_zip_line(display)} [Why no ZIP?]({prefix}{NO_ZIP_FAQ})"
record = release_record.load_advertised()
record = releaserecord.load_advertised()
buttons = download_links(
platform_name,
record,
@@ -204,7 +205,7 @@ def _share_tabs(name: str, share: str) -> tuple[dict[str, str], dict[str, str]]:
def _offline_line(name: str) -> list[str]:
"""The offline line, on a setup whose ZIP a release publishes: the
installer reads that ZIP with no network (`--from-pack`)."""
pack = release_record.pack_for(name, release_record.load_advertised())
pack = releaserecord.pack_for(name, releaserecord.load_advertised())
return [OFFLINE_LINE, ""] if pack and pack.get("assets") else []
@@ -291,7 +292,7 @@ def _computer_first(name: str, guide: Guide) -> bool:
"""A system that runs only on its own device, with a ZIP to download: a
beginner fills its folder from a computer more easily than from a
terminal on the TV. Without a ZIP the command is the only route."""
pack = release_record.pack_for(name, release_record.load_advertised())
pack = releaserecord.pack_for(name, releaserecord.load_advertised())
return guide.run == ("device",) and bool(pack and pack.get("assets"))
@@ -309,8 +310,8 @@ def _guide_download(name: str, display: str, guide: Guide, extract_to: str | Non
heading: str) -> list[str]:
"""The pack: its buttons, its size, and where it is unzipped."""
lines = [heading, ""]
record = release_record.load_advertised()
pack = release_record.pack_for(name, record)
record = releaserecord.load_advertised()
pack = releaserecord.pack_for(name, record)
network = any(label.startswith("From ") for label, _path in guide.folders)
if pack and pack.get("assets"):
parts = len(pack["assets"])
@@ -457,7 +458,7 @@ def generate_handheld_guide(guide: HandheldGuide) -> str:
*_offline_line(guide.uses),
f"On {sitehandheld.joined(sitehandheld.group_systems(), 'or')}: "
f"[{sitehandheld.GROUP_TITLE}]"
f"(../get/{sitehandheld.GROUP_PAGE}.md).",
f"(../get/{GROUP_PAGE}.md).",
"",
"## Fill the card from a computer { #install }",
"",
+12 -119
View File
@@ -8,86 +8,30 @@ get/handheld/, beside the bootstraps that pin the same installer
does not pin: a stale pin stops the site build, the last good archives
staying served.
LAUNCHERS is the one description of where each archive goes on the card
and which menu starts it. The handheld tables of wiki/installer.md are
written from it (scripts/generate_installer_doc.py), and so is the block
each get/<platform>/ page and the handheld page carry.
LAUNCHERS (installer_build/handhelds.py) is the one description of where
each archive goes on the card and which menu starts it. The handheld
tables of wiki/installer.md are written from it, and so is the block each
get/<platform>/ page and the handheld page carry, written here.
"""
from __future__ import annotations
import hashlib
import tempfile
from dataclasses import dataclass, field
from dataclasses import dataclass
from pathlib import Path
from sitegen import markup
from core.artifacts import write_bytes_atomic
from build_port import ARCHIVES, BATOCERA_ZIP, MUOS_APP, PORT_ZIP, TOOLS_ZIP, build_archive
from core.paths import REPO_ROOT
# Below the site's root: get/handheld/RetroBIOS.zip.
SERVED_DIR = "get/handheld"
# The page of the systems no registered platform answers for. It shares
# its name with the handheld guide (platforms/linux-handhelds.md), so the
# sidebar files it with that guide, as get/batocera.md is with
# platforms/batocera.md.
GROUP_PAGE = "linux-handhelds"
GROUP_TITLE = "RetroBIOS app for handhelds"
@dataclass(frozen=True)
class Launcher:
"""One row of the installer's handheld table.
*systems* are named as the installer page names them. *copy_to* is
where the file goes, and *places* gives a system its own folder when
the row's systems differ there. *lead* opens the row's first cell.
"""
archive: str
systems: tuple[str, ...]
copy_to: str
start: str
extracted: bool = False
lead: str = ""
places: tuple[tuple[str, tuple[str, ...]], ...] = field(default=())
def folder_for(self, system: str) -> str:
return next((folder for folder, systems in self.places if system in systems),
self.copy_to)
LAUNCHERS: tuple[Launcher, ...] = (
Launcher(MUOS_APP, ("muOS",),
"`ARCHIVE` at the root of the card, then install it from the Archive Manager",
"Applications"),
Launcher(PORT_ZIP, ("ArkOS", "dArkOS", "ROCKNIX", "AmberELEC", "JELOS", "KNULLI"),
"PortMaster's `autoinstall` folder", "Ports, after opening PortMaster once",
lead="Any other system with [PortMaster](https://portmaster.games/)",
places=(("`/roms/ports/PortMaster/autoinstall/`", ("ROCKNIX", "AmberELEC")),
("`/roms/tools/PortMaster/autoinstall/`", ("ArkOS",)),
("`/userdata/system/.local/share/PortMaster/autoinstall/`", ("KNULLI",)))),
Launcher(BATOCERA_ZIP, ("Batocera", "KNULLI"), "`roms/ports` on the SHARE partition",
"Ports, after updating the game list", extracted=True),
Launcher(TOOLS_ZIP, ("ArkOS", "dArkOS"), "`tools` on the EASYROMS partition",
"Options, then Tools", extracted=True),
Launcher(TOOLS_ZIP, ("ROCKNIX", "JELOS"),
"`/storage/.config/modules`, over the network share or SSH", "Tools",
extracted=True),
Launcher(TOOLS_ZIP, ("AmberELEC",), "`/storage/.config/distribution/modules`", "Tools",
extracted=True),
from installer_build.port import (
ARCHIVES,
PORT_ZIP,
build_archive,
)
from core.paths import REPO_ROOT
from installer_build.handhelds import Launcher, PLATFORM_OF, SERVED_DIR, launchers_for, systems
# The registered platform whose get/ page answers for a system. A system
# outside this map is on the handheld page.
PLATFORM_OF = {"Batocera": "batocera", "KNULLI": "knulli", "ROCKNIX": "rocknix",
"AmberELEC": "amberelec"}
def systems() -> list[str]:
"""Every system a launcher runs on, in table order."""
return list(dict.fromkeys(name for launcher in LAUNCHERS for name in launcher.systems))
GROUP_TITLE = "RetroBIOS app for handhelds"
def group_systems() -> list[str]:
@@ -99,17 +43,6 @@ def joined(names: list[str], last: str = "and") -> str:
return names[0] if len(names) == 1 else f"{', '.join(names[:-1])} {last} {names[-1]}"
def page_of(system: str) -> str:
"""The site page that holds the download for *system*."""
return f"get/{PLATFORM_OF.get(system, GROUP_PAGE)}.md"
def launchers_for(system: str) -> list[Launcher]:
"""The launchers of *system*, its own menu first and PortMaster last."""
own = [launcher for launcher in LAUNCHERS if system in launcher.systems]
return sorted(own, key=lambda launcher: launcher.archive == PORT_ZIP)
@dataclass(frozen=True)
class Served:
data: bytes
@@ -155,46 +88,6 @@ def write_launchers(public: Path, root: Path = REPO_ROOT) -> list[Path]:
return written
def table_rows() -> list[str]:
"""The handheld table of the installer page, each system linked to the
page that holds its download. The page sits in wiki/."""
def name(system: str) -> str:
return f"[{system}](../{page_of(system)})"
rows = ["| System | File | Copy it to | Start it from |",
"|--------|------|------------|---------------|"]
for launcher in LAUNCHERS:
names = ", ".join(name(system) for system in launcher.systems)
first = f"{launcher.lead}: {names}" if launcher.lead else names
file = f"`{launcher.archive}`" + (", extracted" if launcher.extracted else "")
copy_to = launcher.copy_to
if launcher.places:
copy_to += ": " + ", ".join(
f"{folder} on {' and '.join(where)}" for folder, where in launcher.places)
rows.append(f"| {first} | {file} | {copy_to} | {launcher.start} |")
return rows
def _anchor(system: str) -> str:
"""Where *system*'s downloads sit on its page."""
return "on-the-handheld" if system in PLATFORM_OF else system.casefold()
def download_rows() -> list[str]:
"""The short table that opens the installer's handheld section: each
system, its files as links to the site's copies, and its page. The
page sits in wiki/."""
rows = ["| System | Download | Steps |", "|--------|----------|-------|"]
for system in systems():
files = ", ".join(
f"[{launcher.archive}](../{SERVED_DIR}/{launcher.archive})"
+ (" (PortMaster)" if launcher.archive == PORT_ZIP else "")
for launcher in launchers_for(system))
page = f"../{page_of(system)}#{_anchor(system)}"
rows.append(f"| {system} | {files} | [{system} steps]({page}) |")
return rows
def _launcher_block(launcher: Launcher, system: str, root: Path) -> list[str]:
archive = served(launcher.archive, root)
verb = "Unzip it into" if launcher.extracted else "Copy it to"
+2 -2
View File
@@ -2,7 +2,7 @@
from __future__ import annotations
import release_record
from model import releaserecord
from model.guides import DEVICE_GROUPS, GROUP_TILES, GUIDES
from resolve.nativemode import check_label
from sitegen import markup
@@ -66,7 +66,7 @@ def setup_table(coverages: dict) -> list[str]:
]
for name, cov in sorted(coverages.items(), key=lambda item: item[1]["platform"].casefold()):
listed = f"{cov['total']:,}" if cov["total"] else "No list of its own"
files, _size = release_totals(name, release_record.load_advertised())
files, _size = release_totals(name, releaserecord.load_advertised())
zipped = (f"{files:,}" if files
else "No ZIP yet" if has_release_pack(name) else "No ZIP")
lines.append(
+2 -2
View File
@@ -6,7 +6,7 @@ import json
import shutil
from pathlib import Path
import release_record
from model import releaserecord
from sitegen.config import _REPO_ROOT
from sitegen.write import _record, write_if_changed
@@ -21,7 +21,7 @@ def write_release_advertised(generated: Path) -> None:
generated.mkdir(parents=True, exist_ok=True)
write_if_changed(
str(generated / "release-advertised.json"),
json.dumps(release_record.load_advertised(), ensure_ascii=False, indent=1,
json.dumps(releaserecord.load_advertised(), ensure_ascii=False, indent=1,
sort_keys=True) + "\n",
)
+9 -9
View File
@@ -12,8 +12,8 @@ from pathlib import Path
from types import ModuleType
from romrecipes import ledger
import pr_checks
import release_record
from devtools import prchecks
from model import releaserecord
from core.artifacts import write_if_changed
from core.cli import InputMissing
from core.github import github_token
@@ -247,7 +247,7 @@ def release_totals(platform_name: str, record: dict) -> tuple[int | None, int |
lands after the release. Returns (None, None) for a platform the release
carries no pack for.
"""
pack = release_record.pack_for(platform_name, record)
pack = releaserecord.pack_for(platform_name, record)
if not pack:
return None, None
return pack["files"], pack["extracted_size"]
@@ -271,7 +271,7 @@ def asset_links(
*button* the function that draws each link as a button. Without a
recorded release the link is the latest release page.
"""
pack = release_record.pack_for(platform_name, record)
pack = releaserecord.pack_for(platform_name, record)
tag = record.get("tag")
assets = pack.get("assets") if pack else None
def link(text: str, url: str) -> str:
@@ -308,13 +308,13 @@ def download_links(
get/ address hangs from, or *page* the address itself as the site links
it, and *attrs* and *button* style the link.
"""
page = page or release_record.get_page(platform_name, site)
page = page or releaserecord.get_page(platform_name, site)
def link(text: str) -> str:
return button(text, page) if button else f"[{text}]({page}){attrs}"
if (load_platform_registry(platforms_dir).get(platform_name) or {}).get("release_pack") is not True:
return link(NO_PACK)
pack = release_record.pack_for(platform_name, record)
pack = releaserecord.pack_for(platform_name, record)
if record.get("tag") and not (pack and pack.get("assets")):
return f"No ZIP yet: {link(NO_PACK.lower())}"
return link(label)
@@ -619,7 +619,7 @@ def generate_readme(db: dict, platforms_dir: str, db_path: str = "database.json"
# the project does, gives the one line that installs, shows it, and leads
# on to the site, where every detail lives. The figures and the lists it
# once carried (coverage, collection, build commands) are the site's.
record = release_record.load_advertised(platforms_dir=platforms_dir)
record = releaserecord.load_advertised(platforms_dir=platforms_dir)
extract_paths = _extract_cells(platforms_dir)
released = [name for name in sorted(coverages, key=lambda n: coverages[n]["platform"])
if release_totals(name, record)[0]]
@@ -833,8 +833,8 @@ def contributing_text(
.md for the site); *site_words* names the site from where the text is read.
"""
pip_line, floor_line = ci_install_lines()
width = max(len(pr_checks.shown(step)) for step in pr_checks.STEPS)
steps = "\n".join(f"{pr_checks.shown(step):<{width}} # {step.why}" for step in pr_checks.STEPS)
width = max(len(prchecks.shown(step)) for step in prchecks.STEPS)
steps = "\n".join(f"{prchecks.shown(step):<{width}} # {step.why}" for step in prchecks.STEPS)
return f"""{title}
## Add a BIOS file
+4 -4
View File
@@ -419,23 +419,23 @@ def _check_get_pages(
recorded tag, and one without links none and gives the command.
"""
sys.path.insert(0, str(Path(__file__).resolve().parent))
import release_record
from model import releaserecord
from model.guides import INSTALL_SH
from model.registry import list_registered_platforms, list_release_pack_platforms
if not (platforms_dir / "_registry.yml").is_file():
return [f"no platform registry in {platforms_dir}"]
record = release_record.load_advertised(record_path, str(platforms_dir))
record = releaserecord.load_advertised(record_path, str(platforms_dir))
released = set(list_release_pack_platforms(str(platforms_dir)))
issues: list[str] = []
for platform in list_registered_platforms(str(platforms_dir)):
rel = f"{release_record.GET_DIR}/{platform}/index.html"
rel = f"{releaserecord.GET_DIR}/{platform}/index.html"
page = pages.get((site / rel).resolve())
if page is None or page.redirect:
issues.append(f"{rel}: no download page for {platform}")
continue
assets = [link for link in page.links if link.startswith(RELEASE_DOWNLOAD)]
pack = release_record.pack_for(platform, record)
pack = releaserecord.pack_for(platform, record)
if platform in released and pack:
expected = {f"{RELEASE_DOWNLOAD}{record['tag']}/{a}" for a in pack["assets"]}
missing = sorted(expected - set(assets))
+3 -3
View File
@@ -5,7 +5,7 @@ from __future__ import annotations
import re
from datetime import datetime
import release_record
from model import releaserecord
from model import siteinputs
from model.composition import count_catalog_matched
from model.platforms import load_platform_config
@@ -67,7 +67,7 @@ def release_line(platform_name: str, record: dict) -> list[str]:
"""Which release the buttons serve, with its checksums and signature, and
the version gap when the page describes a newer platform than the pack."""
tag = record.get("tag")
pack_name = release_record.pack_name_for(platform_name, record)
pack_name = releaserecord.pack_name_for(platform_name, record)
if not tag or not pack_name:
return []
base = f"{REPO_URL}/releases/download/{tag}"
@@ -107,7 +107,7 @@ def setup_version(platform_name: str, record: dict | None = None) -> str:
config = load_platform_config(platform_name, str(siteinputs.current().platforms))
except FileNotFoundError:
return ""
pack_name = release_record.pack_name_for(platform_name, record or {})
pack_name = releaserecord.pack_name_for(platform_name, record or {})
version = (
_pack_version(pack_name, _pack_platforms(platform_name, record or {}, pack_name))
if pack_name else ""
+5 -5
View File
@@ -2,7 +2,7 @@
from __future__ import annotations
import release_record
from model import releaserecord
from core.paths import REPO_ROOT
from core.ziptools import build_zip_contents_index
from model import siteinputs
@@ -78,7 +78,7 @@ def _pack_cell(name: str, record: dict, prefix: str = "") -> str:
"""The pack's parts and size, or the command where the release has none."""
if not has_release_pack(name):
return f"No ZIP. [{NO_PACK}]({prefix}platforms/{name}.md#install)."
pack = release_record.pack_for(name, record)
pack = releaserecord.pack_for(name, record)
if record.get("tag") and not (pack and pack.get("assets")):
return f"No ZIP yet. [{NO_PACK}]({prefix}platforms/{name}.md#install)."
# One small button to the setup's get/ page, which lists every part, and
@@ -108,7 +108,7 @@ def _folder_row(key: str, display: dict[str, str], registry: dict, record: dict,
whose ZIP holds its own top folder says where to unzip it, and the
BIOS folder itself when it has no ZIP to unzip."""
guide = GUIDES[key]
pack = release_record.pack_for(key, record)
pack = releaserecord.pack_for(key, record)
zipped = bool(pack and pack.get("assets"))
folder = (f"Unzip into `{own_root[key]}`" if key in own_root and zipped
else _folder_cell(key, guide))
@@ -197,7 +197,7 @@ def generate_which_pack() -> str:
The tiles are the choice. Open tables under them listed every setup a
second time and made the page 11,800 px tall on a phone."""
registry = load_platform_registry(str(siteinputs.current().platforms))
record = release_record.load_advertised()
record = releaserecord.load_advertised()
display = {key: load_platform_config(key, str(siteinputs.current().platforms)).get("platform", key)
for key in registry}
all_tabs = ("windows", "macos", "linux", "steamdeck", "android")
@@ -235,7 +235,7 @@ def generate_which_pack() -> str:
_folder_tables(registry, record, display)),
]
pending = any(has_release_pack(key) and not (pack and pack.get("assets"))
for key, pack in ((key, release_record.pack_for(key, record)) for key in registry))
for key, pack in ((key, releaserecord.pack_for(key, record)) for key in registry))
if record.get("tag") and pending:
lines += ["Setups added after the last release have no ZIP until the next one.", ""]
lines += ["No ZIP on a row: the command serves that setup. ZIPs are made for the "