Here's how it's done:
- Install Windows Python 2.7 or 3.5 (the packager doesn't work right with Python 3.6 yet) along with with esptool.py's usual dependencies (e.g., pyserial)
- Install pyinstaller (adjust for your Python version):
Code: Select all
pip3.5 install pyinstaller
- Build the exe (your paths may vary):
- Example in MSYS2 shell:
Code: Select all
rm -rf build_tmp mkdir build_tmp /c/python35/scripts/pyinstaller \ --onefile \ --specpath build_tmp \ --workpath build_tmp/build \ --distpath build_tmp/dist \ /c/esp-idf/components/esptool_py/esptool/esptool.py # Output: build_tmp/dist/esptool.exe # Typical esptool.exe location used by Arduino-ESP32: # /c/Users/$USER/Documents/Arduino/hardware/espressif/esp32/tools/esptool.exe
- Example in Windows cmd shell:
Code: Select all
rmdir /s /q build_tmp mkdir build_tmp C:\Python35\scripts\pyinstaller ^ --onefile ^ --specpath build_tmp ^ --workpath build_tmp\build ^ --distpath build_tmp\dist ^ C:\esp-idf\components\esptool_py\esptool\esptool.py # Output: build_tmp\dist\esptool.exe # Typical esptool.exe location used by Arduino-ESP32: # C:\Users\%USERNAME%\Documents\Arduino\hardware\espressif\esp32\tools\esptool.exe
- Example in MSYS2 shell: