first commit

This commit is contained in:
drjones
2026-05-23 21:58:06 -07:00
commit 1f5e63ca1f
73 changed files with 13565 additions and 0 deletions

5
scripts/app_launcher.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
exec "$ROOT/scripts/run_proxy_god.sh"

38
scripts/find_tk_python.sh Executable file
View File

@@ -0,0 +1,38 @@
#!/usr/bin/env bash
set -euo pipefail
candidates=(
"${PYTHON:-}"
"/usr/local/bin/python3"
"/Library/Frameworks/Python.framework/Versions/Current/bin/python3"
"/Library/Frameworks/Python.framework/Versions/3.13/bin/python3"
"/Library/Frameworks/Python.framework/Versions/3.12/bin/python3"
"/usr/bin/python3"
"/opt/homebrew/bin/python3"
"python3"
)
seen=""
for py in "${candidates[@]}"; do
[[ -n "$py" ]] || continue
if [[ "$py" != /* ]]; then
resolved="$(command -v "$py" 2>/dev/null || true)"
else
resolved="$py"
fi
[[ -x "$resolved" ]] || continue
case ":$seen:" in
*":$resolved:"*) continue ;;
esac
seen="$seen:$resolved"
if "$resolved" - <<'PY' >/dev/null 2>&1
import tkinter
PY
then
printf '%s\n' "$resolved"
exit 0
fi
done
echo "No Python with tkinter support found. Install Python from python.org or a Tk-enabled Python runtime." >&2
exit 1

26
scripts/run_proxy_god.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT"
TK_PY="$("$ROOT/scripts/find_tk_python.sh")"
needs_rebuild=0
if [[ ! -x ".venv/bin/python" ]]; then
needs_rebuild=1
elif ! ".venv/bin/python" - <<'PY' >/dev/null 2>&1
import tkinter
PY
then
needs_rebuild=1
fi
if [[ "$needs_rebuild" == "1" ]]; then
rm -rf .venv
"$TK_PY" -m venv .venv
fi
".venv/bin/python" -m pip install --upgrade pip >/dev/null
".venv/bin/python" -m pip install -r requirements.txt >/dev/null
exec ".venv/bin/python" run.py