From 4b9db95f7dd6e02525706a552a8df02014aa049e Mon Sep 17 00:00:00 2001 From: hezhengyi Date: Wed, 20 Dec 2023 11:48:26 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9engine=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E8=84=9A=E6=9C=AC,=E6=94=AF=E6=8C=81=E7=BC=96=E8=AF=91flutter?= =?UTF-8?q?=5Fembedding.har=E5=88=B0engine=E4=BA=A7=E7=89=A9=E4=B8=AD?= =?UTF-8?q?=E7=9A=84ohos=E7=9B=AE=E5=BD=95=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hezhengyi --- README.en.md | 18 +- README.md | 17 +- attachment/repos/bootstrap/clean.bat | 16 - attachment/repos/bootstrap/{clean.sh => ohos} | 7 +- attachment/repos/bootstrap/ohos.bat | 6 +- attachment/repos/bootstrap/ohos.py | 366 ++++++++++++++++++ attachment/repos/bootstrap/ohos.sh | 116 ------ attachment/repos/bootstrap/update_engine.bat | 17 - attachment/repos/bootstrap/update_engine.sh | 17 - .../hvigor-dependencies-config.md | 4 + .../hvigor/hvigor-config.json5 | 13 +- 11 files changed, 404 insertions(+), 193 deletions(-) delete mode 100644 attachment/repos/bootstrap/clean.bat rename attachment/repos/bootstrap/{clean.sh => ohos} (88%) mode change 100644 => 100755 create mode 100644 attachment/repos/bootstrap/ohos.py delete mode 100755 attachment/repos/bootstrap/ohos.sh delete mode 100644 attachment/repos/bootstrap/update_engine.bat delete mode 100644 attachment/repos/bootstrap/update_engine.sh create mode 100644 shell/platform/ohos/flutter_embedding/dependencies/hvigor-dependencies-config.md diff --git a/README.en.md b/README.en.md index 94cbad4522..1200950bbe 100644 --- a/README.en.md +++ b/README.en.md @@ -20,7 +20,6 @@ This warehouse is based on the extension of Flutter's official engine warehouse ``` sudo apt install python3 - sudo apt install make sudo apt install pkg-config sudo apt install ninja-build ``` @@ -53,19 +52,22 @@ This warehouse is based on the extension of Flutter's official engine warehouse 3. Synchronize code: In the engine directory, execute `gclient sync`; here the engine source code, official packages repository will be synchronized, and the ohos_setup task will be executed; -4. Download sdk: Download ohos-sdk-full in [the daily build](http://ci.openharmony.cn/workbench/cicd/dailybuild/dailylist), create a new folder ndk/linux/4.0 in the engine root directory, unzip the native folder in ohos-sdk-full and place it in ndk/linux/4.0 in folder; -(For mac environment, please download mac-sdk-full or mac-sdk-m1-full, and the placement directory is ndk/mac/4.0;No need to download OpenHarmony SDK in Windows environment) +4. Download sdk: Download ohos-sdk-full in [the daily build](http://ci.openharmony.cn/workbench/cicd/dailybuild/dailylist), configure the following environment variables: -5. Start building: In the engine directory, execute `make` to start building the flutter engine that supports ohos devices. +```sh +export OHOS_SDK_HOME= +``` + +5. Start building: In the engine directory, execute `./ohos` to start building the flutter engine that supports ohos devices. -6. Update project: In the engine directory, execute `./update_engine.sh` (Linux/Mac platform) or `update_engine.bat` (Windows platform) +6. Update project: In the engine directory, execute `./ohos -b master` ## FAQ: 1. When running the project, an error of Member notfound:'isOhos' is reported: Please ensure that all dart patches are applied in the src/third_party/dart directory (the patches are located in the src/flutter/attachment/repos directory, and you can use git apply to apply the patch). Recompile the engine after patching 2. Prompt Permission denied: Execute chmod +x