From 15f8c1d9f7b8592b80bd3d0227552dae73543a40 Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Mon, 8 Jun 2026 20:24:41 +0200 Subject: [PATCH] install: auto-install python3-gi and other missing apt deps Check for python3-gi (PyGObject), xdotool, libnotify-bin, and pipewire-bin before creating the venv; if any are missing, run sudo apt-get install automatically so the install works out of the box on a fresh system. Co-Authored-By: Claude Sonnet 4.6 --- linux/install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/linux/install.sh b/linux/install.sh index cc90f90..33d1832 100755 --- a/linux/install.sh +++ b/linux/install.sh @@ -14,15 +14,17 @@ BIN="$HOME/.local/bin/blitztext" echo "==> Checking host tools" need_pkg=() +# python3-gi (PyGObject) must come from apt — it can't be pip-installed. +python3 -c "import gi" 2>/dev/null || need_pkg+=("python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-appindicator3-0.1") command -v xdotool >/dev/null || need_pkg+=("xdotool") command -v notify-send >/dev/null || need_pkg+=("libnotify-bin") if ! command -v pw-record >/dev/null && ! command -v arecord >/dev/null && ! command -v parecord >/dev/null; then - need_pkg+=("pipewire-bin (or alsa-utils)") + need_pkg+=("pipewire-bin") fi if (( ${#need_pkg[@]} )); then - echo " Missing host tools: ${need_pkg[*]}" - echo " On Ubuntu/Debian: sudo apt install xdotool libnotify-bin pipewire-bin" - echo " (continuing — install them before running the app)" + echo " Missing system packages — installing now (requires sudo):" + echo " sudo apt install ${need_pkg[*]}" + sudo apt-get install -y "${need_pkg[@]}" fi echo "==> Creating venv at $VENV"