2021-11-21 01:34:32 +00:00
|
|
|
# How to build on Linux, please follow these simple steps.
|
2021-11-19 03:13:07 +00:00
|
|
|
|
2021-11-21 01:34:32 +00:00
|
|
|
## Step 1: Get source code
|
|
|
|
------------------------------
|
2021-11-19 03:13:07 +00:00
|
|
|
|
|
|
|
```shell
|
|
|
|
git clone https://github.com/AppFlowy-IO/appflowy.git
|
|
|
|
```
|
|
|
|
|
2021-11-21 01:34:32 +00:00
|
|
|
## Step 2: Build app_flowy (Flutter GUI application)
|
|
|
|
------------------------------
|
2021-11-19 03:13:07 +00:00
|
|
|
|
2021-11-20 03:41:06 +00:00
|
|
|
Note:
|
2021-11-21 01:34:32 +00:00
|
|
|
* Following steps are verified on
|
2021-11-20 03:41:06 +00:00
|
|
|
- [x] lubuntu 20.04 - X86_64
|
|
|
|
- [ ] ubuntu 20.04 - aarch64
|
|
|
|
- [ ] redhat - X86_64
|
|
|
|
- [ ] Arch Linux - X86_64
|
|
|
|
- [ ] Deepin - X86_64
|
|
|
|
- [ ] Raspberry Pi OS - aarch64
|
2021-11-22 09:15:45 +00:00
|
|
|
* You may need to disable hardware 3D acceleration if you are running it on a VM. Otherwise, certain GL failures will prevent app from launching
|
2021-11-19 03:13:07 +00:00
|
|
|
|
2021-11-21 01:34:32 +00:00
|
|
|
### Detail steps
|
2021-11-28 12:34:03 +00:00
|
|
|
1. Install prerequisites
|
2021-11-19 03:13:07 +00:00
|
|
|
```shell
|
2021-11-24 19:08:28 +00:00
|
|
|
sudo apt-get install curl build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev unzip
|
2021-11-21 01:34:32 +00:00
|
|
|
# optional, for generating protobuf in step 8 only
|
|
|
|
sudo apt-get install protobuf-compiler
|
2021-11-19 03:13:07 +00:00
|
|
|
```
|
2021-11-20 03:41:06 +00:00
|
|
|
2. Install rust on Linux
|
2021-11-19 03:13:07 +00:00
|
|
|
```shell
|
2021-11-20 03:41:06 +00:00
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
|
|
source $HOME/.cargo/env
|
|
|
|
rustup toolchain install nightly
|
|
|
|
rustup default nightly
|
2021-11-19 03:13:07 +00:00
|
|
|
```
|
2021-11-25 11:33:35 +00:00
|
|
|
|
2021-11-28 12:34:03 +00:00
|
|
|
3. env settings
|
2021-11-25 11:33:35 +00:00
|
|
|
``` shell
|
|
|
|
cp backend/configuration/base.example.yaml backend/configuration/base.yaml
|
|
|
|
cp backend/configuration/.env.example backend/configuration/.env
|
|
|
|
```
|
|
|
|
modify those file
|
|
|
|
|
|
|
|
4. Install flutter according to https://docs.flutter.dev/get-started/install/linux
|
2021-11-19 03:13:07 +00:00
|
|
|
```shell
|
|
|
|
git clone https://github.com/flutter/flutter.git
|
|
|
|
cd flutter
|
|
|
|
echo "export PATH=\$PATH:"`pwd`"/bin" >> ~/.profile
|
2021-11-20 03:41:06 +00:00
|
|
|
export PATH="$PATH:`pwd`/bin"
|
2021-11-19 03:13:07 +00:00
|
|
|
flutter channel dev
|
|
|
|
flutter config --enable-linux-desktop
|
|
|
|
```
|
2021-11-25 11:33:35 +00:00
|
|
|
5. Fix problem reported by flutter doctor
|
2021-11-19 03:13:07 +00:00
|
|
|
```shell
|
|
|
|
flutter doctor
|
|
|
|
```
|
2021-11-25 11:33:35 +00:00
|
|
|
6. Install cargo make
|
2021-11-19 03:13:07 +00:00
|
|
|
```shell
|
2021-11-21 01:34:32 +00:00
|
|
|
cd appflowy/frontend
|
2021-11-19 03:13:07 +00:00
|
|
|
cargo install --force cargo-make
|
|
|
|
```
|
2021-11-25 11:33:35 +00:00
|
|
|
7. Install duckscript
|
2021-11-19 03:13:07 +00:00
|
|
|
```shell
|
|
|
|
cargo install --force duckscript_cli
|
|
|
|
```
|
2021-11-28 12:34:03 +00:00
|
|
|
8. Check prerequisites
|
2021-11-19 03:13:07 +00:00
|
|
|
```shell
|
|
|
|
cargo make flowy_dev
|
|
|
|
```
|
2021-11-26 01:48:22 +00:00
|
|
|
|
|
|
|
9. [Optional] Generate protobuf for dart (optional, if you modify the shared-lib's entities)
|
2021-11-19 03:13:07 +00:00
|
|
|
```shell
|
2021-11-28 12:34:03 +00:00
|
|
|
# Make sure to install protobuf-compiler at first. See step 1
|
2021-11-19 03:13:07 +00:00
|
|
|
cargo make -p development-linux-x86 pb
|
|
|
|
```
|
2021-11-26 01:48:22 +00:00
|
|
|
10. [Optional] Build flowy-sdk-dev (dart-ffi), step 10 covers this step
|
|
|
|
|
2021-11-19 03:13:07 +00:00
|
|
|
```shell
|
2021-11-20 03:41:06 +00:00
|
|
|
# for development
|
|
|
|
cargo make --profile development-linux-x86 flowy-sdk-dev
|
2021-11-19 03:13:07 +00:00
|
|
|
|
|
|
|
# for production
|
|
|
|
cargo make --profile production-linux-x86 flowy-sdk-release
|
|
|
|
```
|
2021-11-26 01:48:22 +00:00
|
|
|
|
2021-11-25 11:33:35 +00:00
|
|
|
11. Build app_flowy
|
2021-11-19 03:13:07 +00:00
|
|
|
```shell
|
2021-11-20 03:41:06 +00:00
|
|
|
# for development
|
|
|
|
cargo make -p development-linux-x86 appflowy-linux-dev
|
2021-11-19 03:13:07 +00:00
|
|
|
|
2021-11-20 03:41:06 +00:00
|
|
|
# for production, find binary from app_flowy/product/<version>/linux/<build type>/AppFlowy/
|
2021-11-19 03:13:07 +00:00
|
|
|
cargo make -p production-linux-x86 appflowy-linux
|
2021-11-20 03:41:06 +00:00
|
|
|
|
|
|
|
# tips
|
2021-11-19 03:13:07 +00:00
|
|
|
# run Linux GUI application through x11 on windows (use MobaXterm)
|
2021-11-20 03:41:06 +00:00
|
|
|
# for instance:
|
2021-11-19 03:13:07 +00:00
|
|
|
# export DISPLAY=localhost:10
|
|
|
|
# cd app_flowy/product/0.0.2/linux/Release/AppFlowy
|
|
|
|
# ./app_flowy
|
|
|
|
```
|
|
|
|
|
2021-11-22 09:15:45 +00:00
|
|
|
## [Optional] Step 3: Build Server side application (optional if you don't need to host web service locally)
|
2021-11-21 01:34:32 +00:00
|
|
|
------------------------------
|
2021-11-19 03:13:07 +00:00
|
|
|
|
|
|
|
Note: You can launch postgresql server by using docker container
|
|
|
|
|
|
|
|
TBD
|