Nothing here changes what a tool computes; it changes where tools look. - tools/re-capture: 33 censuses globbed /work/sylph_extract, a path that has existed nowhere since /work became a clone, so they matched nothing and printed empty results. They now resolve the disc through a new disc.py from $SYLPHEED_DISC and exit loudly without it (the #44 fix, generalised). Nine scripts that imported siblings from the retired Reborn checkout or an old session scratchpad now import from their own directory. unitgroup.py only needs the variable when --pak is not given. - sylpheed-xex: the loader only ever uses the XEX2 retail key. The dead devkit key and a doc comment claiming a devkit fallback that does not exist are gone; Project Sylpheed is a retail XEX2, so no XEX1 key either. - sylpheed-viewer: real_font_rasterizes looked for /tmp/sylph_extract and so always skipped. It reads $SYLPHEED_DISC now, and passes against the disc. - Comments and docs that named xenia-rs, the Reborn repository or /work/*.pe as places to look now name sylpheed.db, Canary's ppc_context.h and the flat .pe; docs/re/README.md no longer says the native Canary build does not run. Historical records keep their original paths: findings that were measured against /work/xenia-rs/sylpheed.db still say so. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
22 lines
836 B
Python
22 lines
836 B
Python
"""Where the extracted disc is: `$SYLPHEED_DISC`, or a loud error.
|
|
|
|
The censuses in this directory used to glob `/work/sylph_extract`, a path that
|
|
stopped existing when `/work` became a clone of this repository. A glob over a
|
|
missing directory matches nothing, so those scripts printed empty results instead
|
|
of failing (see `name_block_bases.py`). Resolve the disc here so that cannot
|
|
happen quietly again.
|
|
"""
|
|
import os
|
|
import sys
|
|
|
|
|
|
def disc_root():
|
|
"""The extracted disc's root — the directory holding `dat/` and `hidden/`."""
|
|
root = os.environ.get("SYLPHEED_DISC")
|
|
if not root or not os.path.isdir(os.path.join(root, "dat")):
|
|
sys.exit(
|
|
f"SYLPHEED_DISC={root!r} is not an extracted disc (no dat/ inside). "
|
|
"Set it to the directory that holds dat/ and hidden/."
|
|
)
|
|
return root
|