[Instruction] Enhance BUILD_ON_WINDOWS.md to remove choco dependency

1. doc\BUILD_ON_WINDOWS.md
2. frontend\scripts\makefile\env.toml
  - break down install_targets task into 3 platform specific tasks
  - only install necessary targets for specfic platform
This commit is contained in:
Alex to
2021-11-24 13:23:09 +08:00
parent a0c59fd61d
commit ba5d66cea0
2 changed files with 25 additions and 17 deletions

View File

@ -64,15 +64,21 @@ cargo install diesel_cli --no-default-features --features sqlite
"""
dependencies = ["check_vcpkg"]
[tasks.install_targets]
[tasks.install_targets.mac]
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-darwin
rustup target add aarch64-apple-ios
rustup target add aarch64-apple-darwin
"""
[tasks.install_targets.windows]
script = """
rustup target add x86_64-pc-windows-msvc
"""
[tasks.install_targets.linux]
script = """
rustup target add x86_64-unknown-linux-gnu
"""