7627c17653
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>
31 lines
859 B
Bash
Executable File
31 lines
859 B
Bash
Executable File
#!/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" "$@"
|