This repository was archived by the owner on Jan 29, 2026. It is now read-only.
Add Cross-Platform avrdude Download + Upload UX Improvements#15
Merged
StrongTheDev merged 1 commit intoStrongTheDev:mainfrom Apr 7, 2025
Merged
Add Cross-Platform avrdude Download + Upload UX Improvements#15StrongTheDev merged 1 commit intoStrongTheDev:mainfrom
StrongTheDev merged 1 commit intoStrongTheDev:mainfrom
Conversation
- Supports avrdude auto-download for Windows, Linux, and macOS - Detects and extracts zip/tar archives based on platform - Applies chmod for Unix avrdude binary post-extraction - Adds fallback to system avrdude if toolchain install skipped - Adds persistent upload settings with "Use Saved" prompt - Expands programmer dropdown (13+ avrdude types + "Custom...") - Handles 302 redirects via followRedirects() - Validates binary presence after extraction - Adds debug logging for troubleshooting - Refactors helpers for clarity and maintainability - Updates README.md with full documentation and final checklist ✅ Final Checklist: ✔ Platform-specific URLs & archive detection ✔ Clean decompress/tar extraction logic ✔ chmod support for Unix ✔ Fallback to system avrdude ✔ Upload settings UX prompt ✔ Post-install binary validation ✔ followRedirects() for GitHub ✔ Helpful console logs ✔ Modular, readable helper structure
StrongTheDev
approved these changes
Apr 7, 2025
Owner
StrongTheDev
left a comment
There was a problem hiding this comment.
These are my comments for this PR 👍
About crediting you on the page at the extension marketplace, just make a PR adding yourself to the authors tag in package.json, and I'll merge it.
"authors": [
{
"name": "Agani Daniel Strong",
"email": "aganidanielstrong@gmail.com",
"url": "https://github.com/StrongTheDev"
},
{
"name": "Alireza....",
"email": "alireza@example.com",
"url": "https://alireza.com"
}
],| let avrdudeUrl, archiveType; | ||
|
|
||
| if (platform === 'win32') { | ||
| avrdudeUrl = 'https://github.com/avrdudes/avrdude/releases/download/v8.0/avrdude-v8.0-windows-x64.zip'; |
Owner
There was a problem hiding this comment.
This is good for the start. I'll work on an improvement soon. (to the downloading functionality, that is.)
| console.log(`Extracting ${tempPath} to ${targetDir}`); | ||
| const files = await decompress(tempPath, targetDir, { strip: 1 }); | ||
| if (archiveType === 'zip') { | ||
| const files = await decompress(tempPath, targetDir, { strip: 1 }); |
Owner
There was a problem hiding this comment.
I will also update this code later to modularize it, since I had the same functions already (at the bottom of getToolchain.js)
And also, thanks for these. These are great additions to the extension
Collaborator
Author
There was a problem hiding this comment.
Happy you like the additions! Modularizing getToolchain.js duplicates is a great call for cleaner code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
This pull request enhances the AVR upload experience by expanding the list of supported programmer types and improving the overall configuration flow. It adds robust cross-platform support, better UX, and thoughtful developer conveniences.
✅ Changes
🔽 Expanded Programmer Options
Added 13+ popular
avrdudeprogrammer types:Includes
"Custom..."entry for flexibility.🧠 Improved Upload UX
📦 Download Enhancements
.zip,.tar.gz) with correct extract logic.chmod.🛡️ Stability & Debugging
avrdudeif download declined.🧼 Refactoring
🧪 Testing
🔗 Related To
Builds on:
Add Automatic avrdude Download Feature with Redirect Handling
🙏 Personal Note
💡 Optional Enhancements (Future Consideration)
avrdudeversion to prevent re-downloading.✅ Final Checklist
path.basename()used for temp filesfollowRedirects()used to resolve GitHub redirectsavrdudeexists before continuing