浏览代码

update build mac section in readme

/siyaoH-1.17-PlatformMessage
xingwei.zhu 4 年前
当前提交
f5a58839
共有 1 个文件被更改,包括 24 次插入40 次删除
  1. 64
      engine/README.md

64
engine/README.md


## How to Build (Mac)
### Install Depot_tools
```
git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git'
export PATH="${PWD}/depot_tools:${PATH}"
```
### Build Skia
```
git clone https://skia.googlesource.com/skia.git
git checkout chrome/m85
bin/gn gen out/Debug
python tools/git-sync-deps
ninja -C out/Debug -k 0
```
Please ensure that you are using python2 when executing "python tools/git-sync-deps".
### Build Flutter Engine
### Build Dependencies
Setting up the Engine development environment

```
cd $FLUTTER_ROOT/flutter
Apply changes to BUILD.gn (src/flutter/fml/BUILD.gn)
Apply following to end of `flutter/third_party/txt/BUILD.gn`
diff --git a/fml/BUILD.gn b/fml/BUILD.gn
index 9b5626e78..da1322ce5 100644
--- a/fml/BUILD.gn
+++ b/fml/BUILD.gn
@@ -295,3 +295,10 @@ executable("fml_benchmarks") {
"//flutter/runtime:libdart",
diff --git a/third_party/txt/BUILD.gn b/third_party/txt/BUILD.gn
index 56b73a020..d42e88045 100644
--- a/third_party/txt/BUILD.gn
+++ b/third_party/txt/BUILD.gn
@@ -141,6 +141,7 @@ source_set("txt") {
"//third_party/harfbuzz",
"//third_party/icu",
"//third_party/skia",
+ "//third_party/skia/modules/skottie",
deps = [
@@ -339,3 +340,10 @@ executable("txt_benchmarks") {
deps += [ "//third_party/skia/modules/skparagraph" ]
}
+static_library("fml_lib") {
+static_library("txt_lib") {
+ "//flutter/fml",
+ ":txt",
+ ]
+}
```

cd engine/src
cd $FLUTTER_ROOT
ninja -C ./out/host_debug_unopt/ flutter/fml:fml_lib
ninja -C out/android_debug_unopt/ flutter/third_party/txt:txt_lib
### Build Lib
### Prepare icu data (TODO: try to build it into the library directly!)
set SKIA_ROOT and FLUTTER_ROOT to your $PATH. SKIA_ROOT is the root folder of your skia repository. FLUTTER_ROOT is the root folder of your flutter engine repository.
move the built icu data file from $FLUTTER_ROOT/out/host_debug_unopt/icudtl.dat to the StreamingAssets path
### Creat symbolic
Create symbolic as follows. Flutter engine txt include skia header in this pattern 'third_party/skia/*', so without symbolic, the txt lib will include skia
header file in flutter engine, instead of headers in skia repo.

正在加载...
取消
保存