2686 Commits

Author SHA1 Message Date
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
Juan Cruz Viotti
0ff0c77acc feat: zero out configured bytes from drive before flashing with bmap (#691)
This PR makes use of the `bytesToZeroOutFromTheBeginning` option
introduced in:

- https://github.com/resin-io-modules/etcher-image-stream/pull/34
- https://github.com/resin-io-modules/bmapflash/pull/6

The option, when set in `manifest.json`, causes a certain amount of
bytes to be zeroed out before the bmap-assisted write process starts, in
order to prevent issues on certain ROM bootloaders causing by
`bmap-tools` thinking certain parts of the initial sectors are holes.

The following components were upgraded:

- `etcher-image-stream` was upgraded to v4.1.0
- `etcher-image-write` was upgraded to v8.1.0

Changelog-Entry: Allow archive images to configure a certain amount of bytes to be zeroed out from the beginning of the drive when using bmaps.
Change-Type: minor
Fixes: https://github.com/resin-io/etcher/issues/673
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-07 13:36:08 -07:00
Juan Cruz Viotti
951b8de9fc refactor(GUI): replace the orange alert ribbon with a modal (#689)
As a way to simplify the design and make more use of available
components rather than creating specialised ones, we replaced the
`.alert-ribbon` component, which consisted of an orange alert appearing
at the top of the screen for when a validation failed, the drive ran out
of space, or other issues, with a modal.

This change allowed us to remove the "warning"-related colors from the
theme palette.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-07 12:40:51 -07:00
Juan Cruz Viotti
ce1c1d724d upgrade: etcher-image-write to v8.0.0 (#688)
This new version stops sending a `passedValidation` boolean property
upon completion and still throws an `EVALIDATION` error when validation
fails.

Such small chance allows us to get rid of lot of complexity related to
handling the `passedValidation` value in the application state.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-07 10:24:34 -07:00
Juan Cruz Viotti
73edf02e5f style(GUI): fix state -> step typo in main controller (#687)
A function in the `MainController` was being named
`shouldFlashStateBeDisabled`, however it should have been
`shouldFlashStepBeDisabled`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-06 12:51:01 -07:00
Juan Cruz Viotti
5ab3d52ab9 style(GUI): make "Connect a drive" button blue (#686)
For consistency purposes on the main screen, we switch the "Connect a
drive" button to be the classic primary blue button as the other ones.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-06 12:14:06 -07:00
Juan Cruz Viotti
b01ff5f0db feat(GUI): "Need help?" dynamically opens the image support url (#683)
We've recently added support for a `supportUrl` property in an archive
image `_info/manifest.json`, which the publisher can use to define the
URL where it would like to redirect users facing problems.

This PR makes the "Need help?" link at the top right corner open the
configured `supportUrl` url, and fallback to the original Etcher's help
page if no `supportUrl` is found.

In order to accomplish this, we made the following changes:

- Implement `SelectionStateModel.getImageSupportUrl()`
- Implement `HeaderController` controller

Change-Type: minor
Changelog-Entry: Make the "Need help?" link dynamically open the image support url.
Fixes: https://github.com/resin-io/etcher/issues/662
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-05 18:15:51 -07:00
Juan Cruz Viotti
b1ba1c887f upgrade: etcher-image-stream to v4.0.0 (#682)
We're interested in the following changes:

- Add `supportUrl` property in `_info/manifest.json`.
- Add `releaseNotesUrl` property in `_info/manifest.json`.
- Add `version` property in `_info/manifest.json`.
- Add `checksum` and `checksumType` properties in `_info/manifest.json`.

Link: https://github.com/resin-io-modules/etcher-image-stream/blob/master/CHANGELOG.md
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 15:44:39 -04:00
Juan Cruz Viotti
f63cad3696 upgrade: drivelist to v3.3.3 (#681)
- https://github.com/resin-io-modules/drivelist/pull/94

Change-Type: patch
Changelog-Entry: Show device id if device doesn't have an assigned drive letter in Windows.
Fixes: https://github.com/resin-io/etcher/issues/671
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 13:52:31 -04:00
Juan Cruz Viotti
eda52fe5f0 refactor(GUI): move alert-ribbon to the top of the page (#679)
This component is visually shown on the top of the window, however its
HTML code is placed below the "Flash" button, which is
counter-intuitive.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 12:28:59 -04:00
Juan Cruz Viotti
a8884f4da9 refactor(GUI): unify modal styles (#678)
Despite all modals sharing the same design and layout, each of theme is
being styled separately, when most of the CSS rules can be moved and
generified to `_modal.scss` and re-used by all of them.

This PR also moves `lib/gui/scss/components/_modal.scss` to the "Modal"
Angular's module.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 12:28:33 -04:00
Juan Cruz Viotti
cefff7b934 refactor(GUI): move button min-width rules to page styles (#677)
The `.button` component is not the responsible of knowing the
`min-width` it should occupy in the actual pages.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 11:47:20 -04:00
Juan Cruz Viotti
17b5ef96da refactor(GUI): move _bootstrap.scss alert rules to .alert-ribbon (#680)
We have some global CSS rules that affect `.alert` living in
`_bootstrap.scss`, however `.alert` is only being used by our
`.alert-ribbon` component, so it makes sense to move those rules over
there.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 11:47:01 -04:00
Juan Cruz Viotti
5b0698192b refactor(GUI): badge coloring (#675)
Move `.badge` coloring to the main page's style file, since the style we
currently hardcode on the component itself is very tied to the
particular context the badge is being instantiated in.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 10:30:56 -04:00
Juan Cruz Viotti
0b7232c339 refactor(GUI): explicitly declare .label-danger coloring (#676)
`.label-danger` is defined by Bootstrap, and its coloring re-uses what
was defined in `$brand-danger`, which is currently unset.

To prevent the module from going out of sync with our new CSS palette,
we explicitly declare the colorings in the component file.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 10:30:29 -04:00
Juan Cruz Viotti
e1f843652b refactor(GUI): CSS color-scheme (#674)
This is a big PR that extracts out a sensible set of SCSS color
variables that can be used to customise Etcher's look.

To achieve such goal, the following changes were introduced:

- Create a separate `lib/gui/scss/modules/_theme.scss` to conveniently
  hold all SCSS color variables.

- Decouple button styles from Bootstrap's `.btn`.

- Stop configuring Bootstrap colors as a whole using the SCSS variables
  it exposes and instead declare them directly in the modules that make
  use of them.

- Normalize all modal layouts into one. We had like 3 different modal
  layouts, each with their own title/body colors, etc. To simplify the
  color palette, we make use of a single modal layout everywhere.

- Remove `.progress-button--primary`. `.progress-button` is now
  "primary" by default.

- Be precise about `tick` foreground colors.

- Rename `.label-default` to `.label-inset`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 09:35:25 -04:00
Juan Cruz Viotti
2c9c06a882 chore: upgrade ruby version in CI services (#670)
`scss_lint` suddenly requires Ruby 2, which is breaking all our Travis
CI and Appveyor builds, which ship older versions.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-31 16:54:10 -04:00
Juan Cruz Viotti
36b7cf39f1 docs: nsis required version (#669)
Packaging Etcher with NSIS v3.x results in weird errors. We only support
v2.x, for which the latest version is v2.51.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-29 14:31:47 -04:00
Juan Cruz Viotti
a4e3359a96 doc: extract development setup docs into RUNNING-LOCALLY.md (#667)
This file will contain all information necessary to be able to get a
development version of Etcher running locally.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-26 15:48:17 -04:00
Juan Cruz Viotti
47c50ffe14 chore(GUI): integrate scss-lint (#666)
This PR integrates SCSS Lint, a tool that will help us keep SCSS tidier.
I've included a sensible configuration at `.scss-lint.yml`, and
documentation on how to install it on `CONTRIBUTING.md`.

The tool will run automatically as part of `npm run lint`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-26 15:09:07 -04:00
Juan Cruz Viotti
fb49b6ce4d refactor(GUI): move main page specific styles to pages/main/styles (#660)
There are many SCSS rules in `lib/gui/scss/main.scss` that only apply to
the main page. In order to keep things tidy, those styles were moved to
`lib/gui/pages/main/styles/_main.scss`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-26 10:26:45 -04:00
Juan Cruz Viotti
3c5eff3739 upgrade: drivelist to v3.3.1 (#659)
This version contains a fix for the `blkid: command not found` error in
certain GNU/Linux distributions.

- https://github.com/resin-io-modules/drivelist/pull/92

Change-Type: patch
Changelog-Entry: Fix `blkid: command not found` error in certain GNU/Linux distributions.
Fixes: https://github.com/resin-io/etcher/issues/640
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-26 10:26:30 -04:00
Juan Cruz Viotti
e91ec71b29 upgrade: etcher-image-stream to v3.1.2 (#658)
- https://github.com/resin-io-modules/etcher-image-stream/pull/27

Change-Type: patch
Changelog-Entry: Fix incorrect estimated entry sizes in certain ZIP archives.
Fixes: https://github.com/resin-io/etcher/issues/644
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-24 11:30:57 -04:00
Juan Cruz Viotti
893f42a124 upgrade: etcher-image-write to v7.0.1 (#657)
- https://github.com/resin-io-modules/etcher-image-write/pull/53

Change-Type: patch
Changelog-Entry: Prevent `ENOSPC` if the drive capacity is equal to the image size.
Fixes: https://github.com/resin-io/etcher/issues/629
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-24 11:03:30 -04:00
Juan Cruz Viotti
bf7cedd546 docs(GUI): runtime linux libraries (#655)
This entry documents all the GNU/Linux libraries needed to run Etcher.

Fixes: https://github.com/resin-io/etcher/issues/630
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-24 10:28:36 -04:00
Juan Cruz Viotti
da81849d4b refactor: rely on etcher-image-stream to fetch bmap contents (#654)
In order to get the bmap file contents to the Etcher CLI, we were
handling extraction, writing to a temporary file, then reading again,
and all sorts of other mumbo-jumbo, without realising that
`etcher-image-stream` already has this information right where we need
it (in the CLI's writer module) and in the way we need it (as plain
text).

Re-using from there hugely simplifies things.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-24 10:19:18 -04:00
Juan Cruz Viotti
8371757c70 upgrade: etcher-image-write to v7.0.0 (#651)
The change we're interested in is:

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

Change-Type: patch
Changelog-Entry: Prevent failed validation due to drive getting auto-mounted in GNU/Linux.
Fixes: https://github.com/resin-io/etcher/issues/574
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-23 10:43:05 -04:00
Juan Cruz Viotti
6af74bb9e1 upgrade: drivelist to v3.3.0 (#648)
The changes we're interested in are:

- https://github.com/resin-io-modules/drivelist/pull/89
- https://github.com/resin-io-modules/drivelist/pull/91

Change-Type: patch
Changelog-Entry: Upgrade `drivelist` to v3.3.0.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-22 12:58:45 -04:00
Juan Cruz Viotti
c5af759ccf upgrade: etcher-image-stream to v3.1.1 (#647)
This version contains an optimisation that makes analysing archive
images (e.g: ZIP) for metadata much faster.

Change-Type: patch
Changelog-Entry: Improve speed when retrieving archive image metadata.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-22 12:18:58 -04:00
Juan Cruz Viotti
fce399dfd4 fix(GUI): "modal.dismiss" is not a function (#645)
Steps to reproduce:

- Insert a single drive.
- Open drive selector modal.
- Extract the drive while drive selectector modal is open.
- Check DevTools.

The solution is to use `.close()` instead of `.dismiss()`. After some
diving into the documentation and the code, `.dismiss()` is only
available from within the modal controller, however if you want to close
the modal from outside, `.close()` is the way to go.

Notice that `.close()` returns a rejected promise when being called from
the modal itself, but thats not the case from outside, which is quite
confusing, but means we can safely use `.close()` in this context.

Change-Type: patch
Changelog-Entry: Fix "`modal.dismiss` is not a function" exception.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-22 11:58:42 -04:00
Juan Cruz Viotti
763e2f46f4 minifix(GUI): improve image full file name modal tooltip (#646)
The current tooltip, "SHOW IN FULL", proved to be a bit confusing for
users. We're using "SHOW FULL FILE NAME", as kindly suggested by @dlech.

Fixes: https://github.com/resin-io/etcher/issues/634
Change-Type: patch
Changelog-Entry: Improve image full file name modal tooltip.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-22 11:58:33 -04:00