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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This PR integrates `.bmap` support recently added to
`etcher-image-write` into Etcher itself.
It does it in the following way:
- It adds a `--bmap` option to the Etcher CLI.
- It saves a potential `bmap` file contents to the
`SelectionStateModel`.
- In the GUI, at the time of writing, if there is a `bmap` file content
in `SelectionStateModel`, it gets written to a temporary file and such
path is passed as the `--bmap` option to the CLI.
Since validation checksums don't make sense anymore, the finish screen
doesn't show the checksum box in this case.
Change-Type: minor
Changelog-Entry: Add `.bmap` support.
Fixes: https://github.com/resin-io/etcher/issues/171
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
The main page controller contained a lot of undocumented and untested
logic. As a first step towards cleaning up the whole thing, this PR
introduces the following changes:
- Implement `ImageSelectionController`, `DriveSelectionController`, and
`FlashController` as children of `MainController`. Each of them is
used by the appropriate main page "steps", and contains logic specific
to them. The `MainController` hosts functionality that applies to the
page as a whole.
- Add JSDoc annotations fo every controller function/property.
- Unit test several controller functions.
- Simplify template logic.
The "GUI fifty-thousand foot view" section in ARCHITECTURE.md has been
removed since there is no longer a single place where you can see all
the interactions between components.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This entry roughly documents how to get Etcher running on Wayland by
using the XWayland Server.
Fixes: https://github.com/resin-io/etcher/issues/509
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
`lib/gui/app.js` contains a lot of code that should have been split long
ago. This PR extracts the "main page" logic into an actual page
component in `lib/gui/pages`.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
Versionist is a small utility to automatically generate CHANGELOGs based
on a certain commit convention.
This PR adds a new `changelog` npm script that calls Versionist to
preppend a new CHANGELOG entry based on our current structure.
Dealing with links to changes between versions in GitHub is hard to
automatise with a tool like Versionist. We chose to get rid of such
links since they are a nice to have, but don't provide any meaningful
value to maintainers, since they can manually see the diffs with `git
diff`.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
One of the steps incorrectly says "Re-install the dependencies. This
will update the `npm-shrinkwrap.json` file". The intention was to say
that you should `npm install` the *new* dependency, and that will update
the `npm-shrinkwrap.json` file.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This small entry explains how to upgrade a dependency and ensure
`npm-shrinkwrap.json` is updated correctly.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
Document that `parted` warnings about invalid GPT and physical block
size issues can be safely ignored as they are a consequence of "hybrid
iso's".
Fixes: https://github.com/resin-io/etcher/issues/312
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
We were previously requiring users to run the exact same NodeJS version as
Electron bundled in order to avoid native add-on compilation incompatibilities,
however this problem is completely mitigated by configuring NPM to build
against an Electron specific V8.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
The dependencies are checked for in the build scripts, but for the user
convenience, we should also list them explicitly in the `CONTRIBUTING.md`
guide.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
Currently build scripts install dependencies and package everything on
every run. In order to allow more customisation, the build scripts now
accept the following commands:
- `install`: Only install dependencies.
- `package`: Only package the application.
- `all`: Install dependencies and package the application.
The above differentiation allows us to improve the documentation and CI
configuration files to point to the `install` commands instead of having
to explain how to configure NPM correctly, since that's done by the
build scripts by default.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
Document how to globally disable AppImage's desktop integration feature,
which promtps the user to create a desktop shortcut for the appliation
at startup.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
- Make sure we use the same tile style.
- Make sure we wrap lines in the same way.
- Use hyphens as file name separators.
- Move links to the bottom of the docs.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This document will serve as a more expanded guide on the commit
conventions we are going to be introducing in this project mainly for
the purpose of `CHANGELOG.md` generation.
See: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This document explains what the Etcher CLI is, how can be used, and some
peculiarities, like `--robot` and exit codes.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This PR documents the process to upgrade the Electron version correctly,
in order to prevent any potential compatibility issue when building
native dependencies.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
We will be generating shrinkwrap files in every release for the
following purposes:
- Be able to run an `npm install` containing the exact package versions
used at the time of publishing.
- Auto-generate dependency updates CHANGELOG entries by comparing
shrinkwrap files between versions.
See: https://docs.npmjs.com/cli/shrinkwrap
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
Etcher will start following Angular's commit guidelines, enforced by a
neat tool called `commitizer`, with the main purpose of being able to
auto-generate the CHANGELOG file.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>