We move the `tabindex` attributes to the button element directly from
elements contained within the button element – this is to satisfy the
HTML linter.
Changelog-Entry: Move tabindex attributes to button elements from
contained elements.
Change-Type: patch
We replace the lodash templates with arrow-functions and change the
single-argument object into multiple arguments.
Fixes#1810Closes#2006
Change-Type: patch
Changelog-Entry: Replace Lodash templates with arrow-functions.
* feat(GUI): add app to gui folder structure
We add a `lib/gui/app/` folder to help transition to Webpack usage.
Change-Type: patch
Changelog-Entry: Add `lib/gui/app` folder to ease into Webpack usage.
We specify the encoding to be UTF-8 with a meta tag such that Electron
won't get confused and try any other encodings.
Change-Type: patch
Changelog-Entry: Specify UTF-8 encoding with meta tag.
This replaces use of `electron.app.getName()` with the package.json's `.displayName`
property to ensure the correct application name is displayed when packaged.
Change-Type: patch
This fixes selection of images contained in directories with a file extension
(i.e. "openSUSE-Leap-42.3-DVD-x86_64.iso") in the open file dialog.
Change-Type: patch
Changelog-Entry: Fix selection of images in folders with file extension on Mac OS
Due to some Windows systems missing certain C runtime libraries
(Visual C/C++ 2012 / 2015 Redistributables), we ignore errors when loading
this module until we can ensure distribution of those along with it.
Change-Type: patch
Changelog-Entry: Fix "The specified module could not be found" on Windows
Fixes#1956
This was causing the stdout maxBuffer size to be exceeded
when flashing larger images (or having flashes that took a while).
Fixes#1955
Change-Type: patch
Changlog Entry: Fix "stdout maxBuffer exceeded" error on Linux
The Makefile current has logic to disable updates when building deb or
rpm packages. To make the Concourse pipeline transition easier, the
logic that disables updates on deb and rpm has been moved to the main
application code.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Etcher currently elevates a child writer proxy that itself spawns the
Etcher CLI in robot mode, parses the output, and proxies those messages
to the GUI application over IPC.
After these set of changes, Etcher elevates a single child writer
process that directly communicates back with the GUI using IPC. The main
purpose behind these changes is to simplify the overall architecture and
fix various issues caused by the current complex child process tree.
Here's a summary of the changes:
- Stop wrapping the Etcher CLI to perform writing
- Remove the robot option from the Etcher CLI (along with related
documentation)
- Elevate a new `child-write.js` standalone executable
- Move the relevant bits of `lib/child-writer` to the `image-writer` GUI
module
- Remove the `lib/child-writer` directory
- Add a new "Child died unexpectedly" Mixpanel event
- Floor state percentage in the flash state model
The above changes made is possible to tackle all the remaining issues
where the writer process would remain alive even if the parent died.
Change-Type: patch
Changelog-Entry: Ensure the writer process dies when the GUI application is killed.
See: https://github.com/resin-io/etcher/pull/1873
See: https://github.com/resin-io/etcher/pull/1843
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
* fix(gui): Re-enable application menu
This re-enables the application menu to allow for OS native shortcuts
to work again (i.e. hide/minimize window), which also allows us to
get rid of the global-shortcuts hack to prevent window reloads.
Change-Type: patch
Changelog-Entry: Fix disabled native OS window shortcuts
* refactor(gui): Update kbd shortcut comment to be less specific
This is a strange one. On Windows, putting a space before the
double-ampersand command concatenator makes the environment variable
value contain a trailing space. So for something like `set foo=bar &&
...` the variable `foo` will be `'bar '` instead of `'bar'`.
Change-Type: patch
Changelog-Entry: Fix trailing space in environment variables during Windows elevation.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
* feat(GUI): remove angular from image-writer
We remove Angular from the `image-writer` module by using Redux store
updates, subscribing to them while flashing.
Changelog-Entry: Remove Angular dependency from image-writer.
Change-Type: minor
By far WoeUSB is one of the few applications that support Windows image
and runs on GNU/Linux so I assume it is worth to mention it. Additional
line wrapping is made to comply to the code conventions.
Signed-off-by: 林博仁 <Buo.Ren.Lin@gmail.com>
This is the first step towards full usbboot Windows support. The driver
selector dialog will now display disabled devices to represent Compute
Modules even when Windows drivers are not installed to act on them.
These drives will state "Missing drivers."
Change-Type: minor
Changelog-Entry: Display connected Compute Modules even if Windows doesn't have the necessary drivers to act on them.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Right now we emit "Toggle drive" analytics events even when clicking on
disable/unselectable drives.
The fix is to move the `analytics.logEvent` inside the code path that
applies if a drive selection is considered valid.
Change-Type: patch
Changelog-Entry: Don't send analytics events when attempting to toggle a disabled drive.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This adds read- & write-retry handling of potentially temporary errors,
as well as errors due to device disconnection.
Change-Type: patch
Changelog-Entry: Fix handling of temporary read/write errors
We load localStorage settings into the Redux store in an asynchronous
way. This means that user settings might not be loaded by the time the
application starts, resulting in Mixpanel sending a few tracking events
before Etcher realises that the user opted out from anonoymous analytics
and error reporting.
In order to fix that, we remove `ng-app` and we manually bootstrap the
Angular.js application *after* the local settings are loaded.
Change-Type: patch
Changelog-Entry: Don't send initial Mixpanel events before "Anonymous Tracking" settings are loaded.
Fixes: https://github.com/resin-io/etcher/issues/1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
We hide the separator hyphen between the name and size when there is no
size information available, in the drive selector modal.
Change-Type: patch
Changelog-Entry: Hide the drive-selector separator hyphen when no drive
size is available.
We change from using `rs+` to a composition of read/write,
exlusive, sync & direct i/o flags, in order to avoid reading
stale data from the cache during verification.
Change-Type: patch
Changelog-Entry: Fix verification step reading from the cache
As we've actually been displaying the read-speed in various
forms during the flashing process, this is a venture into
displaying the actual write-speed from the end of the pipeline.
Change-Type: minor
Changelog-Entry: Display actual write speed
As we're not escaping env vars properly in `permissions.getEnvironmentCommandPrefix()`,
passing the entire environment along can cause another instance of the "stuck at starting"
problem, thus we limit the vars explicitly passed along again, keeping PATH and DEBUG.
Change-Type: patch
Due to the Blockmap.FilterStream not emitting a "checksum"
event (as it individually verifies specified ranges), the
flashing process would get stuck on finish.
This emits a "checksum" event on "finish" when blockmapping,
averting this issue.
Change-Type: patch
The checksum-stream being situated in front of the block-stream, which
ensures block size alignment to multiples of 512, and pads the last block,
caused the checksum to be incorrectly calculated for images where the last
block needed to be padded.
Change-Type: patch
If the speed is zero, the eta becomes Infinity, which isn't transmitted
properly over IPC for at this time unknown reasons.
To prevent the "Missing state eta" error from popping up when the speed is
zero, we set the eta to zero as well in those cases.
Change-Type: Patch
This adds handling for cases where the writer child process
exits due to reception of a signal, while also adjusting some peripherals,
like the IPC socket directory and inherited process environment.
Another addition is that the child process is explicitly killed
should an error arise on the IPC.
Change-Type: patch
This implements a new way of image write streaming under use of pipage and blockmap, which paves the way for a few things like using network locations as sources, and imaging of storage devices (aka backups). As it allows for mutation of the streaming pipeline while it's writing, it also facilitates the development of dynamic block-mapping.
Change-Type: minor
Various GNU/Linux distributions require root access to be able to open
USB devices. This means that Etcher would need to be ran as root, which
is now not possible on Wayland based systems.
We declare usbboot as unsupported on GNU/Linux from the time being, but
we are currently working on a solution.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This implements an SDK.Scanner which handles any given
adapters and manages the scans. This change enables continuous
scanning without the need to `.scan()` scheduling in other places.
Change-Type: minor