46 lines
1.1 KiB
Bash
Executable File
46 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Build script for macOS executable
|
|
|
|
echo "=== ESP32 Flasher - macOS Build Script ==="
|
|
echo ""
|
|
|
|
# Check if running on macOS
|
|
if [[ "$OSTYPE" != "darwin"* ]]; then
|
|
echo "❌ Error: This script is for macOS only."
|
|
echo " Use build_from_spec.bat on Windows."
|
|
exit 1
|
|
fi
|
|
|
|
# Create virtual environment if it doesn't exist
|
|
if [ ! -d "venv" ]; then
|
|
echo "Creating virtual environment..."
|
|
python3 -m venv venv
|
|
fi
|
|
|
|
echo "Activating virtual environment..."
|
|
source venv/bin/activate
|
|
|
|
echo "Installing dependencies..."
|
|
pip install pyinstaller esptool pyserial
|
|
|
|
echo ""
|
|
echo "Building macOS application bundle..."
|
|
pyinstaller ESP32_Flasher_macOS.spec
|
|
|
|
echo ""
|
|
if [ -d "dist/ESP32_Flasher.app" ]; then
|
|
echo "✓ Build complete!"
|
|
echo ""
|
|
echo "Application created at: dist/ESP32_Flasher.app"
|
|
echo ""
|
|
echo "To run the application:"
|
|
echo " open dist/ESP32_Flasher.app"
|
|
echo ""
|
|
echo "To distribute, you can:"
|
|
echo " 1. Zip the .app bundle"
|
|
echo " 2. Create a DMG installer (requires additional tools)"
|
|
else
|
|
echo "❌ Build failed - application not found in dist folder"
|
|
exit 1
|
|
fi
|