基于Flutter官方engine仓库拓展,可构建支持在OpenHarmony设备上运行的flutter engine程序,提供Linux、Mac及Windows环境下的构建方案。【此简介由AI生成】
Access rate limit exceeded. Please log in to continue.
Flutter Engine
Original warehouse source: https://github.com/flutter/engine
Warehouse description:
This warehouse is based on the extension of Flutter's official engine warehouse and can build a Flutter engine program that supports running on OpenHarmony devices.
Build instructions:
- Build environment:
-
Supports building in Linux and Mac, mainly building gen_snapshot for Window environment;
-
Please ensure that the current build environment can access the allowed_hosts field configured in the DEPS file.
- Building steps:
-
Build a basic environment: please refer to the official website;
Basic libraries that need to be installed:
sudo apt install python3 sudo apt install pkg-config sudo apt install ninja-buildConfigure node: Download
nodeand unzip it, and configure it into environment variables:# nodejs export NODE_HOME=/home/<user>/env/node-v14.19.1-linux-x64 export PATH=$NODE_HOME/bin:$PATHfor Window environment: please refer to the official website; Chapter "Compiling for Windows"
-
Configuration file: Create an empty folder engine, create a new
.gclientfile in the engine, and edit the file:solutions = [ { "managed": False, "name": "src/flutter", "url": "git@gitee.com:openharmony-sig/flutter_engine.git", "custom_deps": {}, "deps_file": "DEPS", "safesync_url": "", }, ] -
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; -
Download sdk: From [HarmonyOS Kit List]( https://developer.harmonyos.com/deveco-developer-suite/enabling/kit?currentPage=1&pageSize=100 )Download supporting development tools, currently not supporting packages downloaded from other channels
#HarmonyOS SDK, extract the directory after sdk/xxSDK.zip from the development kit package
export HOS_SDK_HOME=/home/<user>/ohos/sdk
#Unzip the bin subdirectory after commandline/commandline tools xxxx.zip in the development kit package
export PATH=$PATH:/home/<user>/ohos/command-line-tools/bin
-
Start building: In the engine directory, execute
./ohosto start building the flutter engine that supports ohos devices. -
Update project: In the engine directory, execute
./ohos -b master
FAQ:
-
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
-
Prompt Permission denied: Execute chmod +x
Introduction
基于Flutter官方engine仓库拓展,可构建支持在OpenHarmony设备上运行的flutter engine程序,提供Linux、Mac及Windows环境下的构建方案。【此简介由AI生成】
Customize your domain