2021-11-21 01:34:32 +00:00
|
|
|
## How to build on Windows, please follow these simple steps.
|
2021-11-17 13:45:18 +00:00
|
|
|
|
2021-11-21 01:34:32 +00:00
|
|
|
## Step 1: Get source code
|
|
|
|
------------------------------
|
2021-11-17 13:45:18 +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-17 13:45:18 +00:00
|
|
|
|
2021-11-21 01:34:32 +00:00
|
|
|
Note:
|
2021-11-28 12:34:03 +00:00
|
|
|
* Both Windows cmd and powershell can be used for running commands
|
2021-11-21 01:34:32 +00:00
|
|
|
* Following steps are verified on
|
|
|
|
- [x] Windows 10 X86_64
|
|
|
|
- [ ] Windows 10 arm64
|
|
|
|
- [ ] Windows 11 X86_64
|
|
|
|
- [ ] Windows 11 arm64
|
2021-11-17 13:45:18 +00:00
|
|
|
|
2021-11-21 01:34:32 +00:00
|
|
|
### Detail steps
|
2021-11-24 05:23:09 +00:00
|
|
|
1. Install Visual Studio 2022 build tools. Download from https://visualstudio.microsoft.com/downloads/
|
|
|
|
- In section of "All Downloads" => "Tools for Visual Studio 2022" => Build Tools for Visual Studio 2022, hit Download button to get it.
|
|
|
|
- Launch "vs_BuildTools.exe" to install
|
|
|
|
2. Install vcpkg according to https://github.com/microsoft/vcpkg#quick-start-windows. Make sure to add vcpkg installation folder to PATH env var.
|
|
|
|
3. Install flutter according to https://docs.flutter.dev/get-started/install/windows
|
2021-11-17 13:45:18 +00:00
|
|
|
```shell
|
2021-12-10 06:43:57 +00:00
|
|
|
flutter channel stable
|
2021-11-24 05:23:09 +00:00
|
|
|
flutter doctor
|
2021-11-17 13:45:18 +00:00
|
|
|
```
|
2021-11-24 05:23:09 +00:00
|
|
|
4. Install rust
|
2021-11-17 13:45:18 +00:00
|
|
|
```shell
|
2021-11-24 05:23:09 +00:00
|
|
|
# Download rustup.exe from https://win.rustup.rs/x86_64
|
|
|
|
# Call rustup.exe from powershell or cmd
|
2021-11-28 12:34:03 +00:00
|
|
|
.\rustup-init.exe --default-toolchain nightly --default-host x86_64-pc-windows-msvc -y
|
|
|
|
# Note: you probably need to re-open termial to get cargo command be available in PATH var
|
2021-11-17 13:45:18 +00:00
|
|
|
```
|
2021-11-24 05:23:09 +00:00
|
|
|
5. Install cargo make
|
2021-11-17 13:45:18 +00:00
|
|
|
```shell
|
2021-11-21 01:34:32 +00:00
|
|
|
cd appflowy/frontend
|
2021-11-17 13:45:18 +00:00
|
|
|
cargo install --force cargo-make
|
|
|
|
```
|
2021-11-24 05:23:09 +00:00
|
|
|
6. Install duckscript
|
2021-11-17 13:45:18 +00:00
|
|
|
```shell
|
|
|
|
cargo install --force duckscript_cli
|
|
|
|
```
|
2021-11-28 12:34:03 +00:00
|
|
|
7. Check prerequisites
|
2021-11-17 13:45:18 +00:00
|
|
|
```shell
|
|
|
|
cargo make flowy_dev
|
|
|
|
```
|
2021-11-24 05:23:09 +00:00
|
|
|
8. [Optional] Generate protobuf for dart (optional, if you modify the shared-lib's entities)
|
2021-11-17 13:45:18 +00:00
|
|
|
```shell
|
2021-11-28 12:34:03 +00:00
|
|
|
# Need to download protoc tools and add it's bin folder into PATH env var.
|
|
|
|
# Download protoc from https://github.com/protocolbuffers/protobuf/releases. The latest one is protoc-3.19.1-win64.zip
|
2021-11-17 13:45:18 +00:00
|
|
|
cargo make -p development-windows pb
|
|
|
|
```
|
2021-11-28 12:34:03 +00:00
|
|
|
9. [Optional] Build flowy-sdk (dart-ffi), step 10 covers this step
|
2021-11-17 13:45:18 +00:00
|
|
|
```shell
|
2021-11-23 00:28:59 +00:00
|
|
|
# for development
|
2021-11-23 09:45:18 +00:00
|
|
|
cargo make --profile development-windows-x86 flowy-sdk-dev
|
2021-11-19 03:13:07 +00:00
|
|
|
# for production
|
2021-11-23 09:45:18 +00:00
|
|
|
cargo make --profile production-windows-x86 flowy-sdk-release
|
2021-11-17 13:45:18 +00:00
|
|
|
```
|
2021-11-24 05:23:09 +00:00
|
|
|
10. Build app_flowy
|
2021-11-17 13:45:18 +00:00
|
|
|
```shell
|
2021-11-23 00:28:59 +00:00
|
|
|
# for development
|
2021-11-23 09:45:18 +00:00
|
|
|
cargo make -p development-windows-x86 appflowy-windows-dev
|
2021-11-19 03:13:07 +00:00
|
|
|
# for production
|
2021-11-23 09:45:18 +00:00
|
|
|
cargo make -p production-windows-x86 appflowy-windows
|
2021-11-17 13:45:18 +00:00
|
|
|
```
|
|
|
|
|
2021-11-28 12:34:03 +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-17 13:45:18 +00:00
|
|
|
|
|
|
|
Note: You can launch postgresql server by using docker container
|
|
|
|
|
|
|
|
TBD
|