Files
ytdlp-tui/packaging/build_pyinstaller.sh
ingo 1471a342d8 1) set the required textual version to version 8.2.8
2) generated installers which bundle the required .venv
2026-09-19 14:38:49 +02:00

29 lines
848 B
Bash
Executable File

#!/usr/bin/env bash
# Build a single-file, self-contained executable (bundled Python interpreter
# + Textual 8.2.8 + all deps + i18n data) using PyInstaller.
#
# Usage: packaging/build_pyinstaller.sh
# Output: dist/ytdlp-tui (or dist/ytdlp-tui.exe on Windows)
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
cd "$PROJECT_ROOT"
VENV_DIR=".build-venv-pyinstaller"
python3 -m venv "$VENV_DIR"
# shellcheck disable=SC1091
source "$VENV_DIR/bin/activate"
pip install --upgrade pip -q
pip install -r requirements-installer.txt -q
pip install "pyinstaller>=6.0" -q
pyinstaller --noconfirm --clean packaging/pyinstaller/ytdlp-tui.spec
deactivate
echo
echo "Built: dist/ytdlp-tui"
echo "Note: yt-dlp and ffmpeg are still required on PATH at runtime (see packaging/README.md)."