-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild_release.sh
More file actions
32 lines (27 loc) · 968 Bytes
/
build_release.sh
File metadata and controls
32 lines (27 loc) · 968 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# build_release.sh — produces a single self-contained binary via PyInstaller
#
# Usage:
# pip install pyinstaller
# bash build_release.sh
#
# Output: dist/ascii_play (Linux/macOS) or dist/ascii_play.exe (Windows)
# The binary includes Python, numpy, imageio, and the bundled FFmpeg binary.
# End users need nothing installed — just run the binary.
set -e
echo "→ Installing build deps..."
pip install pyinstaller --quiet
# Find the imageio_ffmpeg bundled ffmpeg binary so PyInstaller can include it
FFMPEG_DIR=$(python -c "import imageio_ffmpeg, os; print(os.path.dirname(imageio_ffmpeg.__file__))")
echo "→ FFmpeg data dir: $FFMPEG_DIR"
pyinstaller \
--onefile \
--name ascii_play \
--add-data "$FFMPEG_DIR:imageio_ffmpeg" \
--hidden-import imageio_ffmpeg \
--hidden-import numpy \
--strip \
ascii_play/cli.py
echo ""
echo "✓ Build complete: dist/ascii_play"
echo " Size: $(du -sh dist/ascii_play | cut -f1)"