tingbot / tide-electron

📝   Simple IDE for developing Tingbot apps
Other
22 stars 7 forks source link

Flash SD card #36

Open benpawle opened 8 years ago

joerick commented 8 years ago

From the #25 'Welcome panel' there is a button to 'set up OS'. This takes the user to a dialog that downloads the latest Tingbot OS disk image, prompts the user to insert an SD card, and then flashes the SD, before handing off to the Wifi setup dialog.

joerick commented 8 years ago

Having looked at this briefly, there are a lot of cross-platform gotchas (listing drives, writing raw to the drives, privilege escalation) that make it a lot of work.

There is a great open source app called Etcher written in Javascript Electron that does this. They've even broken out their code into npm modules. This really helps but the privilege escalation is still a massive sticking point. This is implemented in Etcher child-writer module. Porting this to run in Tide electron would probably be possible.

joerick commented 8 years ago

Given our time pressures for v1.0, for now we'll be writing a guide for how to flash an SD (download a build of Etcher, download the latest image, and flash that to an SD card using Etcher). We can come back to this to improve the first-run user experience if necessary.