adding web flasher tool
This commit is contained in:
45
flash_tool/build_macos.sh
Executable file
45
flash_tool/build_macos.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user