Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove embedded flasher binaries #474

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

fauxpark
Copy link
Member

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

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Documentation

Issues Fixed or Closed by This PR

@fauxpark fauxpark changed the title [Windows] Remove embedded flasher binaries Remove embedded flasher binaries Apr 29, 2024
@fauxpark fauxpark mentioned this pull request May 29, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant