2116 Commits

Author SHA1 Message Date
Juan Cruz Viotti
f55100d09b Fix lint warnings (#359)
- `os` in unused in `byte-size.spec.js`

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-25 14:50:23 -04:00
Juan Cruz Viotti
d5b3e0a83f Upgrade drivelist to v3.0.0 (#354)
This new version reports the size as a number of bytes instead of a
human readable string, so we have to take care of converting back to a
readable GB format ourselves.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-25 12:46:59 -04:00
Juan Cruz Viotti
afeba11424 Move GUI code into lib/gui (#358)
This refactoring will be useful on future changes, where there will be
a single application entry point that will execute the CLI or the GUI
version depending on the environment.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-25 12:08:19 -04:00
Juan Cruz Viotti
0ac79fa251 Deprecate tar.gz GNU/Linux "installers" (#356)
We're distributing AppImages now for convenience.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-25 11:44:50 -04:00
Juan Cruz Viotti
5bc5b42d3a v1.0.0-beta.4
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
v1.0.0-beta.4
2016-04-22 13:11:11 -04:00
Juan Cruz Viotti
1ac0fae405 Fix Error: Cannot find module ../global-shortcut in Windows (#353)
Since the Electron upgrade, Windows users are hitting a weird error
about `global-shortcut` not existing.

A solution is to `require('global-shortcut')` instead of accessing it as
a property of `electorn`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-22 13:03:46 -04:00
Juan Cruz Viotti
2fdad8adcb Highlight features in README file (#301)
Fixes: https://github.com/resin-io/etcher/issues/291
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-21 10:49:20 -04:00
Juan Cruz Viotti
dcff257f20 Upgrade Electron to v0.37.6 (#350)
* Upgrade Electron to v0.37.6

The main motiviation for such upgrade is that an error manifesting
itself as `Cannot read property 'object' of undefined` on certain Linux
systems was fixed in v0.37.4.

See https://github.com/electron/electron/issues/5229
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Make use of shell module by requiring `shell`

Otherwise we get a strange issue when trying to stub it:

    TypeError: Attempted to wrap undefined property openExternal as function

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-21 10:26:29 -04:00
Juan Cruz Viotti
148b9d15ae Integrate Etcher CLI in the main repository (#352)
This PR integrates the Etcher CLI code-wise, but doesn't yet handles the
distribution part of the story.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-21 10:08:53 -04:00
Juan Cruz Viotti
a462ee86c0 Add Makefile rule to generate an x86 AppImage for GNU/Linux (#349)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-21 09:01:34 -04:00
Juan Cruz Viotti
4d70676612 Distinguish between flash and validation events in Mixpanel (#347)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-20 14:56:58 -04:00
Juan Cruz Viotti
f683b841fa Make use of AppImage desktop integration script (#346)
This is useful to prompt the user to install the `.desktop` file.

The `Description` key in `Etcher.desktop` was changed to `Comment` since
`desktop-file-validate` complained with:

    Etcher.desktop: error: file contains key "Description" in group "Desktop
    Entry", but keys extending the format should start with "X-"

After checking the desktop file format specification, the correct key
should be "Comment"
(https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s05.html).

See: bc6e519964 (commitcomment-17164442)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-19 16:29:16 -04:00
Juan Cruz Viotti
bc6e519964 Generate AppImage package for GNU/Linux x86_64 (#345)
Fixes: https://github.com/resin-io/etcher/issues/323
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-19 13:29:32 -04:00
Juan Cruz Viotti
975c949fdf Allow to bypass elevation with an environment variable (#343)
This is mostly used for debugging purposes, or by power users that know
what they're doing.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-19 11:07:59 -04:00
Juan Cruz Viotti
fdf28cdf5f Remove unnecessary fields from bower.json. (#342)
We don't distribute the application through bower, and removing stuff
means one less place to be concerned about certain meta-data to be in
sync.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-19 10:01:26 -04:00
Juan Cruz Viotti
ed70e4e590 Refactor initial elevation routine (#341)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-19 09:40:25 -04:00
Juan Cruz Viotti
284f2a0ebb Add dashed underline to footer links (#340)
Fixes: https://github.com/resin-io/etcher/issues/338
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-18 13:16:26 -04:00
Juan Cruz Viotti
5baf8e5407 Improve UX when closing the drive selector modal (#339)
The current "Close" button makes it confusing to the user to know if
he's accepting his changes, or just discarding them.

The "Close" button in the top right corner was replaced with a standard
cross icon, and there is a new "Continue" block button fixed in the
bottom of the modal.

Fixes: https://github.com/resin-io/etcher/issues/294
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-18 13:16:17 -04:00
Juan Cruz Viotti
35ac745452 Link the version string in the footer to the CHANGELOG (#337)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-18 12:39:18 -04:00
Juan Cruz Viotti
ed592f0597 Add application version to footer (#335)
* Implement ManifestBind directive

This directive is useful to bind the contents of an element to a
property in the `package.json` manifest.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Add application version to footer

Fixes: https://github.com/resin-io/etcher/issues/292
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-17 23:57:56 -04:00
Juan Cruz Viotti
3842608a16 Add missing CHANGELOG diff link
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
v1.0.0-beta.3
2016-04-17 21:26:57 -04:00
Juan Cruz Viotti
ef82c937d3 v1.0.0-beta.3
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-17 21:24:32 -04:00
Juan Cruz Viotti
9489802834 Upgrade resin-image-write to v3.0.3 (#331)
This new version contains a fix for the `stream.push() after EOF` error
hit when writing unaligned images.

Fixes: https://github.com/resin-io/etcher/issues/307
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-15 17:45:47 -04:00
Juan Cruz Viotti
fa3c598f98 Fix double-quote lint warnings (#329)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-15 16:44:29 -04:00
Juan Cruz Viotti
34ae49df38 Reset writer state on flash error (#330)
Not doing so leads the writer state to have a `progress` of `100%`,
while `isFlashing()` is `false`, which is an inconsistent state.

Fixes: https://github.com/resin-io/etcher/issues/327
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-15 16:43:42 -04:00
Juan Cruz Viotti
0dcc7b22b8 Implement SVGIcon Angular directive (#324)
* Inherit current scope in osOpenExternal directive

This directive attempts to create a new isolated scope, which leads the
errors when using this directive on top of another directive in the same
element.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Implement SVGIcon Angular directive

This directive replaces part of `hero-icon`, the old Polymer component.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 16:14:46 -04:00
Juan Cruz Viotti
04efd16ca3 Misc changes (#322)
* Fix lint warnings about missing empty line above `module.exports`

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Re-build CSS

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 15:45:52 -04:00
Juan Cruz Viotti
66b38105ca Require ui.router and ui.bootstrap using NPM style (#321)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 15:37:05 -04:00
Juan Cruz Viotti
79c19ef341 Document directives with JSDoc (#320)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 15:36:52 -04:00
Juan Cruz Viotti
a874d4b808 Make all angular modules export the name of the module (#318)
This makes them very nicely require-able, for example:

    angular.module('MyModule', [
      require('my-dependency');
    ]);

From https://medium.com/@kentcdodds/how-to-distribute-your-angularjs-module-e04d4dd58ddc#.yqg2zo8im
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 14:22:51 -04:00
Juan Cruz Viotti
39786e3271 Don't require angular-ui-bootstrap in main module (#319)
This dependency is only required by `Etcher.Components.DriveSelector`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 14:17:31 -04:00
Juan Cruz Viotti
bd9b4d0a3a Promisify drivelist.list() with angular-q-promisify (#317)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 13:57:38 -04:00
Juan Cruz Viotti
42db5992fa Reorganize utilities and desktop integration modules (#316)
- Rename `Etcher.Utils.Dropzone` to `Etcher.OS.Dropzone`
- Rename `Etcher.Utils.OpenExternal` to `Etcher.OS.OpenExternal`
- Rename `Etcher.Utils.WindowProgress` to `Etcher.OS.WindowProgress`
- Rename `Etcher.notification` to `Etcher.OS.Notification`
- Rename `Etcher.notifier` to `Etcher.Utils.Notifier`
- Rename `Etcher.path` to `Etcher.Utils.Path`

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 13:34:31 -04:00
Juan Cruz Viotti
cda27982ef Publish ZIP versions of Etcher.app (#315)
`Squirrel.Mac` works with ZIP packages rather than DMGs.

Fixes: https://github.com/resin-io/etcher/issues/314
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 12:29:42 -04:00
Juan Cruz Viotti
fedde73a02 Improve UX when re-selecting a single available drive (#313)
Currently, if you have only one connected drive, Etcher will auto-select
it. One the single drive is auto-selected, if you attempt to change your
drive selection by clicking on the "Change" link button, the
re-selection is undone, and redone in a matter of milliseconds, making
it very difficult to get the drive selector modal to open.

A simple solution to this problem is making "Change" links trigger the
reselection action (e.g: opening modals, dialogs, etc) instead of simply
undoing the selection.

Fixes: https://github.com/resin-io/etcher/issues/296
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 12:12:19 -04:00
Juan Cruz Viotti
fd00a4ae0e Add a Mixpanel event when the application starts (#311)
Fixes: https://github.com/resin-io/etcher/issues/310
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 10:05:53 -04:00
Juan Cruz Viotti
dec10f618e Add "Change" button links below each step (#306)
Fixes: https://github.com/resin-io/etcher/issues/290
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 15:59:42 -04:00
Juan Cruz Viotti
e3bac8dc64 Connect DriveSelector with SelectionStateModel (#305)
Previously, `DriveSelector` kept a temporary selection state until the
modal was closed, which caused the selected drives to be passed to
`SelectionStateModel`.

This proves to be problematic when attempting to pass changes to
`SelectionStateModel` to `DriveSelector`. For example, consider the case
where the `DriveSelector` modal is opened with two drives, and one is
ejected. The remaining drive will be auto-selected by Etcher in the
background, but `DriveSelector` will not update itself with such change.

Fixes: https://github.com/resin-io/etcher/issues/304
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 14:42:51 -04:00
Juan Cruz Viotti
aba6e946e3 Hide drive selector modal if no available drives (#303)
If you have the drive selector modal opened, but you eject all the
available drives, the modal will be closed automatically.

Fixes: https://github.com/resin-io/etcher/issues/295
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 13:02:10 -04:00
Juan Cruz Viotti
77da54431a Add Etcher logo to application footer (#302)
Fixes: https://github.com/resin-io/etcher/issues/252
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 13:01:56 -04:00
Juan Cruz Viotti
3efea5b308 Replace all occurrences of "burn" with "flash" (#300)
Technically, a removable drive is flashed, not burned.

Fixes: https://github.com/resin-io/etcher/issues/297
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 12:00:43 -04:00
Juan Cruz Viotti
8417f94649 Allow to drag and drop an image to the first step (#288)
See https://github.com/electron/electron/blob/master/docs/api/file-object.md
Fixes: https://github.com/resin-io/etcher/issues/279
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 15:40:13 -04:00
Juan Cruz Viotti
ec7ad1304f Compress Linux executables and Windows DLLs with UPX (#286)
Before:

    118M   Etcher-linux-x64
    122M   Etcher-linux-x86
    142M   Etcher-win32-x64
    116M   Etcher-win32-x86

After:

    74M    Etcher-linux-x64
    74M    Etcher-linux-x86
    124M   Etcher-win32-x64
    102M   Etcher-win32-x86

Fixes: https://github.com/resin-io/etcher/issues/281
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 13:31:10 -04:00
Juan Cruz Viotti
2b1ef3d980 Move package ignore list computation to a separate script (#285)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 12:30:00 -04:00
Juan Cruz Viotti
2f65bd512f Implement OS notifications on burn completion (#283)
Its helpful to have an auditive/visual cue when a burn operation
completed.

Instead of adding a setting entry to enable/disable notifications, you
can use the standard way to control notifications from your operating
system. For example, in OS X, you might go to "System Preferences" ->
"Notifications" and disable notifications for "Etcher".

Fixes: https://github.com/resin-io/etcher/issues/280
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 11:49:55 -04:00
Juan Cruz Viotti
e1742859e1 Rename Linux binary to "etcher" (#282)
The capital letter is not very user friendly for command line people.

Fixes: https://github.com/resin-io/etcher/issues/278
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 10:56:07 -04:00
Juan Cruz Viotti
2e75b7f2bb Upgrade Electron to v0.36.11 (#275)
This version contains a fix for `resizable: false` not working on
GNU/Linux.

See: https://github.com/electron/electron/releases/tag/v0.36.11
Fixes: https://github.com/resin-io/etcher/issues/272
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-10 23:22:51 -04:00
Juan Cruz Viotti
c2265c6561 Prevent dialog.showErrorBox() throwing if wrong parameters (#274)
If the function lacks a message or a title, the following error is
thrown:

    Error: Could not call remote function ``.
    Check that the function signature is correct.
    Underlying error: Error processing argument at index 0,
    conversion failure from undefined

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-10 23:11:29 -04:00
Juan Cruz Viotti
5ccc6b6aa4 Upgrade drivelist to v2.0.13 (#270)
This version contains the following changes:

- Detect Macbook SDCard readers in OS X.
- Detect removable drives better in Windows.
- Keep one decimal in Windows drive size.

Fixes: https://github.com/resin-io/etcher/issues/255
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-10 23:11:12 -04:00
Juan Cruz Viotti
4fb7a138a4 Remove OS X minimum version notice from README
This was better explained in the downloads page.
2016-04-08 16:21:09 -04:00