- Implemented a new command `generate_overlay_from_dtb` to generate a panel overlay from a user-provided stock DTB file using a bundled Python script (`archr-dtbo.py`).
- Added a command `apply_custom_overlay` to apply a custom-generated overlay to an existing SD card.
- Introduced a new command `get_version` to retrieve the application version.
- Updated the Tauri configuration to include the new Python script as a resource and adjusted window dimensions.
- Enhanced UI text for custom DTB functionality in multiple languages.
- Added a Windows 7 compatibility shim (`win7_shim.c`) to handle the absence of `bcryptprimitives.dll` gracefully.
- Updated the main JavaScript logic to handle the new overlay generation and application flow.
Reorder UI: console selection (step 1) now comes before image
download (step 2), since each variant has its own image.
Switching console clears any previously downloaded image.
Image matching updated for simplified naming:
original → ArchR-R36S-YYYYMMDD.img.xz
clone → ArchR-R36S-clone-YYYYMMDD.img.xz
Other changes:
- Add tauri-plugin-updater + tauri-plugin-process for auto-updates
- Add check_app_update / install_app_update commands
- Linux flash: O_DIRECT fallback, aggressive unmount, fs.protected_regular fix
- Remove dead i18n key (select_console_first)
- All panels set is_default: false (Flasher handles selection)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Some USB SD card readers don't support O_DIRECT, causing dd to fail
immediately with EINVAL. Now tries O_DIRECT first and falls back to
normal write if dd exits within 1 second.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Linux:
- Escalating unmount strategy (RPi Imager technique): normal umount,
then lazy (MNT_DETACH), then force (MNT_FORCE). Prevents "device busy".
- O_DIRECT via dd oflag=direct: bypasses page cache for reliable writes,
same approach RPi Imager uses with open(O_DIRECT).
macOS:
- Force unmount via "diskutil unmountDisk force" (equivalent to RPi Imager's
kDADiskUnmountOptionForce in DiskArbitration framework). Applied both in
the Rust pre-unmount step and inside the elevated flash script.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Major Windows flash rewrite inspired by studying Rufus source code:
- Add admin manifest (requireAdministrator) so the app requests UAC once
at startup, like Rufus does. Eliminates ALL runtime elevation complexity:
no more Start-Process -Verb RunAs, no EncodedCommand, no base64,
no result marker files, no multi-layer exit code propagation.
- Replace diskpart with Clear-Disk cmdlet (Rufus technique: handles volume
lock + dismount + MBR/GPT clearing in one call, equivalent to
FSCTL_LOCK_VOLUME + FSCTL_DISMOUNT_VOLUME + zeroing MBR/GPT).
- Replace diskpart rescan with Update-Disk cmdlet (Rufus technique:
equivalent to IOCTL_DISK_UPDATE_PROPERTIES).
- Write retry with file pointer reposition on failure (Rufus technique:
4 attempts, 5s delay, reposition to last known good offset).
- FileStream open retry: 4 attempts with 5s delay (was 3 with 3s).
- Remove base64 crate dependency (no longer needed without EncodedCommand).
- Net result: 32 fewer lines, zero visible windows, more reliable writes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>