3 Star 2 Fork 111

Wangxiaoping / flutter_engine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

Flutter Engine

原始仓来源:https://github.com/flutter/engine

仓库说明:

本仓库是基于flutter官方engine仓库拓展,可构建支持在OpenHarmony设备上运行的flutter engine程序。

构建说明:

  • 构建环境:
  1. 目前支持在Linux与Mac中构建;
  2. 请确保当前构建环境可以访问DEPS文件中配置的字段allowed_hosts列表。
  • 构建步骤:
  1. 构建基础环境:可参照官网

    需要安装的基础库:

    sudo apt install python3
    sudo apt install make
    sudo apt install pkg-config
    sudo apt install ninja-build

    配置node:下载 node 并解压,且配置到环境变量中:

    # nodejs
    export NODE_HOME=/home/<user>/env/node-v14.19.1-linux-x64
    export PATH=$NODE_HOME/bin:$PATH
  2. 配置文件:创建空文件夹engine,engine内新建.gclient文件,编辑文件:

    solutions = [
      {
        "managed": False,
        "name": "src/flutter",
        "url": "git@gitee.com:openharmony-sig/flutter_engine.git",
        "custom_deps": {},
        "deps_file": "DEPS",
        "safesync_url": "",
      },
    ]
  3. 同步代码:在engine目录,执行gclient sync;这里会同步engine源码、官方packages仓,还有执行ohos_setup任务;

  4. 下载sdk: 在每日构建下载ohos-sdk-full,在engine根目录下,新建文件夹 ndk/linux/4.0,解压ohos-sdk-full中的native文件夹并放置到ndk/linux/4.0文件夹中;

  5. 开始构建:engine目录,执行make,即可开始构建支持ohos设备的flutter engine。

embedding层代码构建指导

  1. 编辑shell/platform/ohos/flutter_embedding/local.properties:

    sdk.dir=<OpenHarmony的sdk目录>
    nodejs.dir=<nodejs的sdk目录>
  2. 在shell/platform/ohos/flutter_embedding目录下,执行

    ./hvigorw --mode module -p module=flutter@default -p product=default assembleHar --no-daemon
  3. har文件输出路径为:shell/platform/ohos/flutter_embedding/flutter/build

Copyright 2013 The Flutter Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

暂无描述 展开 收起
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/landor-wang/flutter_engine.git
git@gitee.com:landor-wang/flutter_engine.git
landor-wang
flutter_engine
flutter_engine
master

搜索帮助