#!/bin/bash # Ensure the Windows target is installed rustup target add x86_64-pc-windows-gnu # Check for mingw-w64 if ! command -v x86_64-w64-mingw32-gcc &> /dev/null then echo "Error: x86_64-w64-mingw32-gcc not found." echo "Install it via your package manager (e.g., sudo apt install mingw-w64)" exit 1 fi # Build for Windows cargo build --release --target x86_64-pc-windows-gnu echo "-----------------------------------" echo "Build complete." echo "Windows binary: target/x86_64-pc-windows-gnu/release/esp32p4-waveform-gui.exe"