3411 Commits

Author SHA1 Message Date
Benedict Aas
18799d4274 fix(GUI): wrap long words in drivelist (#882)
Drives with long names or descriptions expand outside the drivelist,
this commit fixes that using CSS `word-break: break-all`.

Change-Type: patch
Changelog-Entry: Wrap drive names and descriptions in the drive selector widget.
2016-11-18 17:28:10 +00:00
Juan Cruz Viotti
8d44c9b86c refactor: extract OS X build script into many files (#875)
This is the first step towards decoupling the build system as many
different scripts, for maintainability and convenience purposes.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-18 16:54:14 +00:00
Juan Cruz Viotti
ca4d05ced0 refactor(GUI): resolve undefined on modal keyboard bindings (#879)
Currently we resolve `false`, which might not mean very much to some
modal use cases. `undefined` is a much more generic falsy value.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-18 15:23:10 +00:00
Benedict Aas
e85906d50d fix(GUI): pressing escape cancels modal dialogue (#878)
Pressing the ESC key in any modal dialogue currently just emits a
message. This change actually cancels the modal, closing it.

Closes: https://github.com/resin-io/etcher/issues/874
Change-Type: patch
Changelog-Entry: Allow the user to press ESC to cancel a modal dialog.
2016-11-18 12:55:30 +00:00
Juan Cruz Viotti
938fa71d50 fix(GUI): terminate IPC server on any errors (#872)
If the child process (e.g: writer proxy, or CLI) emits either an error,
or an invalid output, the error will be emitted to the GUI, which will
report it to the state machine, however the IPC server will keep
receiving further messages, which will be passed to the GUI, which will
keep trying to update the state, in which case Redux will rightfully
complain that we can't update the flashing state if there is no flash in
process.

As a solution, we make sure the IPC server is terminated on every
possible error code flow, and to do this effectively, we needed to
manually destroy every connected socket before actually closing the
server.

Change-Type: patch
Changelog-Entry: Fix "Can't set the flashing state when not flashing" error.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-18 11:58:00 +00:00
Juan Cruz Viotti
9b6cd5c81c chore: update "join us" email to join+etcher@resin.io (#873)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-17 09:05:37 +00:00
Juan Cruz Viotti
4296868ff7 upgrade: drivelist to v5.0.3 (#871)
See: https://github.com/resin-io-modules/drivelist/pull/120
Fixes: https://github.com/resin-io/etcher/issues/870
Change-Type: patch
Changelog-Entry: Fix `0x80131700` error when scanning drives on Windows.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-16 14:29:34 +00:00
Juan Cruz Viotti
6456a8fe96 upgrade: drivelist to v5.0.1 (#869)
- Fix internal SDCard reader descriptions in GNU/Linux.
- Transform `mountpoint` into an array of mountpoints.

Change-Type: patch
Changelog-Entry: Fix internal SDCard drive descriptions.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-16 13:52:20 +00:00
Juan Cruz Viotti
8992db807d fix(GUI): kill CLI processes when child writer dies (#855)
Turns out that when the parent process gets SIGKILL, the children
process would still remain alive.

In order to mitigate this, we force the IPC client opened by the child
writer to not attempt to reconnect to the IPC server if this one dies,
so we can catch the "disconnect" event and kill the children as a
result.

Fixes: https://github.com/resin-io/etcher/issues/850
Change-Type: patch
Changelog-Entry: Fix writing process remaining alive after the GUI is closed.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-16 00:48:29 +00:00
Juan Cruz Viotti
b4f1d82a51 fix(CLI): check CLI elevation early on (#864)
The CLI requires elevation permissions to actually be able to write to
drives. For this reason, it makes sense that we introduce such a check
early on.

See: https://github.com/resin-io/etcher/issues/726
Change-Type: patch
Changelog-Entry: Check available permissions in the CLI early on.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-14 11:22:08 +02:00
Juan Cruz Viotti
4e3bdb7e22 refactor(CLI): move UNIX umount functionality to repository (#866)
- Move UNIX unmount functionality to the CLI module
- Run `electron-mocha` for the CLI code
- Make unmount command templates that take a `drivelist` object as input

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-14 11:11:49 +02:00
David Lechner
f80feb9edf docs: more explicit key server (#861)
Use full URL with port for key server. Also use port 80 to work around firewalls and proxies.

Fixes: #859
2016-11-13 13:14:11 +02:00
Benedict Aas
2c07bce25f style(GUI): clarify wording at finished flash prompt (new → different) (#867)
Currently, the wording "same" versus "new" on the completion screen
is ambiguous when they respectively mean use the same image file, or use a new
and different image file. Therefore, change the wording from "new" to
"different".

Closes: https://github.com/resin-io/etcher/issues/839
2016-11-12 11:22:03 +02:00
Juan Cruz Viotti
6e03a00008 upgrade: electron-mocha to v3.1.1 (#854)
The current version would exit with error code 0 even when the tests
failed, causing CI servers to report false positives.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-09 22:20:11 +02:00
Juan Cruz Viotti
dae07ad050 test: fix failing ImageSelectionController tests (#856)
This was a small issue affected due to the change in order of the
supported extensions in the ImageSelectionController.

Since we want to test that the array contents are equally the same
independently on the order, we sort both sides of the assertion.

This issue was not caught before since `electron-mocha` was reporting
exit code 0 even when there were changes failing, causing the CI
services to incorrectly support success.

See: https://github.com/resin-io/etcher/pull/854
See: https://github.com/resin-io/etcher/pull/806
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-09 21:23:30 +02:00
Juan Cruz Viotti
5d25ef7dee docs(GUI): publishing a new version to homebrew cask (#837)
Publishing to Homebrew Cask involves changing a Cask file in the
official Cask registry pull request updating the `version` and `sha256`
properties.

See: https://github.com/caskroom/homebrew-cask/pull/26319
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-09 17:04:22 +02:00
Juan Cruz Viotti
0085880d3c chore: add productDescription to package.json (#842)
This key is added as the long description of the Debian package.
Omitting this option means that `description` is duplicated two times,
which is of course not the desired outcome.

See: https://github.com/resin-io/etcher/issues/632
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-09 17:04:05 +02:00
Juan Cruz Viotti
9c4afa0680 upgrade: umount to v1.1.5 (#843)
The changes we're interested in are:

- Escape device paths containing spaces.

Change-Type: patch
Changelog-Entry: Fix unmount issues in GNU/Linux and OS Xwhen paths contain spaces.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-07 18:07:57 +02:00
Juan Cruz Viotti
5a48395d6d style(GUI): unify "close" top right corner X in all modals (#841)
Every modal in the application should contain the same "close" X at the
top right corner, for consistency purposes. The only modal lacking this
button was the update notifier modal.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-07 17:56:03 +02:00
Juan Cruz Viotti
5d42fd181a minifix(GUI): improve unsafe mode setting dialog (#840)
- Change dialog message to "Are you sure you want to turn this on? You
  will be able to overwrite your system drives if you're not careful."

- Remove "CANCEL" button and put a cross at the top right corner.

- Change dialog button label from "YES, CONTINUE" to "ENABLE UNSAFE
  MODE"

In order to adapt to changes described above:

- `WarningModalService.display()` now takes an object including
  `description`, and `confirmationLabel`

Fixes: https://github.com/resin-io/etcher/issues/729
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-07 17:13:26 +02:00
Juan Cruz Viotti
136d935eed upgrade: etcher-image-write to v8.1.4 (#831)
We're interested in the following change, which causes the last
unaligned block on an image to be aligned to 512K instead of to 1M if
its smaller than 512K, and to 1M otherwise.

- https://github.com/resin-io-modules/etcher-image-write/pull/58

Fixes: https://github.com/resin-io/etcher/issues/685
Change-Type: patch
Changelog-Entry: Fix "Not Enough Space" error when flashing unaligned images.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-07 17:02:23 +02:00
Juan Cruz Viotti
611a59dbd8 docs: add instructions on how to install from Cask and Bintray (#832)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-07 17:02:11 +02:00
Juan Cruz Viotti
1cc2cb9bad minifix(GUI): warning modal size class (#838)
The `settings-dangerous-modal` modal size class doesn't exist anymore,
and was renamed to `warning-modal`. This was causing the exclamation
sign from the header to not be displayed in red, as it should.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-07 14:25:37 +02:00
Juan Cruz Viotti
71a73ab6c8 docs: list of major technologies used by Etcher (#826)
This commit notes down the most important technologies used by Etcher,
so that contributors know what they should focus their learning in.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-03 16:00:18 -04:00
Juan Cruz Viotti
5ac486d941 style: refer to Resin.io as resin.io, according to the style manual (#823)
> For all, lower-case capitalization unless beginning a sentence (Ex. I
> like resin.io. Resin.io is great.)

See: https://github.com/resin-io/docs#style-manual
See: https://github.com/resin-io/etcher/issues/797
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-03 10:57:29 -04:00
Juan Cruz Viotti
af0cfd9587 chore: update package.json and README.md to match repo description (#824)
Repository description says "Flash OS images to SD cards & USB drives,
safely and easily.", while `package.json` currently says "An image
flasher with support for Windows, OS X and GNU/Linux.", and `README.md`
contains "Flash OS images to SD cards & USB drives, safe & easy."

See: https://github.com/resin-io/etcher/issues/797
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-03 09:41:41 -04:00
Juan Cruz Viotti
adfa0fcd83 chore: remove removedrive from dependencies (#825)
This dependency is already being listed in `optionalDependencies`, which
the place it really belongs to.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-03 09:41:32 -04:00
Juan Cruz Viotti
f16e176b0f minifix(GUI): keep settings checkboxes unchecked until user confirms (#821)
There are some settings, such as "unsafe mode", that prompt the user for
confirmation before actually confirming the setting. In these cases,
when the user attempts to check the checkbox, the checkbox remains
checked unless the user rejects the confirmation dialog, in which case
the checkbox value is reverted.

In order to provide a better UX, we now keep the checkbox unchecked
until the user confirms.

See: https://github.com/resin-io/etcher/issues/729
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-02 18:25:29 -04:00
Juan Cruz Viotti
8b47c3f017 chore: add bintray debian publishing script (#819)
This script can be used to publish Etcher debian packages to Bintray.

See: https://github.com/resin-io/etcher/issues/632
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-02 18:24:28 -04:00
Juan Cruz Viotti
e2652e6ee9 style(GUI): improve wording of supported extensions label (#807)
- Change "and many more" to "and others"

See: https://github.com/resin-io/etcher/issues/787
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-02 18:24:01 -04:00
Juan Cruz Viotti
9ed6e30b00 style(GUI): improve ordering of supported extensions (#806)
The new ordering of the main supported extensions will be: `img`, `iso`,
`zip`.

We make use of `_.intersection` in order to ensure that the values we're
hardcoding indeed exist in the list of all supported format extensions,
otherwise they won't appear at all. This ensures we never show
extensions that are not supported.

Partly fixes: https://github.com/resin-io/etcher/issues/787
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-02 14:28:21 -04:00
Juan Cruz Viotti
428dbeaf55 upgrade: umount to v1.1.4 (#817)
- This new version passes `force` to `diskutil unmountDisk`

Change-Type: patch
Changelog-Entry: Fix `at least one volume could not be unmounted` error in OS X.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-02 00:04:36 -04:00
Juan Cruz Viotti
0c66fb65f4 fix(GUI): close IPC server after writing (#816)
Currently, we are not making sure the IPC server we start at
`lib/src/child-writer/index.js` gets closed when the child process exits
(successfully or not). This eventually causes issues when the user click
"flash again", since the stateful `ipc` global exposed by `node-ipc`
gets initialised again, causing the module to get to an invalid state
that eventually results in `this.log is not a function`.

- We've added `ipc.server.stop()` to both the `error` and `close` event
  handlers (which are self exclusive, according to the docs).

- We've added `child.kill()` to the child `stderr` handler, since that
  function causes the `close` event to be triggered, which in turns
  calls `ipc.server.stop()`.

Change-Type: patch
Changelog-Entry: Fix `this.log is not a function` error when clicking "flash again".
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-02 00:00:39 -04:00
Andrew Scheller
2d60d1d93b docs: add an 'Announcing' section to PUBLISHING.md (#814) 2016-11-01 21:13:57 -04:00
Andrew Scheller
eabc9991e9 style(CLI): add [options] to usage string 2016-10-31 23:49:59 -04:00
Juan Cruz Viotti
532e732b46 docs: add Win 10 IoT to the list of images requiring special treatment (#804)
Such image seems to require the "Windows 10 IoT Core Dashboard" tools.

See: https://github.com/resin-io/etcher/pull/783#issuecomment-257255185
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 23:49:31 -04:00
Andrew Scheller
54343d9609 minifix(CLI): fix GitHub issues URL in CLI help 2016-10-31 23:49:12 -04:00
Juan Cruz Viotti
081b719bcb style(CLI): don't wrap CLI help outputdrives (#813)
`yargs` wraps help output lines, causing the examples to be displayed
like this:

```
Examples:
/usr/bin/nodejs bin/etcher
raspberry-pi.img
/usr/bin/nodejs bin/etcher --no-check
raspberry-pi.img
/usr/bin/nodejs bin/etcher -d /dev/disk2
ubuntu.iso
/usr/bin/nodejs bin/etcher -d /dev/disk2
-y rpi.img
```

As a solution, we can set `.wrap(null)` to completely disable wrapping.

Fixes: https://github.com/resin-io/etcher/issues/810
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 19:46:39 -04:00
Juan Cruz Viotti
9e63639a53 docs(CLI): describe proper way to install dependencies (#802)
The `docs/CLI.md` points to user to `docs/CONTRIBUTING.md` for
instructions in how to install dependencies. This document previously
included the explicit `npm` commands to run, but was then changed to
point to the platform scripts, which means that if the user follows the
current instructions but has a NodeJS version which is not ABI
compatible with the NodeJS version used by the currently used Electron
version, the user will get an incompatibility error.

Fixes: https://github.com/resin-io/etcher/issues/801
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 19:45:21 -04:00
Juan Cruz Viotti
e603cb0838 chore: persist a chocolatey cache Appveyor CI builds (#809)
Setting a Chocolatey cache and Making sure it gets persisted means that
future builds don't have to download every Chocolatey package from the
internet every time.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 19:41:27 -04:00
Juan Cruz Viotti
45dac58e2a chore: remove www from etcher homepage URL (#808)
See: https://github.com/resin-io/etcher/pull/795
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 17:39:11 -04:00
Juan Cruz Viotti
be1b1a1a3a docs: suggest UNetbootin if user requires setting persistence storage (#805)
See: https://github.com/resin-io/etcher/issues/413
See: https://github.com/resin-io/etcher/pull/783#issuecomment-256959050
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 17:37:24 -04:00
Juan Cruz Viotti
9df24ae577 docs(GUI): remove <version> from AppImage name (#803)
The ZIP including the AppImage contains the version, but not the
AppImage itself.

See: https://github.com/resin-io/etcher/pull/786#issuecomment-257275494
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 17:35:29 -04:00
Andrew Scheller
8c6f441982 style: fix typos and URLs in CLI.md (#800) 2016-10-31 13:53:06 -04:00
Andrew Scheller
4b11b5aff2 style: fix typo in SUPPORT.md 2016-10-31 13:52:25 -04:00
Juan Cruz Viotti
b4d53fd8e5 chore: update homepage URL to https://www.etcher.io (#795)
The current url we use, http://etcher.io, now redirects to
https://www.etcher.io.

Fixes: https://github.com/resin-io/etcher/issues/794
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 13:51:30 -04:00
Juan Cruz Viotti
5ffcda9c8c chore: remove .hound.yml (#796)
We are not using Hound CI to display lint warnings anymore. The CI
servers are in charge of running the linters now.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 13:51:19 -04:00
Andrew Scheller
5f57614f08 style: fix typo in README.md 2016-10-31 13:51:11 -04:00
Juan Cruz Viotti
f8349d460e docs(GUI): explain why some drives are not bootable out of the box (#783)
The usual case is images requiring special treatment. We recommend the
users to use specialised tooling for those cases.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 01:49:35 -04:00
Juan Cruz Viotti
bc985f08a9 fix(GUI): duplicate drives in Windows (#790)
If a drive contains multiple partitions that Windows recognises and
mounts, then `drivelist` will incorrectly display separate drive objects
for each partition, causing `ngRepeat` to complain in the drive selector
component.

The issue was fixed by grouping the mountpoints of all recognised
partitions in a single drive object, as we do with the other supported
operating systems.

After the fix, `drivelist` also removed its `name` property (since its
now always equal to `device`), so some extra logic to compute an
appropriate display name for the drive has been introduced to
`DriveScannerService`.

Fixes: https://github.com/resin-io/etcher/issues/720
See: https://github.com/resin-io-modules/drivelist/pull/100
Change-Type: patch
Changelog-Entry: Fix duplicate drives in Windows.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 01:18:58 -04:00