🐧Building on Linux

Notes:

  • The following steps are verified on

  • You may need to disable hardware 3D acceleration if you are running AppFlowy in a VM. Otherwise, certain GL failures will prevent the app from launching.

  • This guide assumes that you are using the bash shell on Linux. You can however, replicate these steps on zsh or other alternative Linux terminal shells, with minor alterations.

Step 1: Get the source code

Clone the source code from our Github project.

You should fork the code instead if you wish to submit code to AppFlowy. You will find information on that in Setting Up Your Repositories.

Image: Cloning the source from the Github repository.

Step 2: Install your build environment

Install system prerequisites:

Image: Installing prerequisites on Ubuntu.

Install flutter (three different methods):

Image: Installing flutter manually.
  • Method 3: You can also use a runtime version manager like asdf or a flutter-specific version manager to install flutter on your system. Assuming you are using the bash shell, follow these steps:

  1. Clone asdf.

  1. Add the path to asdf and enable asdf auto-completion in your shell.

  1. Install flutter via asdf and set it as your local runtime at the AppFlowy source directory (xx/AppFlowy/).

Image: Installing flutter using asdf

Setting up your development environment:

Run the setup script from the base directory. (Note: You can skip this step if you installed rust using asdf and set it as the local runtime inside thexx/AppFlowy/ source.)

Image: Running script install_linux.sh inside xx/AppFlowy/frontend/scripts/install_dev_env/.
Image: "Warning: Pub installs executables into $HOME/.pub-cache/bin, which is not on your path."

Step 3: Build AppFlowy (Flutter GUI application)

Change your path to the frontend directory.

Building the AppFlowy binary:

You will find the binary in frontend/appflowy_flutter/product/[version in x.x.x]/linux/[Binary type (Release/ Debug)]/AppFlowy/.

Image: Building AppFlowy

Step 4: Run the application

For running the release binary:

For running the debug binary:

If you do not know the version number for the AppFlowy binary that you have built, please use your terminal shells' tab completion, or type and enter thels(list) command to reveal the name of folder which is the version number you are building.

The current version of AppFlowy is 0.1.0.

A new window as shown below will show up after you run the application:

Image: AppFlowy window

If using a virtual machine, run the Linux GUI application through x11 on windows (use MobaXterm) for instance:

export DISPLAY=localhost:10

Miscellaneous: Running the application without building (using VS Code)

  1. Open the frontend folder located at xx/AppFlowy/ with VS Code.

  2. Go to the Run and Debug tab and then click AF-desktop: Clean + Rebuild All for the first time running.

Image: Running the application using VS Code

Last updated

Was this helpful?