Installing

This section will walk through installing the tools needed for this walkthrough on Endless OS.

Installing Flatpak

You will need Flatpak on your system to complete this walkthrough. If you're using Endless OS, it is already included. For other Linux distributions, check Flatpak's installation instructions.

NOTE: It's possible to complete the walkthrough and make an app without Flatpak, but you're on your own — packaging and installing an application using a different file format is outside the scope of this tutorial.

Installing the Endless SDK

You'll need the Endless SDK, which is a Flatpak runtime. Flatpak runtimes are split into the platform, which contains the minimum needed for running an app, and the SDK, which contains all the development tools needed for creating an app. You will need both. We'll use the latest stable version, which at the time of writing is 5.

If you're using Endless OS, you will already have the software source set up, and the platform runtime will already be installed. You only need to install the SDK runtime:

flatpak install eos-sdk com.endlessm.apps.Sdk//5

For other distributions, you will need to add the software source and install both runtimes:

flatpak remote-add --from eos-sdk http://endlessm.github.io/eos-knowledge-lib/eos-sdk.flatpakrepo
flatpak install eos-sdk com.endlessm.apps.Platform//5
flatpak install eos-sdk com.endlessm.apps.Sdk//5

See also the installation instructions.

Installing NodeJS

If you are following this tutorial on Endless OS, you will need to install NodeJS, since it's not included by default and there isn't a package for it.

Go to the NodeJS download page and download the correct "Linux Binaries" package for your system. Most likely, you will want the "64-bit" package. Create a .local folder in your home directory and unzip the downloaded package there:

mkdir -p ~/.local
tar -C ~/.local -xJf node-v8.9.4-linux-x64.tar.xz --strip-components=1

Check if ~/.local/bin is in your path (echo $PATH) and if not, add the following line to your ~/.bashrc file, then close and reopen the terminal:

export PATH="$HOME/.local/bin:$PATH"

Installing Hatch Previewer

You'll also need a tool called Hatch Previewer. It's available on Flathub, so if you're following this tutorial on Endless OS, you can install it from the App Center, or use the command line:

flatpak install flathub com.endlessm.HatchPreviewer

If you're on a different OS, you can follow Flathub's instructions to add it as a software source, or install Hatch Previewer via NPM. If you choose the latter, the way to run it will be slightly different.

Installing the Source Sans Pro fonts

We'll be using the Source Sans Pro font in our app. You can find the latest release on its GitHub page. Download the .otf versions of the fonts.

We'll build these fonts into our apps, but in order for Hatch Previewer to find them during development, you should also copy them into your local fonts directory:

mkdir -p ~/.fonts
cp ~/Downloads/SourceSans*.otf ~/.fonts

The results of the search are