3291 Commits

Author SHA1 Message Date
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
Juan Cruz Viotti
a6624cc344 docs(GUI): generic appimage name in desktopintegration SKIP instructions (#786)
We're now including the version as part of the filename, which means
`Etcher-linux-x64` is no longer 100% accurate. As a solution, we include
a filename with "placeholders" for the version and architecture, to
avoid harcoding a specific version.

See: 18e9d1eb11 (commitcomment-19619181)
See: https://github.com/resin-io/etcher/pull/764
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 00:30:57 -04:00
Juan Cruz Viotti
2337c91dce refactor(GUI): log elevation command in Windows (#784)
We do this for macOS and GNU/Linux for debugging purposes, but we
weren't doing it for Windows.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-29 00:03:34 -04:00
Juan Cruz Viotti
18e9d1eb11 docs(GUI): skip AppImage desktop integration prompt with SKIP (#782)
The AppImage `desktopintegration` prompt can also be disabled by setting
the `SKIP` environment variable.

As a matter of fact, we use this trick inside Etcher itself when
executing the Etcher CLI as a child process of the Etcher GUI.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-28 16:46:23 -04:00
Juan Cruz Viotti
8103ba851f v1.0.0-beta.16
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
v1.0.0-beta.16
2016-10-28 16:42:15 -04:00
Andrew Scheller
438c098953 chore: fix linux x86 build script (#780)
While the previous fix in #777 fixed repeated builds, it accidentally broke the first build!
2016-10-27 14:49:14 -04:00
Juan Cruz Viotti
fdbb7673a6 fix(GUI): surround paths in double quotes before elevating (#779)
This PR makes sure every command line argument that represents an
absolute path is surrounded by double quotes, to avoid any potential
escaping issue.

This simplifies a lot the various special character escaping routines we
had in place, since we now only have to make sure double quotes inside
the paths are escaped.

Fixes: https://github.com/resin-io/etcher/issues/773
Change-Type: patch
Changelog-Entry: Prevent escaping issues during elevation by surrounding paths in double quotes.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-27 11:39:14 -04:00
Wasabi Fan
b6817cfbb3 chore: include Etcher version in installer/archive names 2016-10-27 10:46:04 -04:00
Andrew Scheller
0bbcc10cfe chore: fix minor install script problems (#777)
When running the install script as root (e.g. inside a Docker container), bower complained that it

"shouldn't" be run with sudo. When running the x86 install multiple times, it tried to move

Etcher-linux-ia32 inside the existing Etcher-linux-x86/ folder, rather than renaming it, which meant

later commands failed.
2016-10-26 14:58:47 -04:00
Juan Cruz Viotti
9618291f80 feat(GUI): spawn CLI directly from the AppImage in GNU/Linux (#775)
If we pass relative paths as arguments to the AppImage, they get
resolved from `/tmp/.mount_XXXXXX/usr`. We can exploit this to run the
Etcher CLI directly from the AppImage, rather than having to mount it
ourselves:

```sh
ELECTRON_RUN_AS_NODE=1 Etcher-linux-x64.AppImage bin/resources/app.asar [OPTIONS]
```

By using this little trick, we get rid of both our custom mounting logic
and the need of surrounding the command to run in single quotes,
therefore avoiding a whole new kind of escaping issues.

Since running the CLI directly from the AppImage means that the
`desktopintegration` will be ran for the CLI, we pass the `SKIP`
environment variable to avoid having it prompt the user for
installation.

We also updated the `desktopintegration` script to the latest version,
which reduces the amount of logging plus other minor fixes.

Fixes: https://github.com/resin-io/etcher/issues/637
Change-Type: patch
Changelog-Entry: Fix Etcher leaving zombie processes behind in GNU/Linux.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-26 14:07:17 -04:00
Andrew Scheller
bcada80def docs: revise PUBLISHING.md
- Fix typos.
- Add Windows to package instructions.
2016-10-26 13:20:08 -04:00
Juan Cruz Viotti
d9822faf2f fix(GUI): emit progress back to parent using node-ipc (#774)
This PR makes use of `node-ipc` to emit progress information from the
child CLI to the GUI process rather than the tailing approach we've
been doing until now.

This change was motivated by the following Electron fix which landed in
v1.4.4: https://github.com/electron/electron/pull/7578. Before such fix,
Electron would not output anything to stdout/stderr if the Electron
process was running with `ELECTRON_RUN_AS_NODE` under Windows, which
forced us to implement `--log` option in the Etcher CLI to output state
information to a file.

Since this issue is fixed, we can consume the Etcher CLI output from
within `child_process.spawn`, which opens more interesting possibilities
for sharing information between both processes.

This coindentally fixes a Windows issue where the tailing module would
receive malformed JSON, causing Etcher to crash at `JSON.parse`. The
reason of this problem was a bug in the tailing module we were using.

Fixes: https://github.com/resin-io/etcher/issues/642
Change-Type: patch
Changelog-Entry: Fix "Unexpected end of JSON" error in Windows.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-25 23:56:39 -04:00
Juan Cruz Viotti
4d3eab4915 chore: create standalone Windows builds (#769)
This PR zips the package that is built by running:

```sh
.\scripts\build\windows.bat package <arch>
```

And puts it in `etcher-release/installers`.

Fixes: https://github.com/resin-io/etcher/issues/760
Change-Type: minor
Changelog-Entry: Publish standalone Windows builds.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-25 12:35:21 -04:00
Juan Cruz Viotti
63948874d7 chore: distribute AppImage inside a zip (#772)
AppImages need to be marked as executables before they can be used.
Distributing them directly means that virtually all web browsers will
automatically remove the execution permissions, leading us to have to
explain users how to add it back with `chmod`, etc.

For simplicity purposes, we'll be distributing AppImages inside ZIPs,
which ensure the execution permissions are added back when the user
decompresses it.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-24 20:25:16 -04:00
Juan Cruz Viotti
b6314bf397 refactor: use local variables in shell functions in build scripts (#771)
We translate function arguments (e.g: `$1`, `$2`, etc) to readable names
using shell variables in the top of every shell function in the build
scripts.

Since we were not declaring these variables as `local`, two functions
using the same "argument name" would override each other.

For example:

```sh
function foo() {
  variable=$1
  # Do something with $variable
}

function bar() {
  variable=$1
  # Do something with $variable
}

foo "Hello World"
echo $variable
> Hello World

bar "Changed variable"
echo $variable
> Changed variable
```

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-24 17:24:32 -04:00
Juan Cruz Viotti
32cac3b78f feat(GUI): use info icon instead of "SHOW FULL FILE NAME" (#770)
The main purpose of this change is to simplify the interface and avoid
unnecessary text.

Fixes: https://github.com/resin-io/etcher/issues/742
Change-Type: minor
Changelog-Entry: Use info icon instead of "SHOW FULL FILE NAME" in first step.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-24 15:17:52 -04:00
Juan Cruz Viotti
d7d9dc099f chore: fix output_package unbound variable in GNU/Linux (#767)
The `$output_package` variable is defined inside the `package_x$ARCH`
functions, which means that if we run the following commands:

```sh
./scripts/build/linux.sh package x64
./scripts/build/linux.sh appimage x64
```

The `$output_package` variable will not be defined when the script runs
the `appimage` command.

To workaround this issue, we declare a new `$package_directory` variable
inside the `appimage` command clause.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-24 14:25:37 -04:00
Juan Cruz Viotti
1609b8df5b fix(GUI): drag and drop not working anymore (#766)
The "dropzone" directive, which we use to implement drag and drop
support, was not being loaded in the application at all for some reason.
It was probably accidentally deleted during major refactorings.

Change-Type: patch
Changelog-Entry: Fix drag and drop not working anymore.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-24 14:23:33 -04:00
Juan Cruz Viotti
9086041a80 docs(GUI): minimim macOS supported platform (#765)
Since the Etcher GUI is based on Electron, it only runs on platforms
supported by Electron, which in the case of macOS, is 10.9 and newer
versions.

As an alternative, we propose using the Etcher CLI.

See: https://github.com/electron/electron/blob/master/docs/tutorial/supported-platforms.md
Fixes: https://github.com/resin-io/etcher/issues/761
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-24 14:23:22 -04:00
Juan Cruz Viotti
12f5baaa60 docs(GUI): no polkit authentication agent found Linux error (#757)
Document the need to have a polkit authentication running in GNU/Linux
to be able to go through the authentication system.

Fixes: https://github.com/resin-io/etcher/issues/756
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-14 12:09:31 -03:00
David Lechner
c43dffce80 chore(debian): add dependency on polkit package (#758)
A policy kit authentication agent is needed for privilege escalation.

See: https://github.com/resin-io/etcher/issues/756#issuecomment-253298322
2016-10-14 12:09:02 -03:00