Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There are several problems with this approach of bundling the flasher binaries with the Toolbox, and I feel it has gotten a little out of hand.
Firstly, it is probably violating some kind of licensing thing to be distributing these binaries, though I'm not 100% sure of that. I don't really like it either way.
The binaries themselves are difficult to maintain: on the macOS side, they need to be slightly modified (!) from the Homebrew bottle tarballs to fix the dylib references (Homebrew itself also does this as the user's install path may not be the default). Obtaining the tarballs from GitHub Packages in the first place is not trivial.
With the advent of Apple Silicon, the flasher binaries (since they are taken from Intel bottles) do not even work on an M1 Mac without Rosetta installed, and manually creating universal binaries is out of the question due to signing issues.
For Windows, the tarballs are much more easily procured from the MSYS2 package DB site, and do not really need any modification, but avrdude in particular seems to need more and more DLLs with every release, which then need to be added to the project. Additionally, the files also need to be extracted from the Toolbox .exe before they can be used. These are never cleaned up from the versioned AppData folders when a new version is installed, nor are they replaced if they already exist.
Therefore, I've decided to remove the binaries from the Toolbox; moving forward it will simply expect them to be available elsewhere. On Windows this is currently hardcoded to the default QMK MSYS install path (
C:\QMK_MSYS\mingw64\bin
), on macOS it will try the default Homebrew install paths (/usr/local/bin
for Intel,/opt/homebrew/bin
for ARM). This can be made more intelligent/configurable later.This way, the Toolbox does not need to keep up with new releases of each flashing tool, and can focus more on being a simplified interface for flashing boards.
Types of Changes
Issues Fixed or Closed by This PR