18 Commits

Author SHA1 Message Date
Juan Cruz Viotti
3af8c6dd49 Make use of package.json display name to reference the app
Our `package.json` contains a custom `displayName` property which equals
"Etcher" at the time of this writing.

This PR makes use of this property directly instead of hardcoding
"Etcher" in some places.
2016-03-09 09:25:25 -04:00
Juan Cruz Viotti
c0e8618813 Upgrade sudo-prompt to v2.2.0
This version contains a fix to allow the module to run on `asar`
packages.
2016-02-09 08:55:16 -04:00
Juan Cruz Viotti
efb2c4c911 Merge pull request #150 from resin-io/refactor/unify-elevation-error-handling
Unify handling of elevation errors in etcher.js
2016-02-08 14:39:43 -04:00
Juan Cruz Viotti
611be46177 Unify handling of elevation errors in etcher.js 2016-02-08 14:31:45 -04:00
Juan Cruz Viotti
feb04f8773 Downgrade sudo-prompt to v1.1.8
Later versions make use of shell commands over the internal contents of
the module causing errors when the application is packaged as an
`asar`.

This issue is being fixed here: https://github.com/jorangreef/sudo-prompt/issues/10
2016-02-08 14:28:49 -04:00
Juan Cruz Viotti
7949853086 Refer to Etcher instead of Resin Etcher 2016-02-08 13:04:54 -04:00
Juan Cruz Viotti
e91db955b5 Show error dialogs on elevation errors
Printing to `stderr` makes no sense since the process is detached from
the shell when packaged.
2016-02-08 09:53:49 -04:00
Juan Cruz Viotti
9de813f8cf Remove unused variables caught by jshint 2016-01-24 19:26:32 -04:00
Juan Cruz Viotti
122f136ff8 Refactor Etcher using ES6 features 2016-01-22 11:38:46 -04:00
Juan Cruz Viotti
13af009b4c Fix style issues detected by JSCS 2016-01-22 10:25:33 -04:00
Juan Cruz Viotti
efb055eb89 Upgrade Electron to v0.36.4 2016-01-22 09:37:57 -04:00
Juan Cruz Viotti
35c3351533 Change license to Apache 2.0 2016-01-03 22:42:44 -04:00
Juan Cruz Viotti
408a3096fc Rename Herostratus to Resin Etcher 2016-01-01 18:07:45 -04:00
Juan Cruz Viotti
328adfe60b Replace windosu with elevator
For some reason, when using `windosu`, the app is elevated three times.
However this only happens when the application is packaged for
distribution.

After a couple of days debugging this issue, we have no clue about
what's going on, but `elevator` seems to work fine.

Fixes: https://github.com/resin-io/herostratus/issues/29
2015-12-17 14:12:59 -04:00
Juan Cruz Viotti
479205c2c6 osx: Fix first time elevation failure
Currently we fire and forget `sudoPrompt.exec()` and run a timeout for
`process.exit(0)` right away, however this means that the timeout will
start as soon as the elevation dialog is shown when no sudo cache exists
and therefore the timeout will finish before the user can type his
password and submit.

The fix is to keep the parent alive until the children dies, but call
`app.dock.hide()` to make the parent completely invisible to the
operating system.

Fixes: https://github.com/resin-io/herostratus/issues/31
2015-11-19 13:31:45 -04:00
Juan Cruz Viotti
86d7424f90 Increase OS X parent kill time to 500ms 2015-11-17 15:38:36 -04:00
Juan Cruz Viotti
6e3c000576 Fire and forget OS X sudo prompt
Currently, the parent application will not be closed until the children
process is closed, leading to two Herostratus applications running at
the same time on OS X.
2015-11-13 13:53:58 -04:00
Juan Cruz Viotti
4bfb161e5c Initial commit 2015-10-29 09:36:21 -04:00