The devel channels will be completely deprecated. The deb/rpm snapshot
builds will still be accessible through GitHub Releases as part of Resin
CI builds.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit introduces a Webpack configuration file that bundles the GUI
code along with its dependencies (except the Etcher SDK and its own
dependencies), and uses Babel to add support for JSX (required by the
Rendition library).
The GUI code that goes into the bundle was moved to `lib/gui/app` so we
can easily ignore the whole subdirectory when creating production
distributable packages.
We now have a new make target called `webpack` that can be used to
create the GUI bundle. Such target will be called everytime a package is
generated.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
* feat(GUI): add app to gui folder structure
We add a `lib/gui/app/` folder to help transition to Webpack usage.
Change-Type: patch
Changelog-Entry: Add `lib/gui/app` folder to ease into Webpack usage.
So that the build system doesn't need to know in advance at which
directory the paths needs to be applied.
This will make it easier to add patches support to the Concourse
pipelines.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
- The `concourse-dependencies` and `concourse-build-installers` scripts
are not necessary anymore, given that the Electron pipeline already
knows how to perform these tasks
- The `concourse-test` script will be renamed to
`concourse-test-electron` to include the pipeline name (electron), so a
single project can be served by more than one pipeline. I'll keep the
old `concourse-test` for a bit for backwards compatibility until all
Etcher PRs are rebased
- There is a new `concourse-test-node-cli` script that will be used by
the Node.js CLI pipeline
- There is a new `test-cli` target that is supposed to host CLI tests.
For now, it just runs the SDK tests in a Node.js environment (instead of
in Electron)
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
The Makefile current has logic to disable updates when building deb or
rpm packages. To make the Concourse pipeline transition easier, the
logic that disables updates on deb and rpm has been moved to the main
application code.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Etcher currently elevates a child writer proxy that itself spawns the
Etcher CLI in robot mode, parses the output, and proxies those messages
to the GUI application over IPC.
After these set of changes, Etcher elevates a single child writer
process that directly communicates back with the GUI using IPC. The main
purpose behind these changes is to simplify the overall architecture and
fix various issues caused by the current complex child process tree.
Here's a summary of the changes:
- Stop wrapping the Etcher CLI to perform writing
- Remove the robot option from the Etcher CLI (along with related
documentation)
- Elevate a new `child-write.js` standalone executable
- Move the relevant bits of `lib/child-writer` to the `image-writer` GUI
module
- Remove the `lib/child-writer` directory
- Add a new "Child died unexpectedly" Mixpanel event
- Floor state percentage in the flash state model
The above changes made is possible to tackle all the remaining issues
where the writer process would remain alive even if the parent died.
Change-Type: patch
Changelog-Entry: Ensure the writer process dies when the GUI application is killed.
See: https://github.com/resin-io/etcher/pull/1873
See: https://github.com/resin-io/etcher/pull/1843
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This is the file convention that Resin Concourse will use. I flattened
the directory for simplicity.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
We can live without it with a simple `PATH` trick at the top of the
Makefile (thanks @lurch!).
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
- Add a `make test-spectron` target
- Install `spectron` and `mocha` (since we don't need to run the tests
inside an Electron instance like in the case of `electron-mocha`)
- Add some example tests
Fixes: https://github.com/resin-io/etcher/issues/1870
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
For usability purposes. We get a high volume of support requests from
GNU/Linux newbies that get deeply confused about setting execution
permissions.
This reverts commit b2d3d0ecb8eadd14593c3b7587775d1ac4b5475e.
The current CLI releases are broken. Seems that `pkg` creates the
application snapshot based on the current working directory, so at the
moment, the snapshot gets created based on the root of the project,
rather than based on the dist/Etcher-cli-* directories, causing the
native add-ons to not be resolved correctly.
Fixes: https://github.com/resin-io/etcher/issues/1706
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit makes use of the `resin/armv7hf-debian` Docker image to
test and generate armhf builds.
We needed to add a slash before `build` in `.gitignore` given that git
was refusing to include any changes on `scripts/build` otherwise.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
The CI servers currently call `installers-all` to deploy snapshot
builds, however that target builds the installers, but doesn't call the
phony rules that actually publishes them.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit includes several changes to adapt the CI configuration files
and Bintray publish script to perform development deployments.
- Move our Bintray details to the Makefile
- Deploy to a new Bintray component if `RELEASE_TYPE` is `snapshot`
- Call `publish-bintray-debian` and `publish-bintray-redhat` in the CI
deployment script
- Call the Bintray deployment scripts for RPMs
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
That PR was merged in a rush, so this is the follow-up commit addressing
the review comments made there.
See: https://github.com/resin-io/etcher/pull/1625
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
We're currently manually changing the names of the final packages
created by `electron-builder`. This commit makes Etcher use the default
package names that `electron-builder` picks for us.
The Windows final package names contain spaces, so I did keep the
`artifactName` entries for them, which now basically use what
`electron-builder` recommends, but use hyphens instead of spaces.
Change-Type: minor
See: https://github.com/resin-io/etcher/pull/1555
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
electron-builder seems to ship with an older AppImages version that
doesn't play very well with the custom AppImages elevation system we
created.
More particularly, we can't execute custom binaries inside the mounted
AppImage given that the mount point seems to lose permissions, owner,
and group file information.
This commit goes back to our old custom build system just for AppImages,
until we properly solve the problem, which will likely involve updating
the AppImages version in electron-builder.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Its very unlikely that we will ever support cross platform builds. For
that reason, let's simplify the whole Makefile by removing the concept
of target and host platforms.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit adds a `packageType` property to package.json, which is set
according to the package type of the Etcher target (e.g: dmg, nsis, deb,
etc).
This information is then sent to Mixpanel as the `packageType` property
of the "Application start" event.
Change-Type: patch
Changelog-Entry: Send anonymous analytics about package types.
Fixes: https://github.com/resin-io/etcher/issues/1328
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit replaces our home-grown CLI packaging mechanism based on
browserify + node-static-entry-point with pkg, an open source tool to
package Node.js applications for distribution.
Some highlights:
- Removing browserify got rid of a lot of dependencies from
npm-shrinkwrap.json
- pkg currently has an issue where macOS binaries can't be code-signed
(https://github.com/zeit/pkg/issues/128), therefore this commit
comments-out the binary signing section for that operating system
- pkg currently has an issue where Windows binaries can't be branded
(https://github.com/zeit/pkg/issues/149), therefore this commit
comments-out the branding section for that operating system
See: https://github.com/zeit/pkg
Fixes: https://github.com/resin-io/etcher/issues/1531
Fixes: https://github.com/resin-io/etcher/issues/1450
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
- Exclude *.dll/*.exe files from the asar in non-Windows operating
systems (from 19.8.0)
- Correctly parse boolean flags in `--extraMetadata` (in v19.9.0)
See: https://github.com/electron-userland/electron-builder/releases/tag/v19.9.1
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
The electron-builder configuration we're putting in package.json is
growing. To make it easier to read and edit, we'll move the whole
`build` property into a configuration file called
`electron-builder.yml`.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Now that all GUI builds are done through electron-builder, we'll
simplify our Makefile by adopting certain electron-builder defaults:
- Output final packages in `dist/`
- Adopt electron-builder code-signing environment variables
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This target builds a package for the current operating system, but
doesn't create an installer out of it, which is useful for debugging
purposes.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
We currently support portable builds that are basically ZIPs containing
the main Etcher executable and all its related libraries.
Turns out `electron-builder` supports NSIS-based portable builds that
can create a single executable that has everything it needs to run,
including any external assets.
This commit makes use of this new portable Windows installer
functionality, replacing the old ZIP approach.
Change-Type: patch
Changelog-Entry: Generate single-binary portable installers on Windows.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
We've been using `electron-builder` v2 all this time to create the NSIS
installer. This commit upgrade `electron-builder` to v18.6.2, and keeps
using it just to create the NSIS installer (for now).
The final package behaves exactly like the one we have before, just that
we needed various tweaks to upgrade to the latest `electron-builder`
version.
In more detail:
- Inject data to package.json using the new `--extraMetadata` option
- Remove old `.builder` package.json property
- Change the author of the project to Resin Inc. (the company name used
in our code-signing certificate)
As an extra, the new NSIS installer allows the user to install the
application to any location, and fixes the fact that the previous
installer copied the application to C:\Program Files (x86) even on x64
systems.
Change-Type: patch
Fixes: https://github.com/resin-io/etcher/issues/1030
Fixes: https://github.com/resin-io/etcher/issues/877
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Etcher supports disabling the update notification dialog by setting the
`ETCHER_DISABLE_UPDATES` environment variable.
In order to simplify disabling updates for when these are managed by a
package manager (e.g. in a debian package), this removes support for the
`ETCHER_DISABLE_UPDATES` environment variable, and instead requires
packagers to tweak the `updates.enabled` property of the package.json
file, which is set to `true` by default.
We don't want to encourage end users to disable the update mechanism, so
the documention was removed from `USER-DOCUMENTATION.md`. This option
will remain as something only packagers should tweak.
Change-Type: minor
Changelog-Entry: Remove support for the `ETCHER_DISABLE_UPDATES` environment variable.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
* add support for rpm packages.
* remove bintray file not my place neither do i have the keys.
* Remove last visage of publishing rpm's to bintray.
* address review comments.
* remove electron installer redhat from optional dependancies and add it to dockerfiles. also remove variable ELECTRON-INSTALLER-REDHAT inline with electron installer debian script.
* Add dependancy on libXScrnSaver and remove unsupported fields from config.json.
add rpm package to dockerfiles.
add dependancy check on rpmbuild to installer script.
* change dependancy from lsb-core-noarch to just lsb.
* address review comments.
* Add bintray target for rpm packages.
* Fix missing dependancy removed during conflict resolution.
We currently have various npm script target, and some of them are
getting complex enough that making sense out of them in package.json is
not a trivial task.
This commit moves all npm targets that are not directly recognisable by
npm (like `start`, `test`, `preshrinkwrap`, etc) into the Makefile.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit re-organizes various metadata properties in package.json so
that the structure better matches what `electron-builder` expects, to
ease the transition.
- Move `.companyName` to the Makefile (we don't need this in
package.json)
- Move `.displayName` to `.build.productName`
- Move `.copyright` to `.build.copyright`
- Move category to `.build.mac.category`
- Move bundle id to `.build.appId`
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This allows us to catch changes that break our installer builds before
merging the problematic changes.
As a way to simplify the CI configuration files, this commit introduces
an `installers-all` Makefile target that builds all installers.
This commit also replaces all the `cp -rf` calls with `cp -RLf` in
Makefile to avoid some weird hard link Appveyor issues.
See: https://github.com/resin-io/etcher/pull/1078
See: https://github.com/resin-io/etcher/pull/1354
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
There are various problems that contributed to this issue:
- `node-pre-gyp` doesn't detect the 6.10.3 node version. We reverted to
6.1.0, which the module recognised, and which shares the same v8 ABI
- Passing `--force` to `npm install` causes npm to swallow any errors
and silently continue
- The x86 Docker container has problems writing to `$HOME/.node-gyp`.
The solution is to enable `unsafe-perm` given that the container is
running as `root`
Fixes: https://github.com/resin-io/etcher/issues/1444
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
For some strange reason, Browserify will hardcode absolute paths from
the machine that generated the bundle to be able to resolve `__dirname`
and `__filename` calls. This makes no sense, given that it means that
the Browserify bundle will not work when we move it to another machine,
which went undetected probably for months.
The Browserify community apparently makes modules to fix this particular
issue (like `bundle-collapser`, and `intreq`), however none of this seem
to solve the problem for the Etcher CLI bundle.
I also gave https://github.com/zeit/pkg a go, however I gave up after
not being able to make use of native modules (nothing seems to work; the
packager result will simply not find the addons).
Finally, I ended up making the following workarounds:
- Edit the Browserify bundle file to use its own `__dirname` to
dynamically resolve the values of `__dirname` and `__filename` of the
files it contains
- Patch `lzma-native` to statically require its add-on rather than
relying on dynamic requires from `node-pre-gyp`, which makes it
impossible to resolve on the final bundle
See: https://github.com/resin-io/etcher/issues/355
See: http://stackoverflow.com/questions/21993073/browserify-with-paths-to-folders-in-my-system
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>