Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
docs/ | 12-May-2024 | - | 124 | 69 | ||
resources/ | 12-May-2024 | - | 51 | 28 | ||
src/com/sk/gn/ | 12-May-2024 | - | 2,231 | 1,504 | ||
README_zh.md | D | 12-May-2024 | 3 KiB | 95 | 55 |
README_zh.md
1# GN脚本生成工具IntelliJ插件说明(暂不支持) 2 3## 简介 4 5GN脚本生成工具,它可以根据用户给定三方库项目的CMakeLists.txt文件,转换生成BUILD.gn文件。目前工具支持可执行文件、VS Code插件、IntelliJ插件三种入口,本文主要介绍IntelliJ插件使用说明。 6 7## 目录 8 9 ├── gn # GN脚本生成工具 10 │ ├── ... # 其他文件 11 │ ├── gn_IntelliJ_plugin # IntelliJ插件代码 12 │ │ ├── docs # IntelliJ插件说明 13 │ │ ├── resources # IntelliJ插件说明 14 │ │ ├── src # IntelliJ插件源码 15 │ │ └── README_zh # IntelliJ插件说明 16 17## 约束 18 19系统:不限 20 21依赖版本:JDK 11 22 23开发工具:DevEco stdio、IDEA Community 2021.3.3 24 25## 使用方法 26 27### 使用对象 28 29系统开发者 30 31### 使用场景 32 331)移植CMakeLists.txt编译方式的三方库到OpenHarmony源码中。 34 35### 工具使用 36 37插件下载路径如下: 38 39[下载链接](暂无) 40 41具体的工具使用步骤,可以左键单击以下链接了解: 42 43[工具使用说明](https://gitee.com/openharmony/napi_generator/tree/master/hdc/gn/gn_IntelliJ_plugin/docs/INSTRUCTION_ZH.md) 44 45### 工具输出 46 47根据使用者指定三方库的CMakeLists.txt文件,工具会输出对应的BUILD.gn文件。为了方便使用者快速上手工具,可供测试的三方库项目目录如下: 48 49 harmony@Ubuntu-64:~/OpenHarmony/third_party/test_project$ ls 50 CMakeLists.txt main.c 51 52CMakeLists.txt文件内容如下: 53 54 CMAKE_MINIMUM_REQUIRED(VERSION 2.6) 55 PROJECT(hello) 56 AUX_SOURCE_DIRECTORY(. SRC_LIST) 57 ADD_EXECUTABLE(hello ${SRC_LIST}) 58 59在linux环境下的,根据输入三方库项目的CMakeLists.txt文件,生成的输出文件,如下所示: 60 61 harmony@Ubuntu-64:~/OpenHarmony/third_party/test_project$ ls 62 build_tmp CMakeLists.txt main.c 63 harmony@Ubuntu-64:~/OpenHarmony/third_party/test_project$ cd build_tmp/ 64 harmony@Ubuntu-64:~/OpenHarmony/third_party/test_project/build_tmp$ ls 65 BUILD.gn CMakeCache.txt CMakeFiles cmake_install.cmake hello Makefile ohos.toolchain.cmake 66 67其中生成的BUILD.gn文件,内容如下所示: 68 69 70 71## 开发说明 72 73### 对象 74 75工具的开发者 76 77### 开发场景 78 79若当前工具的功能已经不能满足开发者的全部需求,则开发者可以基于已有的源码对工具进行二次开发,来增强工具的能力,编译打包生成自定义的可执行文件和插件。 80 81### 开发步骤 82 83开发者可以根据如下的步骤来完成对工具IntelliJ插件的开发: 84 85[工具开发说明](https://gitee.com/openharmony/napi_generator/tree/master/hdc/gn/gn_IntelliJ_plugin/docs/DEVELOP_ZH.md) 86 87## FAQ 88 89对于常见问题解决方法指导如下: 90 91[FAQ](https://gitee.com/openharmony/napi_generator/tree/master/hdc/gn/FAQ.md) 92 93## 相关仓 94 95暂无