Merge pull request #93 from pdckxd/main

This commit is contained in:
AppFlowy.IO 2021-11-25 08:21:12 +08:00 committed by GitHub
commit ac32760bfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 17 deletions

View File

@ -19,44 +19,46 @@ Note:
- [ ] Windows 11 arm64 - [ ] Windows 11 arm64
### Detail steps ### Detail steps
1. Install Visual Studio 2019 community. See: https://visualstudio.microsoft.com/downloads/ 1. Install Visual Studio 2022 build tools. Download from https://visualstudio.microsoft.com/downloads/
- Note: Didn't test Visual Studio 2022. It should also work. - In section of "All Downloads" => "Tools for Visual Studio 2022" => Build Tools for Visual Studio 2022, hit Download button to get it.
2. Install choco according to https://chocolatey.org/install - Launch "vs_BuildTools.exe" to install
3. Install vcpkg according to https://github.com/microsoft/vcpkg#quick-start-windows. Make sure to add vcpkg installation folder to PATH env var. 2. Install vcpkg according to https://github.com/microsoft/vcpkg#quick-start-windows. Make sure to add vcpkg installation folder to PATH env var.
4. Install flutter according to https://docs.flutter.dev/get-started/install/windows 3. Install flutter according to https://docs.flutter.dev/get-started/install/windows
```shell ```shell
flutter channel dev flutter channel dev
flutter doctor
``` ```
5. Install rust 4. Install rust
```shell ```shell
choco install rustup.install # Download rustup.exe from https://win.rustup.rs/x86_64
rustup toolchain install nightly # Call rustup.exe from powershell or cmd
rustup.exe toolchain install nightly
``` ```
6. Install cargo make 5. Install cargo make
```shell ```shell
cd appflowy/frontend cd appflowy/frontend
cargo install --force cargo-make cargo install --force cargo-make
``` ```
7. Install duckscript 6. Install duckscript
```shell ```shell
cargo install --force duckscript_cli cargo install --force duckscript_cli
``` ```
8. Check pre-request 7. Check pre-request
```shell ```shell
cargo make flowy_dev cargo make flowy_dev
``` ```
9. Generate protobuf for dart (optional, if you modify the shared-lib's entities) 8. [Optional] Generate protobuf for dart (optional, if you modify the shared-lib's entities)
```shell ```shell
cargo make -p development-windows pb cargo make -p development-windows pb
``` ```
10. Build flowy-sdk (dart-ffi) 9. [Optional] Build flowy-sdk (dart-ffi)
```shell ```shell
# for development # for development
cargo make --profile development-windows-x86 flowy-sdk-dev cargo make --profile development-windows-x86 flowy-sdk-dev
# for production # for production
cargo make --profile production-windows-x86 flowy-sdk-release cargo make --profile production-windows-x86 flowy-sdk-release
``` ```
11. Build app_flowy 10. Build app_flowy
```shell ```shell
# for development # for development
cargo make -p development-windows-x86 appflowy-windows-dev cargo make -p development-windows-x86 appflowy-windows-dev

View File

@ -64,15 +64,21 @@ cargo install diesel_cli --no-default-features --features sqlite
""" """
dependencies = ["check_vcpkg"] dependencies = ["check_vcpkg"]
[tasks.install_targets] [tasks.install_targets.mac]
script = """ script = """
# TODO: download the targets with corresponding platform. For example:
# It's not necessary to download aarch64-apple-ios when compiling the Flowy-SDK on windows.
rustup target add x86_64-apple-ios rustup target add x86_64-apple-ios
rustup target add x86_64-apple-darwin 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
"""
[tasks.install_targets.windows]
script = """
rustup target add x86_64-pc-windows-msvc rustup target add x86_64-pc-windows-msvc
"""
[tasks.install_targets.linux]
script = """
rustup target add x86_64-unknown-linux-gnu rustup target add x86_64-unknown-linux-gnu
""" """