diff --git a/README_zh.md b/README_zh.md index 19029ab5efcf0f8611b473baa81fde3fafc1948a..192da1ee93f320681110865de6c73f486a51f8f0 100755 --- a/README_zh.md +++ b/README_zh.md @@ -9,18 +9,23 @@ ``` tpc_c_cplusplus -├── README_zh.md -├── common #通用说明文档的文件夹 -├── 三方库1 -│ ├──gn #gn构建脚本、适配指导的文件夹 -│ ├──cmake #cmake构建脚本、适配指导的文件夹 -│ ├──README_zh.md -│ ├──README.OpenSource #文件中包含了三方库源码的下载地址,版本,license等信息 -├── 三方库2 -│ ├──gn #gn构建脚本、适配指导的文件夹 -│ ├──cmake #cmake构建脚本、适配指导的文件夹 -│ ├──README_zh.md -│ ├──README.OpenSource #文件中包含了三方库源码的下载地址,版本,license等信息 +├── README_zh.md #仓库主页 +├── common #仓库通用说明文档的文件夹 +├── thirdparty_template #三方库模板文件夹 +│ ├──README_zh.md #三方库简介 +│ ├──README.OpenSource #说明三方库源码的下载地址,版本,license等信息 +│ ├──ohos.build #三方库组件定义文件 +│ ├──CMakeLists.txt #构建脚本,支持hap包集成 +│ ├──BUILD.gn #构建脚本,支持rom包集成 +│ ├──adapted #该目录存放三方库适配需要的代码文件 +│ │ ├──config.h #例如配置文件 +│ │ ├──... #其他适配文件 +│ ├──docs #存放三方库相关文档的文件夹 +│ │ ├──rom_integrate.md #rom集成说明文档 +│ │ ├──hap_integrate.md #hap集成说明文档 +│ │ ├── ... #其他说明文档 +├── thirdparty1 #三方库文件夹,内容和thirdparty_template模板的格式一样 +├── thirdparty2 #三方库文件夹,内容和thirdparty_template模板的格式一样 ...... ``` @@ -30,6 +35,7 @@ tpc_c_cplusplus - [遵守仓库目录结构](#本仓库目录) - [遵守OpenHarmony编码贡献规范](https://gitee.com/openharmony-sig/knowledge_demo_smart_home/blob/master/dev/docs/contribute/README.md) +- [三方库模板目录](thirdparty_template) diff --git a/thirdparty_template/BUILD.gn b/thirdparty_template/BUILD.gn new file mode 100755 index 0000000000000000000000000000000000000000..e4f7cd101e575314b64773c134fa3b545a6023f7 --- /dev/null +++ b/thirdparty_template/BUILD.gn @@ -0,0 +1,12 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. \ No newline at end of file diff --git a/thirdparty_template/CMakeLists.txt b/thirdparty_template/CMakeLists.txt new file mode 100755 index 0000000000000000000000000000000000000000..7ce9dbce4c7f1e78df6419113f3f3035f4a562fd --- /dev/null +++ b/thirdparty_template/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/thirdparty_template/README.OpenSource b/thirdparty_template/README.OpenSource new file mode 100755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/thirdparty_template/README_zh.md b/thirdparty_template/README_zh.md new file mode 100755 index 0000000000000000000000000000000000000000..1c4bcf566c5816e0b15563a0ad570f478e10ea7e --- /dev/null +++ b/thirdparty_template/README_zh.md @@ -0,0 +1,21 @@ +# xxx 三方库说明 +## 功能简介 +这个是xxx, 主要功能是xxx,简单的一句话介绍 +## 使用约束 + +- IDE版本: + +- ROM版本: + +- API版本: + +- 三方库版本: + +- 当前适配的功能:完成了xxx功能的适配 + +- [License:xxx]()(链接指向源三方库中的license) + +## 集成方式 + ++ [系统Rom包集成](docs/rom_integrate.md) ++ [应用Hap包集成](docs/hap_integrate.md) diff --git a/thirdparty_template/adapted/config.h b/thirdparty_template/adapted/config.h new file mode 100755 index 0000000000000000000000000000000000000000..0b61b0d71df2c83ad10b63c9f3e8ef9d2c323d6f --- /dev/null +++ b/thirdparty_template/adapted/config.h @@ -0,0 +1,19 @@ +/* +# Copyright (c) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/ +#ifndef _CONFIG_H_ +#define _CONFIG_H_ + + +#endif \ No newline at end of file diff --git a/thirdparty_template/docs/rom_integrate.md b/thirdparty_template/docs/rom_integrate.md new file mode 100755 index 0000000000000000000000000000000000000000..9f157fdbe8c3d15ee7f6c486ad4e8bf67c89b873 --- /dev/null +++ b/thirdparty_template/docs/rom_integrate.md @@ -0,0 +1,39 @@ +# xxx如何集成到系统Rom + +## 准备源码工程 + +简要说明系统源码版本和运行平台 + +### 准备系统Rom源码 + +介绍系统源码的获取 + +### 增加构建脚本及配置文件 + +介绍如何增加构建脚本及配置文件 + +### 准备三方库源码 + +介绍三方库源码的获取 + +## 系统Rom中引入三方库 + +介绍如何将三方库加入OpenHarmony中构建 + +## 系统Rom中引入三方库测试程序 + +介绍如何将三方库的测试程序加入OpenHarmony中构建 + +## 编译工程 + +介绍编译流程与结果 + +## 运行效果 + +展示三方库在设备上运行的效果,可以贴效果图 + +## 参考资料 + +- [本文档涉及的技术补充说明](rom_integrate.md) +- [本文档引用的相关参考](rom_integrate.md) +- [相关案例参考](rom_integrate.md) diff --git a/thirdparty_template/ohos.build b/thirdparty_template/ohos.build new file mode 100755 index 0000000000000000000000000000000000000000..e955101a737592e237388a8aca36ad2c299d18b2 --- /dev/null +++ b/thirdparty_template/ohos.build @@ -0,0 +1,9 @@ +{ + "subsystem": "thirdparty", + "parts":{ + "xxx": { + "module_list": [ + ] + } + } +} \ No newline at end of file