3216 Commits

Author SHA1 Message Date
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
Juan Cruz Viotti
c7f4313ded upgrade: etcher-image-stream to v5.1.0 (#752)
We're particularly interested in the following change:

- Add `etch` support.

Also:

- Add a `.description` property to all archive related errors.
- Rename archive metadata base path from `_info` to `.meta`.

Change-Type: minor
Changelog-Entry: Add support for `etch` images.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-07 15:32:25 -03:00
Juan Cruz Viotti
60e3cbd22d fix(GUI): don't clear selection state when re-selecting an image (#753)
Currently, if the "CHANGE" label at the bottom of the image selection
step, once an image has been selected, is clicked, the selection state
is cleared.

Since https://github.com/resin-io/etcher/pull/602, we allow the drive
state to change independently of the image selection state, so the above
behaviour doesn't make sense anymore.

Fixes: https://github.com/resin-io/etcher/issues/730
Change-Type: patch
Changelog-Entry: Don't clear selection state when re-selecting an image.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-07 15:32:16 -03:00
Juan Cruz Viotti
4e5b000440 style(GUI): say "eject" instead of "unmount" in Windows (#754)
In Windows, if the user unmounts a drive, then the drive becomes
inaccessible to the OS. Compare this to UNIX based operating systems,
where an unmounted drive is still available for many I/O operations.

To prevent confusion, we say "eject" instead of "unmount" when running
on Windows, despite "unmount" being the correct way of saying it.

See: https://github.com/resin-io/etcher/issues/750
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-07 15:32:04 -03:00
Juan Cruz Viotti
c8ae05949c chore: only alias CXX to specific gcc versions on Linux (#755)
There is no `g++-4.8` binary in OS X in Travis CI anymore for some
reason.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-07 14:28:40 -03:00
David Lechner
f28b5a859b chore: add debian packaging (#747)
This adds a "debian" command to the linux build script. It uses
electron-installer-debian to create a debian package.
2016-10-05 12:30:06 -04:00
Juan Cruz Viotti
5924109371 docs: clarify that the install script doesn't install pre-requisites (#746)
We list all the pre-requisites needed to get up and running with Etcher,
and then say "run this script to install dependencies", which can be
interpreted as if the install script actually also installs the
pre-requisites, which is not the case.

To clarify this, we add a clear bold notice, and change "dependencies"
to "npm dependencies", to make the distinction clearer.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-03 21:51:00 -04:00
Andrew Scheller
5fbed138a8 feat(GUI): display image path base name as tooltip on truncated name
Changelog-Entry: Display image path base name as a tooltip on truncated image name.
Change-Type: minor
2016-10-03 14:00:56 -04:00
David Lechner
aea9d30271 chore: only apply upx compression when packaging as appimage
Debian packaging tools cannot analyze the binaries if they are compressed
with upx. If we move the compression to the appimage command, then the
output of the package command can be used for building debian packages.
2016-10-02 21:17:28 -04:00
David Lechner
6fedc9eb83 chore: add appimage command to GNU/Linux build script
With this addition, the `package` command simply creates a standalone package, while "appimage" is the one that creates the actual AppImage. The "all" command still generates the AppImage as before.
2016-09-30 10:09:47 -04:00
Andrew Scheller
e47a70606c docs: fix small typo in ARCHITECTURE.md 2016-09-29 22:40:26 -04:00
Juan Cruz Viotti
ddd2f2da40 docs: require at least NodeJS v6 to build Etcher (#727)
Some of the packaging modules that we use don't work on previous NodeJS
versions.

Fixes: https://github.com/resin-io/etcher/issues/725
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-29 09:16:40 -04:00
Juan Cruz Viotti
feb120bf8c v1.0.0-beta.15 v1.0.0-beta.15 2016-09-26 19:28:23 -04:00
Juan Cruz Viotti
81751743fe fix(GUI): no write after elevation in GNU/Linux (#721)
When the application is packaged as an AppImage, we're accidentally not
applying the whitespace escaping routine, causing images that contain
white spaces to cause Etcher to stall and never start the write.

The issue was even harder to debug given that the problem was not
reproducible when running Etcher from `npm start`.

Change-Type: patch
Changelog-Entry: Fix flashing never starting after elevation in GNU/Linux.
Fixes: https://github.com/resin-io/etcher/issues/631
Fixes: https://github.com/resin-io/etcher/issues/665
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-25 23:06:15 -04:00
Juan Cruz Viotti
95aaea5a0f upgrade: etcher-image-write to v8.1.3 (#719)
This version contains an important fix for the sporadic EPERM issues
encountered on Windows systems.

Fixes: https://github.com/resin-io/etcher/issues/627
Link: https://github.com/resin-io-modules/etcher-image-write/blob/master/CHANGELOG.md
Change-Type: patch
Changelog-Entry: Fix sporadic EPERM write errors on Windows.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-25 21:50:54 -04:00
Juan Cruz Viotti
66a810e764 chore: apply HFS+ compression to *.app in OS X (#715)
This results in ~10MB savings, which is not much, but still worth
reducing as much as we can.

See: https://github.com/resin-io/etcher/issues/711
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-23 14:11:42 -04:00
Juan Cruz Viotti
f9ce62d34f upgrade: etcher-image-write to v8.1.2 (#712)
This version contains a fix for incorrect validation errors being
reported when flashing bzip2 files due to incorrect slicing of the drive
stream when calculating the checksum.

See: https://github.com/resin-io-modules/etcher-image-write/pull/61
Change-Type: patch
Changelog-Entry: Fix incorrect validation errors when flashing bzip2 images.
Fixes: https://github.com/resin-io/etcher/issues/710
Fixes: https://github.com/resin-io/etcher/issues/709
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-22 13:17:10 -04:00
Juan Cruz Viotti
6d767231f8 upgrade: drivelist to v3.3.4 (#714)
This new version contains a fix for a very weird `cscript is not
recognised` error reported long ago.

Change-Type: patch
Changelog-Entry: Fix "cscript is not recognised as an internal or external command" Windows error.
Fixes: https://github.com/resin-io/etcher/issues/552
See: https://github.com/resin-io-modules/drivelist/pull/95
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-22 13:15:39 -04:00
Juan Cruz Viotti
e12f4e0b74 doc: recovering broken drives (#705)
Sometimes a flash error ends up taking the user's drive in a state that
can't be easily recover with usual disk utility tools. For when this
happens, we add some documentation about fail-proof methods to recover
the drive.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-15 08:49:35 -07:00
Juan Cruz Viotti
5d54e2b7e3 feat(GUI): allow disabling auto-update notifications (#704)
This feature is very appealing when running Etcher ouside a common
desktop environment, for example, as a Resin.io application. In such a
platform, an update notifier that points the user to the website makes
no sense, since the platform itself is responsible for the update.

For such cases, we added support for an environment variable called
`ETCHER_DISABLE_UPDATES`, that when set, will prevent the update check
altogether.

Change-Type: minor
Changelog-Entry: Allow the user to disable auto-update notifications with an environment variable.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-14 18:19:10 -07:00
Juan Cruz Viotti
401cdb6f52 feat(GUI): image-defined recommended drive size (#703)
Recently, we've added support for a `recommendedDriveSize` property in
the `manifest.json` of extended image archives, which the image can use
to warn the user that his drive, even if it is large enough to hold the
image, might not be large enough to deliver a good usage experience
later on.

When this property is found, the GUI reacts in the following ways:

- Drives that are large enough to hold the image but don't meet the
  recommended drive size are tagged with a warning label in the drive
  selector component.

- Attempting to select a "labeled" drive opens a warning modal asking
  for user confirmation.

- Drives that don't meet the recommended drive size declared in the
  image won't get auto-selected.

- If there is a drive already selected, and the user picks an image
  whose recommended drive size is greater than the drive size, the
  currently selected drive gets auto-deselected.

Code-wise, the following significant changes have been introduced:

- Implement `SelectionStateModel.getImageRecommendedDriveSize()`.
- Implement `SelectionStateModel.isDriveSizeRecommended()`.
- Extract `WarningModal` out of the settings page (the dangerous setting
  modal).

Change-Type: minor
Changelog-Entry: Allow images to declare a recommended minimum drive size.
See: https://github.com/resin-io-modules/etcher-image-stream/pull/36
Fixes: https://github.com/resin-io/etcher/issues/698
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-14 18:06:00 -07:00
Juan Cruz Viotti
7ea098c0d6 v1.0.0-beta.14
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
v1.0.0-beta.14
2016-09-12 11:10:16 -07:00
Juan Cruz Viotti
a4e3fcccba upgrade: etcher-image-stream to v4.3.0 (#699)
This new version contains the following changes:

- Add `recommendedDriveSize` property in `_info/manifest.json`.
- Upgrade `unbzip2-stream` to v1.0.10, which fixes a known uncaught
  exception when decompressing large `.bz2` files.
- Add support for markdown instructions at
  `_info/instructions.markdown`.

Changelog-Entry: Upgrade `etcher-image-stream` to v4.3.0.
Change-Type: minor
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-12 10:55:13 -07:00
Juan Cruz Viotti
7798c3398b refactor(GUI): remove ErrorService.reportException() ENOSPC workaround (#695)
This function used to handle `ENOSPC` as a corner case in order to
prevent it from being shown using the default Analytics/Dialog
machinery. This was because the "alert ribbon" used to react to changes
automatically from the templates, however, now that the "alert ribbon"
was removed, and replaced it with modals, we have finer control of how
and when this error gets shown, so the workaround is no longer
necessary.

See: 951b8de9fc
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-11 10:26:25 -07:00
Juan Cruz Viotti
1037905cbb fix(GUI): don't clear drive selection if clicking "Retry" (#696)
If the user encounters a flash error, and then presses the "Retry"
button, the drive selection is cleared, but then is re-selected right
away because its probably the only available drive, leading to a very
strange behaviour UX-wise.

As a solution, we avoid clearing the drive selection.

Change-Type: patch
Changelog-Entry: Don't clear the drive selection if clicking the "Retry" button.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-11 10:26:09 -07:00
Juan Cruz Viotti
18cc0c5cd9 minifix(CLI): only show final checksum if one exists (#692)
The Etcher CLI displays a nice `Checksum: $checksum` message upon
completion. Since the addition of bmap support, a checksum for an image
might not be calculated, causing the CLI to display `Checksum:
undefined`.

This PR takes care of this small UX issue by only showing the checksum
message if one indeed exists.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-07 14:00:22 -07:00