mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-25 07:07:32 -04:00
[Build] Fix Linux build instruction
1. BUILD_ON_LINUX.md - Remove brew dependency - Update command for development in step 9 & 10 2. Fix file name typo for BUILD_ON_WINDOWS.md
This commit is contained in:
parent
7f70036951
commit
0dcaa6be2f
4 changed files with 45 additions and 23 deletions
|
@ -8,42 +8,42 @@ git clone https://github.com/AppFlowy-IO/appflowy.git
|
||||||
|
|
||||||
**Step 2:**
|
**Step 2:**
|
||||||
|
|
||||||
Note: Follow steps are verified on Ubuntu 20.04
|
Note:
|
||||||
|
1. Following steps are verified on
|
||||||
|
- [x] lubuntu 20.04 - X86_64
|
||||||
|
- [ ] ubuntu 20.04 - aarch64
|
||||||
|
- [ ] redhat - X86_64
|
||||||
|
- [ ] Arch Linux - X86_64
|
||||||
|
- [ ] Deepin - X86_64
|
||||||
|
- [ ] Raspberry Pi OS - aarch64
|
||||||
|
2. You may need to disable hardware 3D acceleration if you are running in a VM. Otherwise certain GL failures will prevent app from launching
|
||||||
|
|
||||||
1. Install pre-requests
|
1. Install pre-requests
|
||||||
```shell
|
```shell
|
||||||
sudo apt-get install build-essential
|
sudo apt-get install curl build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev
|
||||||
sudo apt-get install libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev
|
|
||||||
```
|
```
|
||||||
2. Install brew on Linux (TODO: rust installation should not depend on brew)
|
2. Install rust on Linux
|
||||||
```shell
|
```shell
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/user/.profile
|
source $HOME/.cargo/env
|
||||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
rustup toolchain install nightly
|
||||||
|
rustup default nightly
|
||||||
```
|
```
|
||||||
3. Install flutter according to https://docs.flutter.dev/get-started/install/linux
|
3. Install flutter according to https://docs.flutter.dev/get-started/install/linux
|
||||||
```shell
|
```shell
|
||||||
git clone https://github.com/flutter/flutter.git
|
git clone https://github.com/flutter/flutter.git
|
||||||
cd flutter
|
cd flutter
|
||||||
echo "export PATH=\$PATH:"`pwd`"/bin" >> ~/.profile
|
echo "export PATH=\$PATH:"`pwd`"/bin" >> ~/.profile
|
||||||
export PATH="$PATH:`pwd`/flutter/bin"
|
export PATH="$PATH:`pwd`/bin"
|
||||||
flutter channel dev
|
flutter channel dev
|
||||||
flutter config --enable-linux-desktop
|
flutter config --enable-linux-desktop
|
||||||
```
|
```
|
||||||
4. Fix problem reported by flutter doctor
|
4. Fix problem reported by flutter doctor
|
||||||
```shell
|
```shell
|
||||||
flutter doctor
|
flutter doctor
|
||||||
# install Android toolchian (optional)
|
# install Android toolchain (optional)
|
||||||
# install Chrome (optional)
|
# install Chrome (optional)
|
||||||
```
|
```
|
||||||
5. Install rust
|
|
||||||
```shell
|
|
||||||
# TODO: replace by rust offical installation step
|
|
||||||
brew install rustup-init
|
|
||||||
source $HOME/.cargo/env
|
|
||||||
rustup toolchain install nightly
|
|
||||||
rustup default nightly
|
|
||||||
```
|
|
||||||
5. Install cargo make
|
5. Install cargo make
|
||||||
```shell
|
```shell
|
||||||
cd appflowy
|
cd appflowy
|
||||||
|
@ -61,21 +61,25 @@ cargo make flowy_dev
|
||||||
```shell
|
```shell
|
||||||
cargo make -p development-linux-x86 pb
|
cargo make -p development-linux-x86 pb
|
||||||
```
|
```
|
||||||
9. Build flowy-sdk-dev (dart-ffi)
|
9. Build flowy-sdk-dev (dart-ffi) (optional), step 10 covers this step
|
||||||
```shell
|
```shell
|
||||||
# TODO: for development
|
# for development
|
||||||
|
cargo make --profile development-linux-x86 flowy-sdk-dev
|
||||||
|
|
||||||
# for production
|
# for production
|
||||||
cargo make --profile production-linux-x86 flowy-sdk-release
|
cargo make --profile production-linux-x86 flowy-sdk-release
|
||||||
```
|
```
|
||||||
10. Build app_flowy
|
10. Build app_flowy
|
||||||
```shell
|
```shell
|
||||||
# TODO: for development
|
# for development
|
||||||
|
cargo make -p development-linux-x86 appflowy-linux-dev
|
||||||
|
|
||||||
# for production
|
# for production, find binary from app_flowy/product/<version>/linux/<build type>/AppFlowy/
|
||||||
cargo make -p production-linux-x86 appflowy-linux
|
cargo make -p production-linux-x86 appflowy-linux
|
||||||
### tips
|
|
||||||
|
# tips
|
||||||
# run Linux GUI application through x11 on windows (use MobaXterm)
|
# run Linux GUI application through x11 on windows (use MobaXterm)
|
||||||
|
# for instance:
|
||||||
# export DISPLAY=localhost:10
|
# export DISPLAY=localhost:10
|
||||||
# cd app_flowy/product/0.0.2/linux/Release/AppFlowy
|
# cd app_flowy/product/0.0.2/linux/Release/AppFlowy
|
||||||
# ./app_flowy
|
# ./app_flowy
|
||||||
|
|
|
@ -70,7 +70,6 @@ rustup target add x86_64-apple-darwin
|
||||||
rustup target add aarch64-apple-ios
|
rustup target add aarch64-apple-ios
|
||||||
rustup target add aarch64-apple-darwin
|
rustup target add aarch64-apple-darwin
|
||||||
rustup target add x86_64-pc-windows-msvc
|
rustup target add x86_64-pc-windows-msvc
|
||||||
rustup target add x86_64-pc-windows-msvc
|
|
||||||
rustup target add x86_64-unknown-linux-gnu
|
rustup target add x86_64-unknown-linux-gnu
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,25 @@ dependencies = ["flowy-sdk-release"]
|
||||||
run_task = { name = ["flutter-build", "copy-to-product"] }
|
run_task = { name = ["flutter-build", "copy-to-product"] }
|
||||||
script_runner = "@shell"
|
script_runner = "@shell"
|
||||||
|
|
||||||
|
[tasks.appflowy-dev]
|
||||||
|
mac_alias = "appflowy-macos-dev"
|
||||||
|
windows_alias = "appflowy-windows-dev"
|
||||||
|
linux_alias = "appflowy-linux-dev"
|
||||||
|
|
||||||
|
[tasks.appflowy-macos-dev]
|
||||||
|
dependencies = ["flowy-sdk-dev"]
|
||||||
|
run_task = { name = ["flutter-build", "copy-to-product"] }
|
||||||
|
script_runner = "@shell"
|
||||||
|
|
||||||
|
[tasks.appflowy-windows-dev]
|
||||||
|
dependencies = ["flowy-sdk-dev"]
|
||||||
|
run_task = { name = ["flutter-build", "copy-to-product"] }
|
||||||
|
|
||||||
|
[tasks.appflowy-linux-dev]
|
||||||
|
dependencies = ["flowy-sdk-dev"]
|
||||||
|
run_task = { name = ["flutter-build", "copy-to-product"] }
|
||||||
|
script_runner = "@shell"
|
||||||
|
|
||||||
[tasks.copy-to-product]
|
[tasks.copy-to-product]
|
||||||
mac_alias = "copy-to-product-macos"
|
mac_alias = "copy-to-product-macos"
|
||||||
windows_alias = "copy-to-product-windows"
|
windows_alias = "copy-to-product-windows"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue