Check at startup that the launcher's Python can read zstd files, and say how to fix it when it cannot.

Run from a checkout, the launcher uses the Python that started it. A Python older than 3.14 without the zstandard
package got through the first-run screen and stopped at Gather Build Tools with only "No module named 'zstandard'",
after the packages were downloaded. toolchain.zstd_missing now looks for compression.zstd or zstandard when the
launcher starts. Without either, the log and the first screen name the Python and give the pip line for
tools/requirements-launcher.txt, and Gather Build Tools stops with the same message before it unpacks anything. A
release's own Python always has the package; if it ever lacks it, the message says to reinstall NX2navi.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-12 07:16:14 -05:00
parent ee46a19ede
commit d2ab9a00be
6 changed files with 48 additions and 0 deletions

View File

@@ -744,6 +744,8 @@ class App:
self.ctx.log(f'the stub went back from {a.rolled_back} to {self.layout.version}')
self.settings['rolled_back'] = versions.display(a.rolled_back) # never installed again by itself
self.settings.save()
if self.ctx.zstd_missing: # told at once, not when Begin Installation stops at the build tools
self.message = self.ctx.zstd_missing
for old in self.layout.root.glob('python.old*'): # the Python an update replaced (launcher/native/nx2navi.c)
shutil.rmtree(old, ignore_errors=True)
if gd or self.settings.get('dump'):