Fix missing _is_not_supported and harden WinUSB config cache

Restores the helper accidentally removed when adding access-denied
handling, retries I/O after seeding pyusb config index on Windows, and
handles USB overflow reads without crashing the HELLO loop.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
joyharam
2026-07-15 11:20:59 +09:00
parent d9c0b8078c
commit 7627c17653
4 changed files with 132 additions and 5 deletions
Executable
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# JUC500 GUI 실행 (인자 없으면 GUI, 있으면 CLI로 전달)
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
cd "$ROOT"
if [[ -x "$ROOT/.venv/bin/python" ]]; then
PY="$ROOT/.venv/bin/python"
elif command -v python3 >/dev/null 2>&1; then
PY="$(command -v python3)"
else
echo "Python3 가 없습니다. 먼저 설치하세요:" >&2
echo " ./scripts/setup_macos.sh" >&2
exit 1
fi
if [[ ! -x "$ROOT/.venv/bin/python" ]]; then
echo "경고: .venv 없음 — 시스템 Python 사용. 문제가 있으면 ./scripts/setup_macos.sh" >&2
fi
export PYTHONPATH="$ROOT${PYTHONPATH:+:$PYTHONPATH}"
# 의존성 빠른 확인
if ! "$PY" -c "import usb" 2>/dev/null; then
echo "pyusb 가 없습니다. 먼저 설치하세요:" >&2
echo " ./scripts/setup_macos.sh" >&2
exit 1
fi
exec "$PY" "$ROOT/juc500_app.py" "$@"