This removes O_DIRECT and O_EXCL flags from the writer,
as O_DIRECT can lead to EINVAL under quite a few circumstances,
and O_EXCL has proven to be useless.
Change-Type: patch
This replaces shelling out to `diskpart` on Windows to clear
the partition table with `win-drive-clean`, which does so via DeviceIoControl.
Change-Type: minor
Changelog-Entry: Use native code to clean drives on Windows
This commit introduces a Webpack configuration file that bundles the GUI
code along with its dependencies (except the Etcher SDK and its own
dependencies), and uses Babel to add support for JSX (required by the
Rendition library).
The GUI code that goes into the bundle was moved to `lib/gui/app` so we
can easily ignore the whole subdirectory when creating production
distributable packages.
We now have a new make target called `webpack` that can be used to
create the GUI bundle. Such target will be called everytime a package is
generated.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
We remove a piece of code checking whether `_.keys` returns any non-string
values in its array, but per the Lodash documentation `_.keys` always returns an
array of strings.
Change-Type: patch
Changelog-Entry: Remove stale `invalidKey` check in store.
This increases the UV_THREADPOOL_SIZE to CPUs * 4 to
facilitate full write speeds when writing to multiple destinations,
in preparation for integrating multi-writes.
Change-Type: patch
Changelog-Entry: Increase UV_THREADPOOL_SIZE to allocate 4 threads per CPU
We replace the `templateUrl` fields with `template` fields and thus
switch from template paths to template contents in preparation for the
Webpack PR.
Changelog-Entry: Replace template paths with template contents.
Change-Type: patch
We add a descriptive name to modals for analytics and debugging.
Change-Type: patch
Changelog-Entry: Add descriptive name to modals for analytics and
debugging.
This removes the remnants of the unused "robot protocol",
which was previously used by the CLI, but has been superseded by IPC.
Change-Type: minor
Changelog-Entry: Remove unused robot protocol
We upgrade eslint for better support of the object-curly-newline
options, and change the quantity of elements required before the linter
enforces newlines on objects, in addition we apply `consistent` to avoid
errors when there are newlines in objects with less than 2 elements.
```
const { field } = object
const {
field
} = object
const {
field1,
field2
} = object
````
Change-Type: patch
Changelog-Entry: Upgrade eslint to use object-curly-newline options.
We add an icon next to the drive size that is displayed when there is a
drive-image compatibility status message available. We display the first
one in the list and importance is then enforced by the order they are
added to the list in `drive-constraints`.
Change-Type: patch
Changelog-Entry: Add icon next to drive size when compatibility warnings exist.
We replace `ng-show/hide` with `ng-if` on the main page in order to
remove unnecessary calls and become more efficient.
Changelog-Entry: Replace ng-show/hide with ng-if on main page.
Change-Type: patch
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