Skip to content

feat: let the user choose where built firmware is saved - #800

Open
Raffi1202 wants to merge 2 commits into
ExpressLRS:masterfrom
Raffi1202:feature/firmware-output-folder
Open

Raffi1202 wants to merge 2 commits into
ExpressLRS:masterfrom
Raffi1202:feature/firmware-output-folder

Conversation

@Raffi1202

Copy link
Copy Markdown

Problem

Firmware built with the Build job type (for example a WiFi build, where the
binary is uploaded through the device's web interface afterwards) is copied into
a temporary directory created with os.tmpdir() and that directory is opened in
the file explorer.

The operating system cleans temporary directories up, so the binary has to be
moved somewhere safe manually, out of a path like
C:\Users\<user>\AppData\Local\Temp\TX_ESP32_a7f3k2\, before it disappears.
There is currently no way to tell the configurator where builds should end up.

Change

The destination of a build is now configurable in Settings → Firmware Output
Folder
:

  • Ask me where to save after every build (default) – a folder selection
    dialog is shown after every successful build
  • Always save into the same folder – builds are copied into a folder chosen
    once, without further interaction
  • Temporary folder – previous behaviour

In the first two modes a folder named after the firmware is created inside the
selected location (D:\ELRS\MyTX-3.5.6\), so builds do not overwrite each
other, and every artefact of the build is copied into it. The file explorer is
opened at the new location, exactly as it was before.

Cancelling the dialog leaves the firmware in the temporary folder, so nothing is
lost if the dialog is dismissed by accident.

Notes

  • Only the Build job type is affected; flashing is untouched, since
    firmwareBinPath is only returned for builds.
  • The copying itself happens in the main process (new SAVE_BUILD_OUTPUT IPC
    handler), the renderer only passes the localized dialog strings.
  • CHOOSE_FOLDER accepts an optional title/message/default path now, so the
    settings screen can reuse it. Existing callers are unaffected.
  • The setting is persisted in local storage next to the other application
    options.
  • Only en translations are added, the remaining locales are managed by
    Crowdin.

If preferring no behaviour change out of the box, the default mode can be
switched to FirmwareOutputMode.TemporaryFolder in AppStateProvider — happy
to change that if you would rather have this opt-in.

Testing

  • yarn typecheck and yarn lint: no new errors
  • Ran the configurator from source on Windows 11

–Raphael Hunziker added 2 commits August 20, 2026 07:40
Firmware built with the "Build" job type was copied into a temporary
folder and that folder was opened in the file explorer. Temporary
folders are cleaned up by the operating system, so users doing a WiFi
build had to move the binary out of an obscure path before it was gone.

The destination is now configurable in the settings screen:

- ask every time (default): a folder selection dialog is shown after
  every successful build
- always save into the same folder: firmware is copied there without
  further interaction
- temporary folder: previous behaviour

In the first two modes a folder named after the firmware is created in
the selected location, so builds do not overwrite each other, and the
file explorer is opened at the new location as before. Flashing jobs are
not affected.
Build artefacts are not always named after the device target: a WiFi
build produces a plain "firmware.bin.gz", which resulted in an output
folder called "firmware" that gives no hint about what is inside.

The renderer now passes the device target and the firmware version along
with the save request, so the folder becomes something like
"Happymodel_EP_2400_RX_via_WIFI-3.5.6". The firmware filename is still
used as a fallback when the target is unknown.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant