FEnigma/install.sh
Dominik Roth 489f59bcce Rename the display name from FeNigma to FEnigma
FEnigma contains the whole word "enigma" while still opening on Fe (iron),
matching IRON NEST; FeNigma only contained "nigma". The cost is that iron's
symbol is Fe, not FE.

Code paths are untouched: the Python package stays lowercase `fenigma`, and
the git remote URL is unchanged since the repository itself has not been
renamed. APP_ID moved too, which is safe -- it is only the GTK application
id, with no saved state derived from it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 21:42:07 +02:00

36 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
# Set up FEnigma: a venv for the pip deps, plus checks for the system
# packages that can't come from pip (GTK4/libadwaita bindings, tesseract).
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
missing=()
python3 -c "import gi; gi.require_version('Gtk', '4.0'); gi.require_version('Adw', '1')" 2>/dev/null \
|| missing+=("PyGObject (GTK4 + libadwaita bindings)")
command -v tesseract >/dev/null 2>&1 || missing+=("tesseract")
if [ "${#missing[@]}" -gt 0 ]; then
echo "Missing system packages:"
for m in "${missing[@]}"; do echo " - $m"; done
echo
echo "These come from your distro's package manager, not pip. For example:"
echo " Fedora: sudo dnf install python3-gobject gtk4 libadwaita tesseract"
echo " Debian/Ubuntu: sudo apt install python3-gi gir1.2-gtk-4.0 gir1.2-adw-1 tesseract-ocr"
echo " Arch: sudo pacman -S python-gobject gtk4 libadwaita tesseract"
echo
echo "Install those, then re-run this script."
exit 1
fi
# --system-site-packages so the venv can still see the system-installed
# PyGObject above (pip can't build it reliably) while everything else in
# requirements.txt installs normally into the venv.
python3 -m venv --system-site-packages .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -r requirements.txt
echo
echo "Done. Run the app with ./run.sh"