Files
led-tool/build.sh
jimmy accf8f06a5 Add LED tool: device, CLI, web UI, build scripts, and tests
- device.py: device communication/handling
- cli.py: CLI interface updates
- web.py: web interface
- build.py, build.sh, install.sh: build and install scripts
- Pipfile: Python dependencies
- lib/mpremote: mpremote library
- test_*.py: import and LED tests
- Updated .gitignore and README

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-01 16:00:04 +13:00

38 lines
970 B
Bash

#!/usr/bin/env bash
# Build script for creating binaries
set -e
echo "Building led-tool binaries..."
echo "================================"
# Check if we're in a pipenv environment or use pipenv run
if command -v pipenv &> /dev/null; then
echo "Using pipenv..."
pipenv install --dev
PYINSTALLER_CMD="pipenv run pyinstaller"
else
# Check if pyinstaller is available directly
if ! command -v pyinstaller &> /dev/null; then
echo "Installing PyInstaller..."
pip install pyinstaller
fi
PYINSTALLER_CMD="pyinstaller"
fi
# Build CLI binary using the spec file
echo ""
echo "Building CLI binary..."
$PYINSTALLER_CMD --clean led-cli.spec
echo ""
echo "================================"
echo "Build complete!"
echo "Binary location: dist/led-cli"
echo ""
echo "To test: ./dist/led-cli -h"
echo ""
echo "You can distribute the binary from the dist/ directory"
echo "without requiring Python to be installed on the target system."