Fix Windows compatibility: encoding, installer hints, interpreter name
- watch.py: drop the ⚠️ emoji from the long-video warning; cp1252 consoles on Windows couldn't encode it and the script crashed. - setup.py: add a Windows branch that prints winget / pip install commands, matching what the README already promised. - SKILL.md: note that Windows users must invoke the scripts with `python`, not `python3` (which is the Microsoft Store stub). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -186,6 +186,16 @@ def _install_hint_linux(missing: list[str]) -> str:
|
||||
return "\n ".join(hints) if hints else "nothing to install"
|
||||
|
||||
|
||||
def _install_hint_windows(missing: list[str]) -> str:
|
||||
pkgs = _brew_pkg(missing)
|
||||
hints = []
|
||||
if "ffmpeg" in pkgs:
|
||||
hints.append("winget: `winget install Gyan.FFmpeg`")
|
||||
if "yt-dlp" in pkgs:
|
||||
hints.append("winget: `winget install yt-dlp.yt-dlp` or pip: `pip install --user yt-dlp`")
|
||||
return "\n ".join(hints) if hints else "nothing to install"
|
||||
|
||||
|
||||
def _status() -> dict:
|
||||
"""Structured preflight snapshot."""
|
||||
missing = _check_binaries()
|
||||
@@ -268,6 +278,10 @@ def cmd_install() -> int:
|
||||
print("[setup] dependencies missing on Linux — please install:", file=sys.stderr)
|
||||
print(" " + _install_hint_linux(missing), file=sys.stderr)
|
||||
return 2
|
||||
elif system == "Windows":
|
||||
print("[setup] dependencies missing on Windows — please install:", file=sys.stderr)
|
||||
print(" " + _install_hint_windows(missing), file=sys.stderr)
|
||||
return 2
|
||||
else:
|
||||
print(f"[setup] unsupported platform ({system}) for auto-install. Install manually:", file=sys.stderr)
|
||||
print(f" missing: {', '.join(missing)}", file=sys.stderr)
|
||||
|
||||
Reference in New Issue
Block a user