diff --git a/docs/thirdparty_list.md b/docs/thirdparty_list.md old mode 100755 new mode 100644 index 1ca97c16b9645adc723c3fb22a9d0a9a693dc764..9cd78151c5f3a954c1ac16cda2e757ef89c085bb --- a/docs/thirdparty_list.md +++ b/docs/thirdparty_list.md @@ -1,91 +1,104 @@ # 三方库列表 -| 三方库名称 | 开源协议 | 南向 | 北向 | -| ------------------------------------------------------------ | --------------------------------------------- | ---- | ---- | -| [xerces-c](../thirdparty/xerces-c/README_zh.md) | Apache License 2.0 | 是 | 是 | -| [modbus](../thirdparty/modbus/README_zh.md) | LGPL v2.1 or Later | 是 | | -| [tinyxpath](../thirdparty/tinyxpath/README_zh.md) | zlib/libpng License | | 是 | -| [bsdiff](../thirdparty/bsdiff/README_zh.md) | BSD 2-clause license | 是 | | -| [concurrentqueue](../thirdparty/concurrentqueue/README_zh.md) | BSD License | 是 | 是 | -| [iconv](../thirdparty/iconv/README_zh.md) | LGPLv3.0 | 是 | | -| [jbig2enc](../thirdparty/jbig2enc/README_zh.md) | Apache License | 是 | | -| [leptonica](../thirdparty/leptonica/README_zh.md) | leptonica-license | 是 | | -| [libmp3lame](../thirdparty/libmp3lame/README_zh.md) | LGPL | 是 | | -| [lzma](../thirdparty/lzma/README_zh.md) | GNU LGPLv2+ | 是 | | -| [minizip-ng](../thirdparty/minizip-ng/README_zh.md) | zlib License | 是 | 是 | -| [mqtt](../thirdparty/mqtt/README_zh.md) | Eclipse Public License v2.0 | 是 | | -| [openjpeg](../thirdparty/openjpeg/README_zh.md) | 2-clauses BSD license | 是 | | -| [rapidjson](../thirdparty/rapidjson/README_zh.md) | MIT license | 是 | | -| [tinyxml2](../thirdparty/tinyxml2/README_zh.md) | zlib license | 是 | 是 | -| [unrar](../thirdparty/unrar/README_zh.md) | Apache License 2.0 | | 是 | -| [xz](../thirdparty/xz/README_zh.md) | GPLv2 | 是 | | -| [zstd](../thirdparty/zstd/README_zh.md) | BSD and GPLv2 | 是 | | -| [busybox](../thirdparty/busybox/README_zh.md) | GPL 2.0 | 是 | | -| [cryptopp](../thirdparty/cryptopp/README_zh.md) | Boost Software License and CRYPTOGAMS License | | 是 | -| [double-conversion](../thirdparty/double-conversion/README_zh.md) | BSD | | 是 | -| [hunspell](../thirdparty/hunspell/README_zh.md) | LGPL-2.1/GPL-2.0 License | | 是 | -| [jasper](../thirdparty/jasper/README_zh.md) | JasPer License Version 2.0 | | 是 | -| [json-schema-validator](../thirdparty/json-schema-validator/README_zh.md) | MIT License | | 是 | -| [libtommath](../thirdparty/libtommath/README_zh.md) | The LibTom license | | 是 | -| [libxlsxwriter](../thirdparty/libxlsxwriter/README_zh.md) | FreeBSD license | | 是 | -| [nghttp3](../thirdparty/nghttp3/README_zh.md) | MIT License | | 是 | -| [phf](../thirdparty/phf/README_zh.md) | MIT License | | 是 | -| [pugixml](../thirdparty/pugixml/README_zh.md) | MIT License | | 是 | -| [tinyexr](../thirdparty/tinyexr/README_zh.md) | 3-clause BSD | | 是 | -| [WavPack](../thirdparty/WavPack/README_zh.md) | BSD 3-Clause "New" or "Revised" License | | 是 | -| [libsrtp](../thirdparty/libsrtp/README_zh.md) | Copyright (c) 2001-2017 Cisco Systems | | 是 | -| [log4cplus](../thirdparty/log4cplus/README_zh.md) | BSD 2.0/Apache 2.0 | | 是 | -| [zxing-cpp](../thirdparty/zxing-cpp/README_zh.md) | Apache License 2.0 | | 是 | -| [libsvm](../thirdparty/libsvm/README_zh.md) | BSD | | 是 | -| [geos](../thirdparty/geos/README_zh.md) | LGPL v2.1 | | 是 | -| [jbig2dec](../thirdparty/jbig2dec/README_zh.md) | GPLv3 | | 是 | -| [faad2](../thirdparty/faad2/README_zh.md) | GPLv2 | | 是 | -| [libxls](../thirdparty/libxls/README_zh.md) | BSD | | 是 | -| [libtess2](../thirdparty/libtess2/README_zh.md) | SGI FREE SOFTWARE LICENSE B | | 是 | -| [djvulibre](../thirdparty/djvulibre/README_zh.md) | GPLv2 | | 是 | -| [expat](../thirdparty/libexpat/README_zh.md) | MIT License | | 是 | -| [exiv2](../thirdparty/exiv2/README_zh.md) | GPL 2.0 | | 是 | -| [libpng](../thirdparty/libpng/README_zh.md) | zlib/libpng License | | 是 | -| [soundtouch](../thirdparty/soundtouch/README_zh.md) | LGPLv2.1 | | 是 | -| [jbigkit](../thirdparty/jbigkit/README_zh.md) | GNU General Public License | | 是 | -| [zbar](../thirdparty/zbar/README_zh.md) | LGPL2.1 | | 是 | -| [marisa-trie](../thirdparty/marisa-trie/README_zh.md) | LGPL-2.1/GPL-2.0 | | 是 | -| [fribidi](../thirdparty/fribidi/README_zh.md) | LGPL-2.1 license | | 是 | -| [cJSON](../thirdparty/cJSON/README_zh.md) | MIT license | | 是 | -| [libqrencode](../thirdparty/libqrencode/README_zh.md) | MIT license | | 是 | -| [pupnp](../thirdparty/pupnp/README_zh.md) | LGPL-2.1 license | | 是 | -| [sonic](../thirdparty/sonic/README_zh.md) | Apache License 2.0 | | 是 | -| [libzip](../thirdparty/libzip/README_zh.md) | BSD License | | 是 | -| [harfbuzz](../thirdparty/harfbuzz/README_zh.md) | Old MIT | | 是 | -| [googletest](../thirdparty/googletest/README_zh.md) | BSD-3-Clause license | | 是 | -| [jsoncpp](../thirdparty/jsoncpp/README_zh.md) | MIT License | | 是 | -| [kissfft](../thirdparty/kissfft/README_zh.md) | BSD-3-Clause | | 是 | -| [gmp](../thirdparty/gmp/README_zh.md) | GNU LGPL v3 \| GNU GPL v2 | | 是 | -| [jpeg](../thirdparty/jpeg/README_zh.md) | Libjpeg License | | 是 | -| [miniini](../thirdparty/miniini/README_zh.md) | MIT License | | 是 | -| [pixman](../thirdparty/pixman/README_zh.md) | MIT License | | 是 | -| [libheif](../thirdparty/libheif/README_zh.md) | GNU LESSER GENERAL PUBLIC LICENSE | | 是 | -| [libxml2](../thirdparty/libxml2/README_zh.md) | MIT License | | 是 | -| [sqlite](../thirdparty/sqlite/README_zh.md) | Public Domain | | 是 | -| [libuuid](../thirdparty/libuuid/README_zh.md) | BSD | | 是 | -| [giflib](../thirdparty/giflib/README_zh.md) | giflib COPYING | | 是 | -| [lcms2](../thirdparty/lcms2/README_zh.md) | MIT License | | 是 | -| [websocketpp](../thirdparty/websocketpp/README_zh.md) | websocketpp license | | 是 | -| [p7zip](../thirdparty/p7zip/README_zh.md) | LGPL | | 是 | -| [freetype2](../thirdparty/freetype2/README_zh.md) | eneral Public License] | | 是 | -| [curl](../thirdparty/curl/README_zh.md) | MIT License | | 是 | -| [openssl](../thirdparty/openssl/README_zh.md) | Apache License 2.0 | | 是 | -| [libdash](../thirdparty/libdash/README_zh.md) | LGPLv2.1 | | 是 | -| [mythes](../thirdparty/mythes/README_zh.md) | BSD | | 是 | -| [libass](../thirdparty/libass/README_zh.md) | ISC License | | 是 | -| [diff-match-patch-cpp-stl](../thirdparty/diff-match-patch-cpp-stl/README_zh.md) | Apache License 2.0 | | 是 | -| [uchardet](../thirdparty/uchardet/README_zh.md) | OZILLA PUBLIC LICENSE/PLV2/GPLV2 | | 是 | -| [unzip](../thirdparty/unzip/README_zh.md) | Info-ZIP license | | 是 | -| [xmlrpc-c](../thirdparty/xmlrpc-c/README_zh.md) | BSD license | | 是 | -| [protobuf](../thirdparty/protobuf/README_zh.md) | BSD-3-Clause license | | 是 | -| [unixODBC](../thirdparty/unixODBC/README_zh.md) | GNU Lesser General Public License v2.1 | | 是 | -| [fmt](../thirdparty/fmt/README_zh.md) | GNU Lesser General Public License | | 是 | -| [assimp](../thirdparty/assimp/README_zh.md) | 3-clause BSD | | 是 | -| [thrift](../thirdparty/thrift/README_zh.md) | Apache License 2.0 | | 是 | -| [caffe](../thirdparty/caffe/README_zh.md) | caffe license | | 是 | - +| 三方库名称 | 南向 | 北向 | +| ------------------------------------------------------------ | ---- | ---- | +| [xerces-c](../thirdparty/xerces-c/README_zh.md) | 是 | 是 | +| [modbus](../thirdparty/modbus/README_zh.md) | 是 | | +| [tinyxpath](../thirdparty/tinyxpath/README_zh.md) | | 是 | +| [bsdiff](../thirdparty/bsdiff/README_zh.md) | 是 | | +| [concurrentqueue](../thirdparty/concurrentqueue/README_zh.md) | 是 | 是 | +| [iconv](../thirdparty/iconv/README_zh.md) | 是 | | +| [jbig2enc](../thirdparty/jbig2enc/README_zh.md) | 是 | | +| [leptonica](../thirdparty/leptonica/README_zh.md) | 是 | | +| [libmp3lame](../thirdparty/libmp3lame/README_zh.md) | 是 | | +| [lzma](../thirdparty/lzma/README_zh.md) | 是 | | +| [minizip-ng](../thirdparty/minizip-ng/README_zh.md) | 是 | 是 | +| [mqtt](../thirdparty/mqtt/README_zh.md) | 是 | | +| [openjpeg](../thirdparty/openjpeg/README_zh.md) | 是 | | +| [rapidjson](../thirdparty/rapidjson/README_zh.md) | 是 | | +| [tinyxml2](../thirdparty/tinyxml2/README_zh.md) | 是 | 是 | +| [unrar](../thirdparty/unrar/README_zh.md) | | 是 | +| [xz](../thirdparty/xz/README_zh.md) | 是 | | +| [zstd](../thirdparty/zstd/README_zh.md) | 是 | | +| [busybox](../thirdparty/busybox/README_zh.md) | 是 | | +| [cryptopp](../thirdparty/cryptopp/README_zh.md) | | 是 | +| [double-conversion](../thirdparty/double-conversion/README_zh.md) | | 是 | +| [hunspell](../thirdparty/hunspell/README_zh.md) | | 是 | +| [jasper](../thirdparty/jasper/README_zh.md) | | 是 | +| [json-schema-validator](../thirdparty/json-schema-validator/README_zh.md) | | 是 | +| [libtommath](../thirdparty/libtommath/README_zh.md) | | 是 | +| [libxlsxwriter](../thirdparty/libxlsxwriter/README_zh.md) | | 是 | +| [nghttp3](../thirdparty/nghttp3/README_zh.md) | | 是 | +| [phf](../thirdparty/phf/README_zh.md) | | 是 | +| [pugixml](../thirdparty/pugixml/README_zh.md) | | 是 | +| [tinyexr](../thirdparty/tinyexr/README_zh.md) | | 是 | +| [WavPack](../thirdparty/WavPack/README_zh.md) | | 是 | +| [libsrtp](../thirdparty/libsrtp/README_zh.md) | | 是 | +| [log4cplus](../thirdparty/log4cplus/README_zh.md) | | 是 | +| [zxing-cpp](../thirdparty/zxing-cpp/README_zh.md) | | 是 | +| [libsvm](../thirdparty/libsvm/README_zh.md) | | 是 | +| [geos](../thirdparty/geos/README_zh.md) | | 是 | +| [jbig2dec](../thirdparty/jbig2dec/README_zh.md) | | 是 | +| [faad2](../thirdparty/faad2/README_zh.md) | | 是 | +| [libxls](../thirdparty/libxls/README_zh.md) | | 是 | +| [libtess2](../thirdparty/libtess2/README_zh.md) | | 是 | +| [djvulibre](../thirdparty/djvulibre/README_zh.md) | | 是 | +| [expat](../thirdparty/libexpat/README_zh.md) | | 是 | +| [exiv2](../thirdparty/exiv2/README_zh.md) | | 是 | +| [libpng](../thirdparty/libpng/README_zh.md) | | 是 | +| [soundtouch](../thirdparty/soundtouch/README_zh.md) | | 是 | +| [jbigkit](../thirdparty/jbigkit/README_zh.md) | | 是 | +| [zbar](../thirdparty/zbar/README_zh.md) | | 是 | +| [marisa-trie](../thirdparty/marisa-trie/README_zh.md) | | 是 | +| [fribidi](../thirdparty/fribidi/README_zh.md) | | 是 | +| [cJSON](../thirdparty/cJSON/README_zh.md) | | 是 | +| [libqrencode](../thirdparty/libqrencode/README_zh.md) | | 是 | +| [pupnp](../thirdparty/pupnp/README_zh.md) | | 是 | +| [sonic](../thirdparty/sonic/README_zh.md) | | 是 | +| [libzip](../thirdparty/libzip/README_zh.md) | | 是 | +| [harfbuzz](../thirdparty/harfbuzz/README_zh.md) | | 是 | +| [googletest](../thirdparty/googletest/README_zh.md) | | 是 | +| [jsoncpp](../thirdparty/jsoncpp/README_zh.md) | | 是 | +| [kissfft](../thirdparty/kissfft/README_zh.md) | | 是 | +| [gmp](../thirdparty/gmp/README_zh.md) | | 是 | +| [jpeg](../thirdparty/jpeg/README_zh.md) | | 是 | +| [miniini](../thirdparty/miniini/README_zh.md) | | 是 | +| [pixman](../thirdparty/pixman/README_zh.md) | | 是 | +| [libheif](../thirdparty/libheif/README_zh.md) | | 是 | +| [libxml2](../thirdparty/libxml2/README_zh.md) | | 是 | +| [sqlite](../thirdparty/sqlite/README_zh.md) | | 是 | +| [libuuid](../thirdparty/libuuid/README_zh.md) | | 是 | +| [giflib](../thirdparty/giflib/README_zh.md) | | 是 | +| [lcms2](../thirdparty/lcms2/README_zh.md) | | 是 | +| [websocketpp](../thirdparty/websocketpp/README_zh.md) | | 是 | +| [p7zip](../thirdparty/p7zip/README_zh.md) | | 是 | +| [freetype2](../thirdparty/freetype2/README_zh.md) | | 是 | +| [curl](../thirdparty/curl/README_zh.md) | | 是 | +| [openssl](../thirdparty/openssl/README_zh.md) | | 是 | +| [libdash](../thirdparty/libdash/README_zh.md) | | 是 | +| [mythes](../thirdparty/mythes/README_zh.md) | | 是 | +| [libass](../thirdparty/libass/README_zh.md) | | 是 | +| [diff-match-patch-cpp-stl](../thirdparty/diff-match-patch-cpp-stl/README_zh.md) | | 是 | +| [uchardet](../thirdparty/uchardet/README_zh.md) | | 是 | +| [unzip](../thirdparty/unzip/README_zh.md) | | 是 | +| [xmlrpc-c](../thirdparty/xmlrpc-c/README_zh.md) | | 是 | +| [protobuf](../thirdparty/protobuf/README_zh.md) | | 是 | +| [unixODBC](../thirdparty/unixODBC/README_zh.md) | | 是 | +| [fmt](../thirdparty/fmt/README_zh.md) | | 是 | +| [assimp](../thirdparty/assimp/README_zh.md) | | 是 | +| [thrift](../thirdparty/thrift/README_zh.md) | | 是 | +| [caffe](../thirdparty/caffe/README_zh.md) | | 是 | +| [libyuv](../thirdparty/libyuv/README_zh.md) | | 是 | +| [ffmpeg](../thirdparty/ffmpeg/README_zh.md) | | 是 | +| [fftw3](../thirdparty/fftw3/README_zh.md) | | 是 | +| [avro](../thirdparty/avro/README_zh.md) | | 是 | +| [libarchive](../thirdparty/libarchive/README_zh.md) | | 是 | +| [glm](../thirdparty/glm/README_zh.md) | | 是 | +| [stb](../thirdparty/stb/README_zh.md) | | 是 | +| [md5-c](../thirdparty/md5-c/README_zh.md) | | 是 | +| [fdk-aac](../thirdparty/fdk-aac/README_zh.md) | | 是 | +| [lame](../thirdparty/lame/README_zh.md) | | 是 | +| [libwebp](../thirdparty/libwebp/README_zh.md) | | 是 | +| [tiff](../thirdparty/tiff/README_zh.md) | | 是 | +| [behaviortree](../thirdparty/behaviortree/README_zh.md) | 是 | | +| | | | diff --git a/lycium/CItools/README_zh.md b/lycium/CItools/README_zh.md old mode 100755 new mode 100644 index 268e2a1b504048ba1d1de67de35b2f98e45ae015..92165edb65021642b180b4cf1bdb09f4f0611174 --- a/lycium/CItools/README_zh.md +++ b/lycium/CItools/README_zh.md @@ -1,23 +1,145 @@ -# 三方库测试验证工具说明文档 +# CI环境搭建 -## 背景 -业界内C/C++三方库测试框架多种多样,我们无法将其统一,为了保证三方库功能完整,我们基于原生库的测试用例进行测试验证。为此,我们需要集成了一套可以在OHOS上进行make test等操作的环境;有如下两种集成方式。 +## 搭建步骤 -## 集成方式 +CI环境搭建首先我们要明确需要的工具,然后再下载工具源码,编译安装完成后,配置到ohos设置中。下面先来介绍工具源码编译部分 -### 二进制文件集成 +### 工具源码编译 -我们已经编译出测试验证工具的二进制文件,可以直接参考[CItools README](https://gitee.com/han_jin_fei/lycium-citools)文档,进行环境搭建;如需了解编译过程,请查看源码编译集成段落。 +三方库测试主要是make test,ctest等测试命令,因此需要集成make、cmake等工具,如下列表即是工具源码编译指导文档,按照文档操作可以成功编译出二进制文件,当然我们也提供了已经编译好的二进制文件,请点击[下载链接](https://gitee.com/han_jin_fei/lycium-citools) 。有了二进制文件后,我们来进行环境搭建 -### 源码编译集成 +| 工具名称 | 32位编译指导文档路径 | 64位编译指导文档路径 | +| :-------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| cmake | [cmake_armeabi_v7a](./cmake/cmake_armeabi_v7a_compilation_instructions.md) | [cmake_arm64_v8a](./cmake/cmake_arm64_v8a_compilation_instructions.md) | +| make | [make_armeabi_v7a](./make/make_armeabi-v7a_Compilation_instructions.md) | [make_arm64_v8a](./make/make_arm64_v8a_Compilation_instructions.md) | +| busybox | [busybox_armeabi_v7a](./busybox/busybox_armeabi-v7a_Compilation_instructions.md) | [busybox_arm64_v8a](./busybox/busybox_arm64_v8a_Compilation_instructions.md) | +| perl | [perl_armeabi_v7a](./perl/perl_armeabi-v7a_Compilation_instructions.md) | [perl_arm64_v8a](./perl/perl_arm64_v8a_Compilation_instructions.md) | +| shell_cmd | [shell_cmd_armeabi_v7a](./shell_cmd/shell_cmd_armeabi_v7a_Compilation_instructions.md) | [shell_cmd_arm64_v8a](./shell_cmd/shell_cmd_arm64_v8a_Compilation_instructions.md) | -cmake、make等工具源码集成指导文档,如下列表所示,可按照指导文档编译出二进制文件,再拷贝到OHOS上,进行环境搭建。 +### 手动搭建环境 -| 工具名称 | 编译指导文档路径32位 | 编译指导文档路径64位 | -| :--------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| cmake 32位 | [cmake_32位](./cmake/cmake_armeabi_v7a_compilation_instructions.md) | [cmake_64位](./cmake/cmake_arm64_v8a_compilation_instructions.md) | -| make | [make_32位](./make/make_armeabi-v7a_Compilation_instructions.md) | [make_64位](./make/make_arm64_v8a_Compilation_instructions.md) | -| busybox | [busybox_32位](./busybox/busybox_armeabi-v7a_Compilation_instructions.md) | [busybox_64位](./busybox/busybox_arm64_v8a_Compilation_instructions.md) | -| perl | [perl_32位](./perl/perl_armeabi-v7a_Compilation_instructions.md) | [perl_64位](./perl/perl_arm64_v8a_Compilation_instructions.md) | -| shell_cmd | [shell_cmd_32位](./shell_cmd/shell_cmd_armeabi_v7a_Compilation_instructions.md) | [shell_cmd_64位](./shell_cmd/shell_cmd_arm64_v8a_Compilation_instructions.md) | +工具编译完成后,将生成的二进制文件拷贝到ohos 设备,配置测试环境。以 arm32位系统为例 +- 工具编译安装完成后,打包拷贝出编译安装目录,修改安装目录文件名,以 armeabi_v7a为例可统一修改为: + + arm_cmake_make.tar.gz 、arm_busybox.tar.gz、arm_perl.tar.gz、arm_shell_cmd.tar.gz + + 如:按照指导文档编译安装完cmake后,安装目录是armeabi_v7a,make编译安装目录是install,通过如下命令统一打包为arm_cmake_make.tar.gz + + ```shell + #将cmake和make工具合并,拷贝cmake安装目录下的bin文件夹中的文件,到make安装目录 + cp armeabi_v7a/bin/* ./install/bin + #修改安装目录文件名 + mv install arm_cmake + #压缩安装目录 + tar -zcvf arm_cmake.tar.gz arm_cmake + ``` + +​ 其他的工具也需要修改一下安装目录文件名,然后进行打包压缩 + +- 将工具包上传进 ohos 设备 /data 目录 + + ```shell + #发送到OHOS系统开发板上 + hdc file send xxx\arm_cmake_make.tar.gz /data + hdc file send xxx\arm_busybox.tar.gz /data + hdc file send xxx\arm_perl.tar.gz /data + hdc file send xxx\arm_shell_cmd.tar.gz /data + ``` + +- 进入 ohos 设备,手动配置环境 + + ```shell + #根目录挂载 读写权限 + mount -o remount,rw / + #创建 /usr 目录 + mkdir /usr + #进入 /data 目录 + cd /data + #解压所有工具压缩包 + tar -zxvf *.tar.gz + #拷贝 cmake make perl shell 工具二进制到 /usr 目录 + cp -rf arm_cmake_make/* /usr + cp -rf arm_perl/* /usr + cp -rf arm_shell_cmd/* /usr + #验证 + cmake -version + make -v + perl -v + #拷贝 busybox 工具到 /bin + cp -rf arm_busybox/bin/busybox /bin + #将 toybox 替换为 busybox + cd /bin + mv toybox toybox_bak + #toybox 被改为 toybox_bak 后, 导致原来的命令无法直接使. 需要采用 "toybox_bak xxxcmd" 的模式使用, 如下 + toybox_bak mv busybox toybox + #验证 + diff -v + #toybox 原本是不支持 diff 命令,这里可以直接使用diff是因为, toybox已经创建了diff的软连接, 但是toybox并没有真正实现. 因此替换为我们编译的busybox + #基本的环境搭建完成 + ``` + +### 自动搭建环境 + +将编译完成二进制文件压缩打包后,运行./env_build.sh脚本进行自动安装 + +- arm32位打包为:arm_cmake_make.tar.gz 、arm_busybox.tar.gz、arm_perl.tar.gz、arm_shell_cmd.tar.gz + +- arm64位打包为:aarch64_cmake_make.tar.gz 、aarch64_busybox.tar.gz、aarch64_perl.tar.gz、aarch64_shell_cmd.tar.gz + +- cmake_make需要把cmake和make编译安装目录统一 + +  ![cp](images/cmake_make_cp.png) + +  ![tar](images/cmake_make_tar.png) + +- shell_cmd也需要把bash和mawk这两个命令的编译安装目录统一 + +  ![shell](images/shell_cmd.png) + +- 最后通过hdc工具将所有二进制文件和自动安装脚本发送到ohos设置,执行./env_build.sh安装脚本,有如下打印后表示安装成功 + +  ![cp](images/set_success.png) + +## FAQ + +### cmake FAQ + +- cmake构建项目测试时可能出现的问题以及解决方案: + + cmake 及相关工具我们默认安装在 /usr/bin 路径下, 因为编译时使用的 cmake 是 ohos sdk 内的 cmake, 而运行 make test 是在测试机上,测试机不存在ohos sdk, 因此在运行 make test 时会出现, cmake 路径找不到的情况。 + +- 解决方案1: 对于 cmake 编译的项目直接执行 ctest 测试, 不使用 "make test" 执行测试 + +  ![img](images/ctest_vs_make-test.png) + +- 解决方案2: "cp -rf aarch64_cmake_make/* xxxdir" xxxdir 为报错日志要找的 cmake 路径 + +### perl FAQ + +- perl 执行程序可能出现的问题以及解决方案 + + 部分库在测试时, 会调用 perl 脚本. perl 工具我们在前面已经安装, 但是 perl 在运行时会依赖一些 perl 源码中的脚本, 这些脚本没有被很好的安装. 因此 perl 在运行时, 有可能会出现加载失败的问题. + +- 问题现象: + + perl 无法加载 xxx.pm (这里pm文件是源码提供的 perl 脚本文件). 需要找到 xxx.pm 并拷贝到指定的目录(图片中 @INC contains: 指定的目录随便挑一个, 假如使用第一个, 就要找到 xxx.pm 然后拷贝到 /data/perl/lib/perl5/site_perl/5.34.1/arm-linux **注意我这里的截屏是在arm 32位oh设备的**) + +  ![img](images/perl_error.png) + +- 解决方案1: + + 使用 find 命令在, perl-5.34.1 源码中. 搜索 xxx.pm. 如果找到多个, 优先 dist 目录的.将找到的 pm 文件拷贝到 /data/perl/lib/perl5/site_perl/5.34.1/arm-linux 目录. **注意有些pm文件可能带有目录. 则需要先判断 /data/perl/lib/perl5/site_perl/5.34.1/arm-linux 是否存在目录, 如果没有则需要创建目录后再拷贝. 同样在 find 时也优先使用前缀目录一样的 pm 文件** + +  ![img](images/pm_find.png) + +- 解决方案2 + + 使用[下载链接](https://gitee.com/han_jin_fei/lycium-citools)提供的 perl5 库目录替换 + + ```shell + # 使用中如果报 perl 找不到 pm 文件错误,请执行以下两行,替换 perl5 目录 + # 进入 /data 目录 + rm -rf perl/lib/perl5 + mv perl5 perl/lib + ``` diff --git a/lycium/CItools/env_build.sh b/lycium/CItools/env_build.sh new file mode 100644 index 0000000000000000000000000000000000000000..55d1c1e28884b7e87d1d46cd805c1c05534f485c --- /dev/null +++ b/lycium/CItools/env_build.sh @@ -0,0 +1,169 @@ +#!/bin/sh + +mount -o remount,rw / + +PREFIX=/ +BIN_DIR=${PREFIX}usr/bin +OHOS_NDK_BIN=/ohos-sdk/linux/native/build-tools/cmake/bin/ +TAR_SUFFIX=tar.gz + +CMAKE=cmake_make +BUSYBOX=busybox +PERL=perl +SHELL_CMD=shell_cmd + +HOST=arm + +if [ ! -d ${BIN_DIR} ]; then + echo "create bin dir!" + mkdir -p ${BIN_DIR} + chmod -R 777 ${BIN_DIR} +fi +if [ ! -d ${PREFIX}/bin ]; then + echo "create bin dir!" + mkdir -p ${PREFIX}/bin + chmod -R 777 ${PREFIX}/bin +fi + +if [ "$1" == "aarch64" ];then + HOST=aarch64 +fi + +function unpack(){ + if [ ! -f $1 ];then + echo "no such file or directory: $1" + exit 1 + fi + + tar -zxf $1 + if [ $? -ne 0 ];then + echo "unpack $1 failed!" + exit 1 + fi + + echo "unpack $1 success!" + return 0 +} + +function copy_files(){ + if [ ! -d $1 ]; then + echo "no such file or directory : $1" + exit 1 + fi + + cp -arf $1/bin/* ${BIN_DIR}/ + + if [ $? -ne 0 ]; then + echo "cp files error!" + exit 1 + fi + + echo "cp $1 files success" + return 0 +} + +function set_busybox(){ + CMD_ARRAY=("diff" "tr" "expr" "awk") + cp ${HOST}_${BUSYBOX}/bin/busybox ${PREFIX}/bin/ + if [ $? -ne 0 ];then + echo "copy busybox failed!" + exit 1 + fi + + cur_dir=`pwd` + cd ${PREFIX}/bin + + for cmd in ${CMD_ARRAY[@]} + do + echo "cmd : ${cmd}" + if [ -f $cmd ]; then + rm ${cmd} + fi + ln -s busybox ${cmd} + if [ $? -ne 0 ]; then + echo " create ${cmd} link failed!" + cd ${cur_dir} + exit 1 + fi + done + + cd ${cur_dir} + + return 0 +} + +function copyBinFiles(){ + BinFils=("sed" "env") + cur_dir=`pwd` + cd /bin/ + + for bin in ${BinFils[@]} + do + cp ${bin} ${BIN_DIR}/ + done + + cd ${cur_dir} + + return 0 +} + +echo "start install the CI env tools" + +CMAKE_TAR=${HOST}_${CMAKE}.${TAR_SUFFIX} +unpack ${CMAKE_TAR} +if [ $? -ne 0 ]; then + echo "unpack cmake failed!" + exit 1 +fi +copy_files ${HOST}_${CMAKE} +if [ $? -ne 0 ];then + echo "cp cmake files failed!" + exit 1 +fi +rm -rf ${HOST}_${CMAKE} + +BUSYBOX_TAR=${HOST}_${BUSYBOX}.${TAR_SUFFIX} +unpack ${BUSYBOX_TAR} +if [ $? -ne 0 ]; then + echo "unpack busybox failed!" + exit 1 +fi +set_busybox +rm -rf ${HOST}_${BUSYBOX} + +PERL_TAR=${HOST}_${PERL}.${TAR_SUFFIX} +unpack ${PERL_TAR} +if [ $? -ne 0 ];then + echo "unpack perl failed!" + exit 1 +fi + +cp -arf ${HOST}_${PERL}/* ${PREFIX}/usr/ +if [ $? -ne 0 ];then + echo "cp perl files failed!" + exit 1 +fi + +SHELL_CMD_TAR=${HOST}_${SHELL_CMD}.${TAR_SUFFIX} +unpack ${SHELL_CMD_TAR} +if [ $? -ne 0 ]; then + echo "unpack shell cmd failed!" + exit 1 +fi +copy_files ${HOST}_${SHELL_CMD} +if [ $? -ne 0 ];then + echo "cp cmd shell files failed!" + exit 1 +fi +rm -rf ${HOST}_${SHELL_CMD} + +echo "check ohos-sdk" +if [ ! -d ${OHOS_NDK_BIN} ]; then + mkdir -p ${OHOS_NDK_BIN} +fi +cp /usr/bin/cmake ${OHOS_NDK_BIN} +cp /usr/bin/ctest ${OHOS_NDK_BIN} + +copyBinFiles + +echo "set CI env success!!" diff --git a/lycium/CItools/images/cmake_make_cp.png b/lycium/CItools/images/cmake_make_cp.png new file mode 100644 index 0000000000000000000000000000000000000000..17635202f8731f7f4efeb3360d3819858e83425a Binary files /dev/null and b/lycium/CItools/images/cmake_make_cp.png differ diff --git a/lycium/CItools/images/cmake_make_tar.png b/lycium/CItools/images/cmake_make_tar.png new file mode 100644 index 0000000000000000000000000000000000000000..6d92d4b7c608045d08caf7d7e376c0940baacfc2 Binary files /dev/null and b/lycium/CItools/images/cmake_make_tar.png differ diff --git a/lycium/CItools/images/ctest_vs_make-test.png b/lycium/CItools/images/ctest_vs_make-test.png new file mode 100644 index 0000000000000000000000000000000000000000..349bba48facddc2998cf3299581f4eed0f623fc4 Binary files /dev/null and b/lycium/CItools/images/ctest_vs_make-test.png differ diff --git a/lycium/CItools/images/perl_error.png b/lycium/CItools/images/perl_error.png new file mode 100644 index 0000000000000000000000000000000000000000..d83c96bf30501027fad13a23a5147404643581dd Binary files /dev/null and b/lycium/CItools/images/perl_error.png differ diff --git a/lycium/CItools/images/pm_find.png b/lycium/CItools/images/pm_find.png new file mode 100644 index 0000000000000000000000000000000000000000..1d755a29aa848b081e8bb396a01cf09eab49e081 Binary files /dev/null and b/lycium/CItools/images/pm_find.png differ diff --git a/lycium/CItools/images/set_success.png b/lycium/CItools/images/set_success.png new file mode 100644 index 0000000000000000000000000000000000000000..0a3ee7733d877d276f194e8f99ae5576b3dc656d Binary files /dev/null and b/lycium/CItools/images/set_success.png differ diff --git a/lycium/CItools/images/shell_cmd.png b/lycium/CItools/images/shell_cmd.png new file mode 100644 index 0000000000000000000000000000000000000000..bc55511c7134d4aafaf53735c22296c232d40ee8 Binary files /dev/null and b/lycium/CItools/images/shell_cmd.png differ diff --git a/lycium/CItools/perl/media/build_success.png b/lycium/CItools/perl/media/build_success.png new file mode 100644 index 0000000000000000000000000000000000000000..42ecf3aeb29e6cdc8e9adc22034a5460727323b8 Binary files /dev/null and b/lycium/CItools/perl/media/build_success.png differ diff --git a/lycium/CItools/perl/media/file32.png b/lycium/CItools/perl/media/file32.png new file mode 100644 index 0000000000000000000000000000000000000000..24547390dab2bdda89b48f7174bccee4480f2a1a Binary files /dev/null and b/lycium/CItools/perl/media/file32.png differ diff --git a/lycium/CItools/perl/media/file64.png b/lycium/CItools/perl/media/file64.png new file mode 100644 index 0000000000000000000000000000000000000000..a2b38203e2cb510c8d3597296464108054286372 Binary files /dev/null and b/lycium/CItools/perl/media/file64.png differ diff --git a/lycium/CItools/perl/media/install_32.png b/lycium/CItools/perl/media/install_32.png new file mode 100644 index 0000000000000000000000000000000000000000..c9feb7c253e04c640b77468ba26bd051b2485ad7 Binary files /dev/null and b/lycium/CItools/perl/media/install_32.png differ diff --git a/lycium/CItools/perl/media/install_64.png b/lycium/CItools/perl/media/install_64.png new file mode 100644 index 0000000000000000000000000000000000000000..389e678fbb9996bfd57fcc443849153ab115737a Binary files /dev/null and b/lycium/CItools/perl/media/install_64.png differ diff --git a/lycium/CItools/perl/media/run.png b/lycium/CItools/perl/media/run.png new file mode 100644 index 0000000000000000000000000000000000000000..698cfb47900d4426a8b6b7d274e4224eb520aa57 Binary files /dev/null and b/lycium/CItools/perl/media/run.png differ diff --git a/lycium/CItools/perl/perl_arm64_v8a_Compilation_instructions.md b/lycium/CItools/perl/perl_arm64_v8a_Compilation_instructions.md new file mode 100644 index 0000000000000000000000000000000000000000..c88f83eca61b2d7fa8dd2f09cadfc900c80f737a --- /dev/null +++ b/lycium/CItools/perl/perl_arm64_v8a_Compilation_instructions.md @@ -0,0 +1,96 @@ +# perl 工具arm64-v8a交叉编译说明 + +## 简介 +Perl:一种功能丰富的计算机程序语言,运行在超过100种计算机平台上,适用广泛,从大型机到便携设备,从快速原型创建到大规模可扩展开发。 + +## 编译步骤 + +### 编译工具链下载 + +- 64位编译工具:gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz [下载链接](https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz) + +### 解压编译工具链 + +- 解压64位 gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz + + +- 进入解压后的文件夹,查看bin目录下就有我们编译用到的工具链 + +### 下载解压perl源码 + +- 下载perl源码,[下载链接]( https://www.cpan.org/src/5.0/perl-5.36.1.tar.gz) (以5.36.1为例) +- 通过tar命令解压源码 tar -zxf perl-5.36.1.tar.gz + +### 下载perl交叉编译包源码 + +- 下载perl交叉编译包源码,[下载链接]( https://github.com/arsv/perl-cross/releases/download/1.4.1/perl-cross-1.4.1.tar.gz)(5.36.1版本对应的perl-cross就是1.4.1版本) +- 进入perl源码解压后目录 cd perl-5.36.1 +- 在perl上解压perl交叉编译包,覆盖Makefile,命令如下 + +```shell +tar --strip-components=1 -zxf ../perl-cross-1.4.1.tar.gz +``` + +### 设置交叉编译环境 + +- 设置64位交叉编译环境, xxx 是表示工具链存放的目录路径 + +```shell +export TOOLS=/xxx/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin +export AS=${TOOLS}/aarch64-linux-gnu-as +export CC=${TOOLS}/aarch64-linux-gnu-gcc +export CXX=${TOOLS}/aarch64-linux-gnu-g++ +export LD=${TOOLS}/aarch64-linux-gnu-ld +export STRIP=${TOOLS}/aarch64-linux-gnu-strip +export RANLIB=${TOOLS}/aarch64-linux-gnu-ranlib +export OBJDUMP=${TOOLS}/aarch64-linux-gnu-objdump +export OBJCOPY=${TOOLS}/aarch64-linux-gnu-objcopy +export NM=${TOOLS}/aarch64-linux-gnu-gcc-nm +export AR=${TOOLS}/aarch64-linux-gnu-ar +export READELF="${TOOLS}/aarch64-linux-gnu-readelf" +``` + +### 生成makefile + +- 执行如下命令生成makefile + +```shell +./configure --target=aarch64-linux-gnu --prefix="${PWD}/arm64_v8a_install" +``` + +### 编译perl源码 + +执行 make CFLAGES="-static" LDFLAGS="-static" VERBOSE=1 命令编译perl源码,执行结果截图如下 + + ![buildsuccess](media/build_success.png) + +### 安装perl + +执行 make install,执行结果截图如下 + + ![install](media/install_64.png) + +### 编译安装完成 + +进入安装目录下的arm64_v8a_install/bin文件夹,并可通过file perl看到文件属性 + + ![file64](media/file64.png) + +### 运行结果 + +将安装目录arm64_v8a_install文件夹压缩打包,发送到OHOS开发板中 + +```shell +#打包对应编译目录下的install文件夹 +tar -zcvf arm64_v8a_install.tar.gz arm64_v8a_install/ +#发送到OHOS系统开发板上 +hdc file send xxx\arm64_v8a_install.tar.gz /data +#进入开发板/data,解压arm64_v8a_install.tar.gz +hdc shell +cd /data +tar -zxvf arm64_v8a_install.tar.gz +``` + +进入arm64_v8a_install/bin目录,执行./perl --version 效果如下截图 + + ![run](./media/run.png) diff --git a/lycium/CItools/perl/perl_armeabi-v7a_Compilation_instructions.md b/lycium/CItools/perl/perl_armeabi-v7a_Compilation_instructions.md new file mode 100644 index 0000000000000000000000000000000000000000..b27c3eb17c388a0e84f967406da7bee41943944b --- /dev/null +++ b/lycium/CItools/perl/perl_armeabi-v7a_Compilation_instructions.md @@ -0,0 +1,96 @@ +# perl 工具armeabi-v7a交叉编译说明 + +## 简介 +Perl:一种功能丰富的计算机程序语言,运行在超过100种计算机平台上,适用广泛,从大型机到便携设备,从快速原型创建到大规模可扩展开发。 + +## 编译步骤 + +### 编译工具链下载 + +- 32位编译工具:gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi.tar.xz [下载链接](https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/arm-linux-gnueabi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi.tar.xz) + +### 解压编译工具链 + +- 解压32位 tar xvJf gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi.tar.xz + + +- 进入解压后的文件夹,查看bin目录下就有我们编译用到的工具链 + +### 下载解压perl源码 + +- 下载perl源码,[下载链接]( https://www.cpan.org/src/5.0/perl-5.36.1.tar.gz) (以5.36.1为例) +- 通过tar命令解压源码 tar -zxf perl-5.36.1.tar.gz + +### 下载perl交叉编译包源码 + +- 下载perl交叉编译包源码,[下载链接]( https://github.com/arsv/perl-cross/releases/download/1.4.1/perl-cross-1.4.1.tar.gz)(5.36.1版本对应的perl-cross就是1.4.1版本) +- 进入perl源码解压后目录 cd perl-5.36.1 +- 在perl上解压perl交叉编译包,覆盖Makefile,命令如下 + +```shell +tar --strip-components=1 -zxf ../perl-cross-1.4.1.tar.gz +``` + +### 设置交叉编译环境 + +- 设置32位交叉编译环境, xxx 是表示工具链存放的目录路径 + +```shell +export TOOLS=/xxx/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/bin +export AS=${TOOLS}/arm-linux-gnueabi-as +export CC=${TOOLS}/arm-linux-gnueabi-gcc +export CXX=${TOOLS}/arm-linux-gnueabi-g++ +export LD=${TOOLS}/arm-linux-gnueabi-ld +export STRIP=${TOOLS}/arm-linux-gnueabi-strip +export RANLIB=${TOOLS}/arm-linux-gnueabi-ranlib +export OBJDUMP=${TOOLS}/arm-linux-gnueabi-objdump +export OBJCOPY=${TOOLS}/arm-linux-gnueabi-objcopy +export NM=${TOOLS}/arm-linux-gnueabi-gcc-nm +export AR=${TOOLS}/arm-linux-gnueabi-ar +export READELF="${TOOLS}/arm-linux-gnueabi-readelf" +``` + +### 生成makefile + +- 执行如下命令生成makefile + +```shell +./configure --target=arm-linux-gnueabi --prefix="${PWD}/armeabi_v7a_install" +``` + +### 编译perl源码 + +执行 make CFLAGES="-static" LDFLAGS="-static" VERBOSE=1 命令编译perl源码,执行结果截图如下 + + ![buildsuccess](media/build_success.png) + +### 安装perl + +执行 make install,执行结果截图如下 + + ![installsuccess](media/install_32.png) + +### 编译安装完成 + +进入安装目录下的armeabi_v7a_install/bin文件夹,并可通过file perl看到文件属性 + + ![file32](media/file32.png) + +### 运行结果 + +将安装目录armeabi_v7a_install文件夹压缩打包,发送到OHOS开发板中 + +```shell +#打包对应编译目录下的install文件夹 +tar -zcvf armeabi_v7a_install.tar.gz armeabi_v7a_install/ +#发送到OHOS系统开发板上 +hdc file send xxx\armeabi_v7a_install.tar.gz /data +#进入开发板/data,解压armeabi_v7a_install.tar.gz +hdc shell +cd /data +tar -zxvf armeabi_v7a_install.tar.gz +``` + +进入armeabi_v7a_install/bin目录,执行./perl --version 效果如下截图 + + ![run](./media/run.png) diff --git a/lycium/template/HPKCHECK b/lycium/template/HPKCHECK index 7b5a239aaeed0353268893e97c020e19c6b374f0..6213022de8f0e54c7f63daf41f2a87917b613bf3 100644 --- a/lycium/template/HPKCHECK +++ b/lycium/template/HPKCHECK @@ -5,7 +5,7 @@ # Maintainer: Your Name source HPKBUILD > /dev/null 2>&1 # 导入HPKBUILD文件 -logfile=${LYCIUM_ROOT}/../thirdparty/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log # 测试前的准备, 如果不需要可以不写。 checkprepare(){ diff --git a/lycium/test.sh b/lycium/test.sh index c438fa90fbf33ccad7af5064b4d613c338f0d1c4..5213d7f428606d45d0364c009fcc5d6268532656 100755 --- a/lycium/test.sh +++ b/lycium/test.sh @@ -9,12 +9,14 @@ hpkPaths=() successlibs=() failedlibs=() +LYCIUM_THIRDPARTY_ROOT=${LYCIUM_ROOT}/../thirdparty CHECK_RESULT_PATH=$LYCIUM_ROOT/check_result # 收集测试结果(log以及生成资源)的目录 LOG_PATH=$CHECK_RESULT_PATH/check_log # 收集测试log的目录 export LYCIUM_FAULT_PATH=$CHECK_RESULT_PATH/check_fault # 收集组件测试错误日志,该目录需要创建组件名,日志最终路径为 $CHECK_RESULT_PATH/check_fault/${pkgname}/fault.log export LYCIUM__MANUAL_CONFIRM_PATH=$CHECK_RESULT_PATH/manual_confirm # 手动确认信息(组件生成的如图片,音视频文件等),该目录需要创建组件名,文件最终路径为 $CHECK_RESULT_PATH/manual_confirm/${pkgname}/xxx.wav +export LYCIUM_THIRDPARTY_ROOT=${LYCIUM_THIRDPARTY_ROOT} -envmessage="please follow the CITools instruction: https://gitee.com/han_jin_fei/lycium-citools" +envmessage="please follow the CITools instruction: https://gitee.com/openharmony-sig/tpc_c_cplusplus/tree/master/lycium/CItools" # 检查测试环境 checktestenv(){ @@ -98,7 +100,7 @@ findlibsdir(){ tmppath=${LYCIUM_ROOT}/usr/$job # 查找已编译的库路径 if [ -d $tmppath ] then - hpkPaths[${#hpkPaths[@]}]=${LYCIUM_ROOT}/../thirdparty/$job # 记录库编译路径 + hpkPaths[${#hpkPaths[@]}]=${LYCIUM_THIRDPARTY_ROOT}/$job # 记录库编译路径 fi done } diff --git a/thirdparty/CUnit/README_zh.md b/thirdparty/CUnit/README_zh.md index f1920845fe42df5ae857a85f8d4abb24ec5dc8fa..ba4ce59e7a355a167effd56c0ddc30f1e1fc18d0 100644 --- a/thirdparty/CUnit/README_zh.md +++ b/thirdparty/CUnit/README_zh.md @@ -6,7 +6,6 @@ CUnit是C语言的单元测试框架 - SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) - 三方库版本:2.1-3 - 当前适配的功能:CUnit是C语言的单元测试框架 -- [GNU Library General Public License](https://sourceforge.net/p/cunit/code/HEAD/tree/branches/mingw64/COPYING) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/CUnit/docs/hap_integrate.md b/thirdparty/CUnit/docs/hap_integrate.md index 841d28fcdbedd03e52c0cfe2fd376eed3fd29aee..55d070074d119b8dcf902d9f3c6b047c1e3f4082 100644 --- a/thirdparty/CUnit/docs/hap_integrate.md +++ b/thirdparty/CUnit/docs/hap_integrate.md @@ -3,10 +3,10 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` @@ -22,19 +22,15 @@ ├── README_zh.md ``` -- 将CUnit拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/CUnit tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh CUnit ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` CUnit/arm64-v8a CUnit/armeabi-v7a ``` diff --git a/thirdparty/FFmpeg/HPKCHECK b/thirdparty/FFmpeg/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..15e1f8649790305c5fda8dbfb8777822b652f1b8 --- /dev/null +++ b/thirdparty/FFmpeg/HPKCHECK @@ -0,0 +1,15 @@ +# Contributor: xucaiming <719260170@qq.com> +# Maintainer: xucaiming <719260170@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $pkgname-$ARCH-build/$builddir + make check > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} diff --git a/thirdparty/FFmpeg/README_zh.md b/thirdparty/FFmpeg/README_zh.md index 5f89970e156e1fe7c078dc1ba55be84acff119ec..55748a4d8c42532a7055f44a68f43d8db2dd8578 100644 --- a/thirdparty/FFmpeg/README_zh.md +++ b/thirdparty/FFmpeg/README_zh.md @@ -7,7 +7,6 @@ - SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) - 三方库版本:n6.0 - 当前适配的功能:解码,编码,转码,复用,解复用,过滤音视频数据 -- [GPL2/GPL3/LGPL3 license](https://github.com/FFmpeg/FFmpeg) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/FFmpeg/docs/hap_integrate.md b/thirdparty/FFmpeg/docs/hap_integrate.md index cd1940a5ebbfe0200025b092f718dead4cf8c6c9..63f715de97522a89270b217241234ef1ded41e63 100644 --- a/thirdparty/FFmpeg/docs/hap_integrate.md +++ b/thirdparty/FFmpeg/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,29 +30,23 @@ ├── README_zh.md ``` -- 将FFmpeg拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/FFmpeg tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh FFmpeg ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell FFmpeg/arm64-v8a FFmpeg/armeabi-v7a ``` + - [测试三方库](#测试三方库) ## 应用中使用三方库 @@ -81,7 +75,7 @@ ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行如下命令make check(arm64-v8a-build/FFmpeg-n6.0为构建64位的目录,armeabi-v7a-build/FFmpeg-n6.0为构建32位的目录,其中n6.0为版本号,不同的版本对应的构建目录会不一样) diff --git a/thirdparty/LuaJIT/HPKBUILD b/thirdparty/LuaJIT/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..694c8ac7ceab966a5756c266d580db17ad73653f --- /dev/null +++ b/thirdparty/LuaJIT/HPKBUILD @@ -0,0 +1,75 @@ +# Contributor: Jeff Han +# Maintainer: Jeff Han +pkgname=LuaJIT +pkgver=2.1.0-beta3 +pkgrel=0 +pkgdesc="A Just-In-Time Compiler for Lua." +url="https://luajit.org/" +archs=("armeabi-v7a" "arm64-v8a") +license=("Copyright (C) 2005-2017 Mike Pall. All rights reserved") +depends=() +makedepends=("gcc") + +source="https://luajit.org/download/$pkgname-$pkgver.tar.gz" + +autounpack=true +downloadpackage=true +buildtools="make" + +builddir=$pkgname-${pkgver} +packagename=$builddir.tar.gz + +dynamic_cc= +target_ld= +static_cc= +target_ar= +target_strip= +# luajit 采用makefile编译构建,为了保留构建环境(方便测试)。因此同一份源码在解压后分为两份,各自编译互不干扰 +# 如果编译环境为x86-64, 请安装32位开发环境,否则无法编译armeabi-v7a +# sudo apt-get install build-essential module-assistant +# sudo apt-get install gcc-multilib g++-multilib +prepare() { + cp -rf $builddir $builddir-$ARCH-build + cd $builddir-$ARCH-build + if [ $ARCH == "armeabi-v7a" ] + then + dynamic_cc=${OHOS_SDK}/native/llvm/bin/arm-linux-ohos-clang + target_ld=${OHOS_SDK}/native/llvm/bin/arm-linux-ohos-clang + host_gcc="gcc -m32" + fi + if [ $ARCH == "arm64-v8a" ] + then + dynamic_cc=${OHOS_SDK}/native/llvm/bin/aarch64-linux-ohos-clang + target_ld=${OHOS_SDK}/native/llvm/bin/aarch64-linux-ohos-clang + host_gcc="gcc" + fi + static_cc=${dynamic_cc} + export target_ar="${OHOS_SDK}/native/llvm/bin/llvm-ar rcus 2>/dev/null" + target_strip=${OHOS_SDK}/native/llvm/bin/llvm-strip + cd $OLDPWD +} +build() { + cd $builddir-$ARCH-build + make HOST_CC="$host_gcc" CFLAGS="-fPIC" DYNAMIC_CC=${dynamic_cc} TARGET_LD=${target_ld} STATIC_CC=${static_cc} TARGET_AR="${target_ar}" TARGET_STRIP=${target_strip} -j4 > `pwd`/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir-$ARCH-build + make install PREFIX=$LYCIUM_ROOT/usr/$pkgname/$ARCH >> `pwd`/build.log 2>&1 + ret=$? + cd $OLDPWD + unset dynamic_cc target_ld static_cc target_ar target_strip + return $ret +} + +check() { + echo "The test must be on an OpenHarmony device!" +} + +# 清理环境 +cleanbuild() { + rm -rf ${PWD}/$builddir $builddir-armeabi-v7a-build $builddir-arm64-v8a-build #${PWD}/$packagename +} diff --git a/thirdparty/LuaJIT/SHA512SUM b/thirdparty/LuaJIT/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..23fcce94c70ce20efa312d06245170a1a4963fdd --- /dev/null +++ b/thirdparty/LuaJIT/SHA512SUM @@ -0,0 +1 @@ +c44e967a0f671ed32b55aee810bc8b3b63737a2d7363b8984ae1949b24f98dbb3f9be7c1e10239fdeb96a3e3c836f606342cbd61838cf9bcadb077443eb5bc12 LuaJIT-2.1.0-beta3.tar.gz diff --git a/thirdparty/LuaXML/HPKBUILD b/thirdparty/LuaXML/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..fc2cbaa1de9ad25069ca1c9f9b13c1b5ee29d8d3 --- /dev/null +++ b/thirdparty/LuaXML/HPKBUILD @@ -0,0 +1,105 @@ +# Contributor: Chen Xu +# Maintainer: Chen Xu +pkgname=LuaXML +pkgver=master +pkgrel=0 +pkgdesc="A module that maps between Lua and XML without much ado." +url="https://viremo.eludi.net/LuaXML/" +archs=("armeabi-v7a" "arm64-v8a") +license=("MIT license") +depends=("LuaJIT") +makedepends=("make") + +source="https://github.com/n1tehawk/$pkgname.git" +commitid=7cd4a7ab5db85222edb4c955d53e5674afd170b6 + +autounpack=false +downloadpackage=false +buildtools="make" + +builddir=$pkgname-${commitid} +cloneflag=true +cc= + +prepare() { + if [ $cloneflag == true ] + then + mkdir $builddir + git clone -b $pkgver $source $builddir + if [ $? != 0 ] + then + return -1 + fi + cd $builddir + git reset --hard $commitid + if [ $? != 0 ] + then + return -1 + fi + cd .. + cloneflag=false + fi + cp -rf $builddir $builddir-$ARCH-build + cd $builddir-$ARCH-build + if [ $ARCH == "armeabi-v7a" ] + then + cc=${OHOS_SDK}/native/llvm/bin/arm-linux-ohos-clang + fi + if [ $ARCH == "arm64-v8a" ] + then + cc=${OHOS_SDK}/native/llvm/bin/aarch64-linux-ohos-clang + fi + cd $OLDPWD +} +build() { + cd $builddir-$ARCH-build + cp -f $LYCIUM_ROOT/usr/LuaJIT/$ARCH/lib/libluajit-5.1.so $LYCIUM_ROOT/usr/LuaJIT/$ARCH/lib/liblua.so + make INCDIR=-I$LYCIUM_ROOT/usr/LuaJIT/$ARCH/include/luajit-2.1 \ + LIBDIR=-L$LYCIUM_ROOT/usr/LuaJIT/$ARCH/lib \ + CC=${cc} -j4 VERBOSE=1 > `pwd`/build.log 2>&1 + ret=$? + cd $OLDPWD + rm -rf $LYCIUM_ROOT/usr/LuaJIT/$ARCH/lib/liblua.so + return $ret +} + +package() { + cd $builddir-$ARCH-build + mkdir -p $LYCIUM_ROOT/usr/$pkgname/$ARCH/include + mkdir -p $LYCIUM_ROOT/usr/$pkgname/$ARCH/lib + cp -f LuaXML_lib.h $LYCIUM_ROOT/usr/$pkgname/$ARCH/include/ + ret=$? + if [ $ret != 0 ] + then + return -1 + fi + cp -f LuaXML_lib.so $LYCIUM_ROOT/usr/$pkgname/$ARCH/lib/ + ret=$? + cd $OLDPWD + unset cc + return $ret +} + +check() { + echo "The test must be on an OpenHarmony device!" + # 下载测试需要lua脚本 + sure download "https://github.com/bluebird75/luaunit/archive/refs/tags/LUAUNIT_V3_4.tar.gz" "luaunit-LUAUNIT_V3_4.tar.gz" + sure unpack "luaunit-LUAUNIT_V3_4.tar.gz" + cp luaunit-LUAUNIT_V3_4/luaunit.lua $builddir-$ARCH-build/ + # 使用动态库链接,由于lua的原因LD_LIBRARY_PATH无效,需要将libluajit-5.1.so.2.1.0拷贝到系统默认so查找路径 + # mount -o remount,rw / + # mkdir -p /usr/local/lib + # export ROOT_PATH=/data/local/tmp/lycium + # cp ${ROOT_PATH}/usr/LuaJIT/arm64-v8a/lib/libluajit-5.1.so.2.1.0 /usr/local/lib/libluajit-5.1.so.2 + # cd ${ROOT_PATH}/main/LuaXML/LuaXML-7cd4a7ab5db85222edb4c955d53e5674afd170b6-arm64-v8a-build + # export LUAJIT_PATH=$ROOT_PATH/usr/LuaJIT/arm64-v8a/bin/luajit-2.1.0-beta3 + # make test LUA=${LUAJIT_PATH} VERBOSE=1 + # mount -o remount,ro / + # export LUAJIT_PATH= + # export ROOT_PATH= +} + +# 清理环境 +cleanbuild() { + rm -rf ${PWD}/$builddir $builddir-armeabi-v7a-build $builddir-arm64-v8a-build #${PWD}/$packagename +} diff --git a/thirdparty/LuaXML/OAT.xml b/thirdparty/LuaXML/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..1e4228bf6d144b1bc234f23c67df3b5a63ae8415 --- /dev/null +++ b/thirdparty/LuaXML/OAT.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/thirdparty/LuaXML/README.OpenSource b/thirdparty/LuaXML/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..73dd516b6d7ed0247adb8f3993d414817ab9da11 --- /dev/null +++ b/thirdparty/LuaXML/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "LuaXML", + "License": "MIT license", + "License File": "LICENSE", + "Version Number": "master", + "Owner": "chenxu.unix@gmail.com", + "Upstream URL": "https://github.com/n1tehawk/LuaXML.git", + "Description": "A module that maps between Lua and XML without much ado." + } +] diff --git a/thirdparty/LuaXML/README_zh.md b/thirdparty/LuaXML/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..7a740125dfe7acecca18ff0df2298e8b8cb6e2bd --- /dev/null +++ b/thirdparty/LuaXML/README_zh.md @@ -0,0 +1,12 @@ +# LuaXML三方库说明 +## 功能简介 +LuaXML作为一个开源项目,是在Lua和XML之间建立映射的模块。 +## 使用约束 +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) +- 三方库版本:master +- 当前适配的功能:读取解析xml +- [MIT license](https://github.com/n1tehawk/LuaXML) + +## 集成方式 ++ [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/LuaXML/SHA512SUM b/thirdparty/LuaXML/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..b87ba0f94ee08cd71df4a090fbcc648f294bec5b --- /dev/null +++ b/thirdparty/LuaXML/SHA512SUM @@ -0,0 +1 @@ +8e350464cff10e5b01e189d2fd39e6819d18d8e854e1c0914378eaa7ca06fcb9d0606b665d8005a499d3005854c6ecf503ed2009f99bc1aa731147e3172488cc LuaXML-master.zip diff --git a/thirdparty/LuaXML/docs/hap_integrate.md b/thirdparty/LuaXML/docs/hap_integrate.md new file mode 100644 index 0000000000000000000000000000000000000000..33b3c421f093b26055738443421dfd062adc6e4e --- /dev/null +++ b/thirdparty/LuaXML/docs/hap_integrate.md @@ -0,0 +1,89 @@ +# LuaXML集成到应用hap +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 +## 开发环境 +- ubuntu20.04 +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) +- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../tools/README.md#编译环境准备) +- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +## 编译三方库 +- 下载本仓库 + ``` + git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 + ``` +- 三方库目录结构 + ``` + tpc_c_cplusplus/thirdparty/LuaXML #三方库LuaXML的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── SHA512SUM #三方库校验文件 + ├── OAT.xml #OAT文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md + ``` + +- 将LuaXML拷贝至lycium/main目录下 + ``` + cd tpc_c_cplusplus + mkdir -p lycium/main + cp thirdparty/LuaJIT lycium/main -rf + cp thirdparty/LuaXML lycium/main -rf + ``` +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#编译环境准备) + + ``` + cd lycium + ./build.sh LuaXML + ``` +- 三方库头文件及生成的库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + ``` + LuaXML/armeabi-v7a LuaXML/arm64-v8a + ``` + +- [测试三方库](#测试三方库) + +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库头文件拷贝到该目录下, 如下图所示 + ![thirdparty_install_dir](pic/screen_cut.jpg) +- 由于只编译了arm以及arm64so库,IDE默认会编译x86版本,需要指定ABI进行编译,如下图所示 + ![thirdparty_install_dir](pic/screen_ide.jpg) +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + ``` + #将三方库加入工程中 + target_link_libraries(entry PRIVATE -L${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/LuaXML_lib.so) + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/LuaXML/${OHOS_ARCH}/include) + ``` + +## 测试三方库 +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) + +- 进入到构建目录,执行如下命令(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) +注意:以下为64位命令,如需测试32位,请将arm64-v8a替换为armeabi-v7a。 +``` +# 使用动态库链接,由于lua的原因LD_LIBRARY_PATH无效,需要将libluajit-5.1.so.2.1.0拷贝到系统默认so查找路径 +mount -o remount,rw / +mkdir -p /usr/local/lib +export ROOT_PATH=/data/local/tmp/lycium #编译工具所在的目录, 需要按实际情况修改 +cp ${ROOT_PATH}/usr/LuaJIT/arm64-v8a/lib/libluajit-5.1.so.2.1.0 /usr/local/lib/libluajit-5.1.so.2 +cd ${ROOT_PATH}/main/LuaXML/LuaXML-7cd4a7ab5db85222edb4c955d53e5674afd170b6-arm64-v8a-build +export LUAJIT_PATH=$ROOT_PATH/usr/LuaJIT/arm64-v8a/bin/luajit-2.1.0-beta3 +make test LUA=${LUAJIT_PATH} VERBOSE=1 +mount -o remount,ro / +export LUAJIT_PATH= +export ROOT_PATH= +``` + +测试用例运行结果如下: + + ![zbar_test](pic/run_screen_cut.jpg) + +## 参考资料 +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md) diff --git a/thirdparty/LuaXML/docs/pic/run_screen_cut.jpg b/thirdparty/LuaXML/docs/pic/run_screen_cut.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3ac810b05e4351cd1dda795ae4b537a402a558f9 Binary files /dev/null and b/thirdparty/LuaXML/docs/pic/run_screen_cut.jpg differ diff --git a/thirdparty/LuaXML/docs/pic/screen_cut.jpg b/thirdparty/LuaXML/docs/pic/screen_cut.jpg new file mode 100755 index 0000000000000000000000000000000000000000..4d15712617c87addd2af6d3dc9058e1cff197b47 Binary files /dev/null and b/thirdparty/LuaXML/docs/pic/screen_cut.jpg differ diff --git a/thirdparty/LuaXML/docs/pic/screen_ide.jpg b/thirdparty/LuaXML/docs/pic/screen_ide.jpg new file mode 100755 index 0000000000000000000000000000000000000000..fbe835699bffa771665eab2a6cb3a99bac99f91b Binary files /dev/null and b/thirdparty/LuaXML/docs/pic/screen_ide.jpg differ diff --git a/thirdparty/WavPack/README_zh.md b/thirdparty/WavPack/README_zh.md index b50da925586e981242e8ac3f3b471f49cf64e459..3ac49476a2f3435d81fb50259ed4ad30e775159a 100644 --- a/thirdparty/WavPack/README_zh.md +++ b/thirdparty/WavPack/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 WavPack是一个无损音频压缩的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:5.6.0 - 当前适配的功能:音频压缩 -- [BSD](https://github.com/dbry/WavPack) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/WavPack/docs/hap_integrate.md b/thirdparty/WavPack/docs/hap_integrate.md index 4ebe191e04d9190c5825f58c0a9ca0aedce45e7f..6b5fe882941ab843ddcf9e4a3033468b18dd5dd3 100644 --- a/thirdparty/WavPack/docs/hap_integrate.md +++ b/thirdparty/WavPack/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/WavPack #三方库WavPack的目录结构如下 @@ -22,19 +23,16 @@ ├── README_zh.md ``` -- 将WavPack拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/WavPack tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh WavPack ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` WavPack/arm64-v8a WavPack/armeabi-v7a ``` @@ -52,9 +50,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/WavPack/${OHOS_ARCH}/include) ``` - ![WavPack_usage](pic/WavPack_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/agg/docs/hap_integrate.md b/thirdparty/agg/docs/hap_integrate.md index 4e088fc43a431cc28f634949363a0a49fd64e84d..0d250c5dadbb8b9dd18d60ed53a999453a672309 100644 --- a/thirdparty/agg/docs/hap_integrate.md +++ b/thirdparty/agg/docs/hap_integrate.md @@ -8,8 +8,8 @@ - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) - [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) - [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) -- [准备三方库构建环境](../../../lycium/README.md#编译环境准备) -- [准备三方库测试环境](../../../lycium/README.md#ci环境准备) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 diff --git a/thirdparty/assimp/README_zh.md b/thirdparty/assimp/README_zh.md index d3f6e4fc7ef71c7c069134517aeb935658c6191a..d36e4f661786db2b45c0c2b17a3b7b7a8f587509 100644 --- a/thirdparty/assimp/README_zh.md +++ b/thirdparty/assimp/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 assimp作为一个开源项目,设计了一套可扩展的架构,为模型的导入导出提供了良好的支持。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1(API Version 10) - 三方库版本:5.2.5 - 当前适配的功能:支持导入导出3D模型数据 -- [3-clause BSD](https://github.com/assimp/assimp/blob/master/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/assimp/docs/hap_integrate.md b/thirdparty/assimp/docs/hap_integrate.md index 0dbb909fc68407f8d22de72a327359f778346e5f..1f6e5405affed3a2c076d66bd4f524024d485b03 100644 --- a/thirdparty/assimp/docs/hap_integrate.md +++ b/thirdparty/assimp/docs/hap_integrate.md @@ -3,10 +3,10 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` @@ -23,20 +23,15 @@ ├── README_zh.md ``` -- 将assimp拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/assimp tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh assimp ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` assimp/armeabi-v7a assimp/arm64-v8a ``` @@ -45,24 +40,22 @@ ## 应用中使用三方库 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库头文件拷贝到该目录下,并libs目录下libassimp.so.5.2.4改名为libassimp.so.5,如下图所示 +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示  ![thirdparty_install_dir](pic/screen_cut.jpg) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libassimp.so.5) + target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libassimp.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/assimp/${OHOS_ARCH}/include) ``` ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的unit可执行文件及测试数据准备好 - unit 在 - - assimp/assimp-5.2.5/arm64-v8a-build/bin + unit 在 assimp/assimp-5.2.5/arm64-v8a-build/bin 测试数据: @@ -91,4 +84,3 @@ - [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) - [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) - [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) -- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md) diff --git a/thirdparty/assimp/docs/pic/screen_cut.jpg b/thirdparty/assimp/docs/pic/screen_cut.jpg index 936c106a6397077938481bf274810a0ee6b194f1..816dbe18a1657f86e55f1b4c3f11405ccaa48cfa 100644 Binary files a/thirdparty/assimp/docs/pic/screen_cut.jpg and b/thirdparty/assimp/docs/pic/screen_cut.jpg differ diff --git a/thirdparty/avro/README_zh.md b/thirdparty/avro/README_zh.md index b35908836c43fffd558261523a9b862662cbdcb8..8715e287ade4731944cfb784e9cb5e004d09f5c1 100644 --- a/thirdparty/avro/README_zh.md +++ b/thirdparty/avro/README_zh.md @@ -6,7 +6,6 @@ avro是指数据序列化的系统,有丰富的数据结构类型、快速可 - SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:release-1.11.1 - 当前适配的功能:提供数据的序列化框架 -- [Apache License](https://github.com/apache/avro/blob/master/LICENSE.txt) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) \ No newline at end of file diff --git a/thirdparty/avro/docs/hap_integrate.md b/thirdparty/avro/docs/hap_integrate.md index 62513b4f19a5f4c72aed02a5f2c05320a1cf5f47..2981b64caefcb60b84b8cdd18fb5aa1a48883e65 100644 --- a/thirdparty/avro/docs/hap_integrate.md +++ b/thirdparty/avro/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) -- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -22,7 +22,7 @@ - 三方库目录结构 ```shell - tpc_c_cplusplus/thirdparty/avrocpp #三方库avrocpp的目录结构如下 + tpc_c_cplusplus/thirdparty/avro #三方库avro的目录结构如下 ├── docs #三方库相关文档的文件夹 ├── HPKBUILD #构建脚本 ├── SHA512SUM #三方库校验文件 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将avro拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp -rf thirdparty/avro tools/main - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools - ./build.sh avro jansson + cd lycium + ./build.sh avro ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell avro/arm64-v8a avro/armeabi-v7a @@ -59,8 +52,8 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示: - ![thirdparty_install_dir](pic/avrocpp_install_dir.png) - +  ![thirdparty_install_dir](pic/avrocpp_install_dir.png) + - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ```shell @@ -84,7 +77,7 @@ ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行如下命令ctest(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/avrocpp/HPKCHECK b/thirdparty/avrocpp/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..dcaf766dc7e139a9a7c39f540e772a898b05314e --- /dev/null +++ b/thirdparty/avrocpp/HPKCHECK @@ -0,0 +1,23 @@ +# Contributor: 城meto +# Maintainer: 城meto + +source HPKBUILD > /dev/null 2>&1 # 导入HPKBUILD文件 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +checkprepare(){ + return 0 +} + +# 在OH环境执行测试的接口 +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + ctest > ${logfile} 2>&1 + res=$? + if [ $res -ne 0 ];then + mkdir ${LYCIUM_FAULT_PATH}/${pkgname} + cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/ + fi + cd $OLDPWD + return $res +} diff --git a/thirdparty/avrocpp/README_zh.md b/thirdparty/avrocpp/README_zh.md index b35908836c43fffd558261523a9b862662cbdcb8..e73fef4e4db1e8b001856994afb45d8ef62b0e25 100644 --- a/thirdparty/avrocpp/README_zh.md +++ b/thirdparty/avrocpp/README_zh.md @@ -1,12 +1,11 @@ -# avro三方库说明 +# avrocpp三方库说明 ## 功能简介 -avro是指数据序列化的系统,有丰富的数据结构类型、快速可压缩的二进制数据形式。 +avrocpp是指数据序列化的系统,有丰富的数据结构类型、快速可压缩的二进制数据形式。 ## 使用约束 - IDE版本:DevEco Studio 3.1 Release - SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:release-1.11.1 - 当前适配的功能:提供数据的序列化框架 -- [Apache License](https://github.com/apache/avro/blob/master/LICENSE.txt) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) \ No newline at end of file diff --git a/thirdparty/avrocpp/docs/hap_integrate.md b/thirdparty/avrocpp/docs/hap_integrate.md index 4c3bc42261eb79e9fcb88a46b66936de0f559ccd..d8eccdeb1ba28001086c60291e2b7da1aa8e150b 100644 --- a/thirdparty/avrocpp/docs/hap_integrate.md +++ b/thirdparty/avrocpp/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) -- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,29 +30,23 @@ ├── README_zh.md ``` -- 将avrocpp拷贝至tools/main目录下 - - ```shell - cd tpc_c_cplusplus - cp -rf thirdparty/avrocpp tools/main - ``` - -- 在tools目录下编译三方库 +- 在lycium目录下编译三方库 编译需要先安装libboost-all-dev + ```shell sudo apt-get install libboost-all-dev ``` - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh avrocpp boost snappy ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell avrocpp/arm64-v8a avrocpp/armeabi-v7a @@ -64,17 +58,17 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示: ![thirdparty_install_dir](pic/avrocpp_install_dir.png) - + - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ```shell #将三方库加入工程中 #使用c++库 target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/avrocpp/${OHOS_ARCH}/lib/libavrocpp.so) - + #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/avrocpp/${OHOS_ARCH}/include) - + #将动态库打包到libs file(GLOB allLibs "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/avrocpp/${OHOS_ARCH}/lib/*.so*") add_custom_command(TARGET entry POST_BUILD @@ -89,7 +83,7 @@ ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行如下命令ctest(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/avrocpp/docs/pic/avro_build.png b/thirdparty/avrocpp/docs/pic/avro_build.png old mode 100755 new mode 100644 diff --git a/thirdparty/avrocpp/docs/pic/avro_test.png b/thirdparty/avrocpp/docs/pic/avro_test.png old mode 100755 new mode 100644 diff --git a/thirdparty/avrocpp/docs/pic/avrocpp_install_dir.png b/thirdparty/avrocpp/docs/pic/avrocpp_install_dir.png old mode 100755 new mode 100644 diff --git a/thirdparty/avrocpp/docs/pic/avrocpp_test.png b/thirdparty/avrocpp/docs/pic/avrocpp_test.png old mode 100755 new mode 100644 diff --git a/thirdparty/bcunit/HPKBUILD b/thirdparty/bcunit/HPKBUILD new file mode 100755 index 0000000000000000000000000000000000000000..86d5fc562b10ed686b215ccb4b10ae64633d748c --- /dev/null +++ b/thirdparty/bcunit/HPKBUILD @@ -0,0 +1,80 @@ +# Contributor: xucaiming <719260170@qq.com> +# Maintainer: xucaiming <719260170@qq.com> + +pkgname=bcunit +pkgver=5.2.62 +pkgrel=0 +pkgdesc="BcUnit is a Unit testing framework" +url="https://github.com/BelledonneCommunications/bcunit" +archs=("armeabi-v7a" "arm64-v8a") +license=("LGPL-2.0") +depends=() +makedepends=() +source="https://github.com/BelledonneCommunications/$pkgname/archive/refs/tags/$pkgver.tar.gz" +buildtools="cmake" + +autounpack=true +downloadpackage=true +patchflag=true + +builddir=${pkgname}-${pkgver} +packagename=${pkgname}-${pkgver}.tar.gz + +source envset.sh + +prepare() { + if $patchflag + then + cd $builddir + # 编译Test时, 链接和头文件包含缺失 + patch -p1 < `pwd`/../bcunit_oh_pkg.patch + # patch只需要打一次,关闭打patch + patchflag=false + cd $OLDPWD + fi + mkdir -p $builddir/$ARCH-build + if [ $ARCH == "arm64-v8a" ];then + setarm64ENV + elif [ $ARCH == "armeabi-v7a" ];then + setarm32ENV + else + echo "${ARCH} not support" + return -1 + fi +} + +build() { + cd $builddir + ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DENABLE_TEST=ON \ + -DOHOS_ARCH=$ARCH -B$ARCH-build -S./ -L > `pwd`/$ARCH-build/build.log 2>&1 + make -j4 -C $ARCH-build VERBOSE=1 >> `pwd`/$ARCH-build/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir + make -C $ARCH-build install VERBOSE=1 >> `pwd`/$ARCH-build/build.log 2>&1 + cd $OLDPWD +} + +check() { + if [ $ARCH == "arm64-v8a" ];then + unsetarm64ENV + elif [ $ARCH == "armeabi-v7a" ];then + unsetarm32ENV + else + echo "${ARCH} not support" + return -1 + fi + + echo "The test must be on an OpenHarmony device!" + # cd $builddir/$ARCH-build/BCUnit/Sources/Test + # ./test_bcunit +} + +# 清理环境 +cleanbuild(){ + rm -rf ${PWD}/$builddir +} diff --git a/thirdparty/bcunit/HPKCHECK b/thirdparty/bcunit/HPKCHECK new file mode 100755 index 0000000000000000000000000000000000000000..7785c7f3771d342b05b5547621e192a9bcfc82a6 --- /dev/null +++ b/thirdparty/bcunit/HPKCHECK @@ -0,0 +1,15 @@ +# Contributor: xucaiming <719260170@qq.com> +# Maintainer: xucaiming <719260170@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir/$ARCH-build/BCUnit/Sources/Test + ./test_bcunit > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} diff --git a/thirdparty/bcunit/OAT.xml b/thirdparty/bcunit/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..fb731892b4b48bf940a2779b30677da87be90414 --- /dev/null +++ b/thirdparty/bcunit/OAT.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/thirdparty/bcunit/README.OpenSource b/thirdparty/bcunit/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..37eb373e0e886a67f4330edd036dba7daf0b7e9a --- /dev/null +++ b/thirdparty/bcunit/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "bcunit", + "License": "LGPL-2.0 license", + "License File": "LICENSES", + "Version Number": "5.2.62", + "Owner": "cmxud@isoftstone.com", + "Upstream URL": "https://github.com/BelledonneCommunications/bcunit/archive/refs/tags/5.2.62.tar.gz", + "Description": "BcUnit is a Unit testing framework" + } +] diff --git a/thirdparty/bcunit/README_zh.md b/thirdparty/bcunit/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..a4717c5374f13a4b43e552957db1ccbdec8d3fe9 --- /dev/null +++ b/thirdparty/bcunit/README_zh.md @@ -0,0 +1,11 @@ +# bcunit三方库说明 +## 功能简介 +bcunit是一个单元测试框架。 +## 使用约束 +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) +- 三方库版本:5.2.62 +- 当前适配的功能:ortp的依赖库 + +## 集成方式 ++ [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/bcunit/SHA512SUM b/thirdparty/bcunit/SHA512SUM new file mode 100755 index 0000000000000000000000000000000000000000..49dbdadea4dc49618a5e6858d7f5201c2a8c7097 --- /dev/null +++ b/thirdparty/bcunit/SHA512SUM @@ -0,0 +1,2 @@ +a833aa18738e0abef271769338251d8f2a2371aeacb1fa9f93ee63065936ca5d546db0f75ea64218303a94c34ee7125fcf75fdd91e922e5b4b5b58e79ccb7d3d bcunit-5.2.62.tar.gz +6870e6a0f3a9da43f6411e392d8fff4869edcf55e0a6b81b780e89c7fae63f0e63e30ba3afa9619ece90f47c40d4e5fda67f4d5ab7a0f3656ddc78c0138ffd14 bcunit_oh_pkg.patch diff --git a/thirdparty/bcunit/bcunit_oh_pkg.patch b/thirdparty/bcunit/bcunit_oh_pkg.patch new file mode 100644 index 0000000000000000000000000000000000000000..5d54501b9edc457dd26ea2e05dd44466884108d7 --- /dev/null +++ b/thirdparty/bcunit/bcunit_oh_pkg.patch @@ -0,0 +1,14 @@ +--- a/BCUnit/Sources/CMakeLists.txt ++++ b/BCUnit/Sources/CMakeLists.txt +@@ -207,6 +207,10 @@ if(ENABLE_TEST) + add_library(bcunit_test STATIC ${FRAMEWORK_SOURCE_FILES}) + target_compile_definitions(bcunit_test PUBLIC MEMTRACE BCUNIT_BUILD_TESTS BCUNIT_DO_NOT_DEFINE_UNLESS_BUILDING_TESTS) + target_include_directories(bcunit_test PUBLIC Test) +- ++ target_include_directories(bcunit_test PUBLIC ++ $ ++ $ ++ ) ++ target_link_libraries(bcunit_test bcunit) + add_subdirectory(Test) + endif() diff --git a/thirdparty/bcunit/docs/hap_integrate.md b/thirdparty/bcunit/docs/hap_integrate.md new file mode 100644 index 0000000000000000000000000000000000000000..d99d4321e169dbae60d893a4ed1cb8b7387d3975 --- /dev/null +++ b/thirdparty/bcunit/docs/hap_integrate.md @@ -0,0 +1,89 @@ +# bcunit 集成到应用hap + +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 + +## 开发环境 + +- ubuntu20.04 +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) +- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../tools/README.md#编译环境准备) +- [准备三方库测试环境](../../../tools/README.md#ci环境准备) + +## 编译三方库 + +- 下载本仓库 + + ``` + git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 + ``` + +- 三方库目录结构 + + ```shell + tpc_c_cplusplus/thirdparty/bcunit #三方库bcunit的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── HPKCHECK #自动化测试脚本 + ├── SHA512SUM #三方库校验文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── bcunit_oh_pkg.patch #补丁文件 + ├── README_zh.md + ``` + +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#编译环境准备) + + ``` + cd lycium + ./build.sh bcunit + ``` + + +- 三方库头文件及生成的库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + + ``` + bcunit/arm64-v8a bcunit/armeabi-v7a + ``` + +- [测试三方库](#测试三方库) + +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 +   + + ![thirdparty_install_dir](pic/bcunit_install_dir.png) + +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + + ```shell + #将三方库加入工程中 + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/bcunit/${OHOS_ARCH}/lib/libbcunit.a) + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/bcunit/${OHOS_ARCH}/include) + ``` + + ![bcunit_usage](pic/bcunit_usage.png) + +## 测试三方库 + +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#ci环境准备) + +进入到构建目录,执行如下命令 +``` +cd /BCUnit/Sources/Test +./test_bcunit +``` +(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) + + ![bcunit_test](pic/bcunit_test.png) + +## 参考资料 + +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md) diff --git a/thirdparty/bcunit/docs/pic/bcunit_install_dir.png b/thirdparty/bcunit/docs/pic/bcunit_install_dir.png new file mode 100644 index 0000000000000000000000000000000000000000..adfd7fd7a8e1df7f47b530614db366c5ee884941 Binary files /dev/null and b/thirdparty/bcunit/docs/pic/bcunit_install_dir.png differ diff --git a/thirdparty/bcunit/docs/pic/bcunit_test.png b/thirdparty/bcunit/docs/pic/bcunit_test.png new file mode 100644 index 0000000000000000000000000000000000000000..b6e5da0814d047f4329d20f57ddb6b629c4a14df Binary files /dev/null and b/thirdparty/bcunit/docs/pic/bcunit_test.png differ diff --git a/thirdparty/bcunit/docs/pic/bcunit_usage.png b/thirdparty/bcunit/docs/pic/bcunit_usage.png new file mode 100644 index 0000000000000000000000000000000000000000..40e79aa1903fd8f280f061c1db379f448a20f943 Binary files /dev/null and b/thirdparty/bcunit/docs/pic/bcunit_usage.png differ diff --git a/thirdparty/behaviortree/README_zh.md b/thirdparty/behaviortree/README_zh.md index 941c5ac35cf0aaec1b0dd965a6ce13cc300dee3e..5a9f013036e78d542688c67e745ea545af92292d 100644 --- a/thirdparty/behaviortree/README_zh.md +++ b/thirdparty/behaviortree/README_zh.md @@ -9,7 +9,6 @@ behaviortree提供了一个创建行为树的框架,常用来做任务或状 - ROM版本:OpenHarmony 3.2 Release - 三方库版本:4.1.1 - 当前适配的功能:behaviortree行为树任务或状态管理功能 -- [License:MIT](https://github.com/BehaviorTree/BehaviorTree.CPP/blob/4.1.1/LICENSE) ## 集成方式 diff --git a/thirdparty/boost/README_zh.md b/thirdparty/boost/README_zh.md index 9b649079b9e52c5318ebf206f075ad91986b8b9b..7c31f04158f0b4b435f7cd8f6879f44a84ff095c 100644 --- a/thirdparty/boost/README_zh.md +++ b/thirdparty/boost/README_zh.md @@ -6,7 +6,3 @@ Boost provides free peer-reviewed portable C++ source libraries.。 - SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) - 三方库版本:1.81.0 - 当前适配的功能:除去log,python,locale的其他功能都适配 -- [ Boost Software License ](https://www.boost.org/ - -## 集成方式 -+ [应用hap包集成]() diff --git a/thirdparty/brotli/README_zh.md b/thirdparty/brotli/README_zh.md index 2b27e00900e919af607247257c8f19b23b71f6d4..e9831193d9c6f3812c3e0b0619c86d253c34b71b 100644 --- a/thirdparty/brotli/README_zh.md +++ b/thirdparty/brotli/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 Brotli is a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling, with a compression ratio comparable to the best currently available general-purpose compression methods. It is similar in speed with deflate but offers more dense compression ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:2.13.0 - 当前适配的功能:支持无损压缩算法。 -- [MIT License](https://github.com/google/brotli/blob/master/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/brotli/docs/hap_integrate.md b/thirdparty/brotli/docs/hap_integrate.md index a85e9acaf1304d26d8db67d311819796b8042c2a..46a8c7c9c028a71357e7181b5f3e21efafaa1798 100644 --- a/thirdparty/brotli/docs/hap_integrate.md +++ b/thirdparty/brotli/docs/hap_integrate.md @@ -3,10 +3,10 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` @@ -22,19 +22,15 @@ ├── README_zh.md ``` -- 将brotli拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/brotli tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh brotli ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` brotli/arm64-v8a brotli/armeabi-v7a ``` diff --git a/thirdparty/bsdiff/BUILD.gn b/thirdparty/bsdiff/BUILD.gn old mode 100755 new mode 100644 diff --git a/thirdparty/bsdiff/HPKCHECK b/thirdparty/bsdiff/HPKCHECK index 2e692b0148c8a6802cdbe54a5edf439e86447f55..cb61cf55d48f3108642a242ff892cb252f806072 100644 --- a/thirdparty/bsdiff/HPKCHECK +++ b/thirdparty/bsdiff/HPKCHECK @@ -2,7 +2,7 @@ # Maintainer: leehom source HPKBUILD > /dev/null 2>&1 -logfile=${LYCIUM_ROOT}/main/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log openharmonycheck() { res=0 @@ -16,17 +16,17 @@ openharmonycheck() { ./bsdiff $OLD_FILE $NEW_FILE $PATCH_FILE > ${logfile} 2>&1 ret=$? if [ $ret -ne 0 ]; then - echo "run bsdiff test failed!" >> ${logfile} 2>&1 - cd $OLDPWD - return $res + echo "run bsdiff test failed!" >> ${logfile} 2>&1 + cd $OLDPWD + return $res fi ./bspatch $OLD_FILE $PATCH_NEW_FILE $PATCH_FILE >> ${logfile} 2>&1 ret=$? if [[ $ret -ne 0 ]] || [[ ! -f $PATCH_NEW_FILE ]]; then - echo "run bspatch test failed!" >> ${logfile} 2>&1 - cd $OLDPWD - return $res + echo "run bspatch test failed!" >> ${logfile} 2>&1 + cd $OLDPWD + return $res fi MD5_NEW=md5sum $NEW_FILE @@ -36,11 +36,11 @@ openharmonycheck() { MD5_PATCH_NEW=${MD5_PATCH_NEW:0:32} echo "$MD5_PATCH_NEW" >> ${logfile} 2>&1 if [ "$MD5_NEW" = "$MD5_PATCH_NEW" ]; then - echo "check MD5 success" >> ${logfile} 2>&1 - res=0 + echo "check MD5 success" >> ${logfile} 2>&1 + res=0 else - echo "check MD5 failed" >> ${logfile} 2>&1 - ret=1 + echo "check MD5 failed" >> ${logfile} 2>&1 + ret=1 fi cd $OLDPWD return $res diff --git a/thirdparty/bsdiff/bundle.json b/thirdparty/bsdiff/bundle.json old mode 100755 new mode 100644 diff --git a/thirdparty/bsdiff/docs/hap_integrate.md b/thirdparty/bsdiff/docs/hap_integrate.md index f29fce6c0ecc821d57f98613a204def15251e065..0fc7849658c5426378c1e09f3255bc3ade595829 100644 --- a/thirdparty/bsdiff/docs/hap_integrate.md +++ b/thirdparty/bsdiff/docs/hap_integrate.md @@ -3,10 +3,10 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) -- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` @@ -19,26 +19,26 @@ ├── HPKBUILD #构建脚本 ├── HPKCHECK #自动化测试脚本 ├── SHA512SUM #三方库校验文件 - |-- BUILD.gn ## Rom版编译构建脚本 - |-- export_api.txt ## bsdiff库对外导出的api接口 - |-- tested_api.txt ## 测试用例已测试的api接口 - |-- bundle.json ## 组件定义文件 - |-- README_zh.md ## bsdiff 说明文档 - |-- README.OpenSource ## bsdiff 开源信息说明文档 - |-- docs ## 存放bsdiff相关文档 - |-- bsdiff_oh_pkg.patch ## 存放bsdiff库patch文件 - |-- media ## 存放图片的文件夹 - |-- testdata ## 存放测试数据 - |-- run_test.sh ## 测试用例运行脚本,注意:在运行该测试用例时,需要将做拆分与合并的2个测试应用程序放到当前路径下。 - |-- note.txt ## 测试用例文件 - |-- note_new.txt ## 测试用例新文件,与之前文件存在差异,通过测试用例做拆分与合并,最终生成一个新的文件与该文件一致。 + |-- BUILD.gn # Rom版编译构建脚本 + |-- export_api.txt # bsdiff库对外导出的api接口 + |-- tested_api.txt # 测试用例已测试的api接口 + |-- bundle.json # 组件定义文件 + |-- README_zh.md # bsdiff 说明文档 + |-- README.OpenSource # bsdiff 开源信息说明文档 + |-- docs # 存放bsdiff相关文档 + |-- bsdiff_oh_pkg.patch # 存放bsdiff库patch文件 + |-- media # 存放图片的文件夹 + |-- testdata # 存放测试数据 + |-- run_test.sh # 测试用例运行脚本,注意:在运行该测试用例时,需要将做拆分与合并的2个测试应用程序放到当前路径下。 + |-- note.txt # 测试用例文件 + |-- note_new.txt # 测试用例新文件,与之前文件存在差异,通过测试用例做拆分与合并,最终生成一个新的文件与该文件一致。 ``` -- 在tpc_c_cplusplus目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在tpc_c_cplusplus/lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - ./lycium/build.sh bzip2 bsdiff + ./build.sh bzip2 bsdiff ``` - 三方库头文件及生成的库 @@ -67,7 +67,7 @@ ![jbigkit_usage](pic/bsdiff_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 拷贝整个tpc仓库,进入到lycium目录执行./check.sh运行测试用例 diff --git a/thirdparty/bsdiff/export_api.txt b/thirdparty/bsdiff/export_api.txt old mode 100755 new mode 100644 diff --git a/thirdparty/bsdiff/media/ohos_result.png b/thirdparty/bsdiff/media/ohos_result.png old mode 100755 new mode 100644 diff --git a/thirdparty/bsdiff/testdata/note.txt b/thirdparty/bsdiff/testdata/note.txt old mode 100755 new mode 100644 diff --git a/thirdparty/bsdiff/testdata/note_new.txt b/thirdparty/bsdiff/testdata/note_new.txt old mode 100755 new mode 100644 diff --git a/thirdparty/bsdiff/testdata/run_test.sh b/thirdparty/bsdiff/testdata/run_test.sh old mode 100755 new mode 100644 diff --git a/thirdparty/bsdiff/tested_api.txt b/thirdparty/bsdiff/tested_api.txt old mode 100755 new mode 100644 diff --git a/thirdparty/busybox/README_zh.md b/thirdparty/busybox/README_zh.md index 6eb68a05d5d286485de0117af05c8241a5d1c4bf..63ebec1095131d5033e73cd38e609e63c311365d 100755 --- a/thirdparty/busybox/README_zh.md +++ b/thirdparty/busybox/README_zh.md @@ -9,7 +9,6 @@ BusyBox将许多常见UNIX实用程序的微小版本组合成一个小型可执 + Rom版本:OpenHarmony3.2 beta3 + 三方库版本:1_36_0 + 当前适配的功能:支持常见的unix指令集。 -+ License:[GPL 2.0](https://github.com/mirror/busybox/blob/master/LICENSE) ## 集成方式 diff --git a/thirdparty/bzip2/README_zh.md b/thirdparty/bzip2/README_zh.md index 093a5fe7d373067c7ef096a8383b1f3f3f519318..5c36b691ebf8c0f129b05331089fed93d6efbb93 100644 --- a/thirdparty/bzip2/README_zh.md +++ b/thirdparty/bzip2/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 bzip2 是使用 Burrows–Wheeler 算法,压缩解压文件。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:1.0.6 - 当前适配的功能:压缩解压文件 -- [Bzip2 License](https://sourceforge.net/p/bzip2/bzip2/ci/master/tree/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/bzip2/docs/hap_integrate.md b/thirdparty/bzip2/docs/hap_integrate.md index 40155dfb7de90a4f5422d79c4ba846cf7a635445..c8e3e198ffd8e893a8cda9569875f55c8dc0f409 100644 --- a/thirdparty/bzip2/docs/hap_integrate.md +++ b/thirdparty/bzip2/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/bzip2 #三方库bzip2的目录结构如下 @@ -22,19 +23,16 @@ ├── README_zh.md ``` -- 将geos拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/bzip2 tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh bzip2 ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` bzip2/arm64-v8a bzip2/armeabi-v7a ``` @@ -54,7 +52,7 @@ ``` ![bzip2_usage](pic/bzip2_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行 make check 运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/c-ares/README_zh.md b/thirdparty/c-ares/README_zh.md index 12318606b7f49b9526f3622c5376a4dfb893fe28..2d010885af3c353eb6c8dbb56333cf382d17528a 100644 --- a/thirdparty/c-ares/README_zh.md +++ b/thirdparty/c-ares/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 c-ares是一个C语言的异步DNS解析库. ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:cares-1_19_0 - 当前适配的功能:提供异步DNS解析能力 -- [MIT license](https://github.com/c-ares/c-ares/blob/main/LICENSE.md) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/c-ares/docs/hap_integrate.md b/thirdparty/c-ares/docs/hap_integrate.md index 8a549cfd532057970f0f6a3d0e8716133066be33..5c34b61dc360d355136b4aae1207ea83a59dce9b 100644 --- a/thirdparty/c-ares/docs/hap_integrate.md +++ b/thirdparty/c-ares/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将c-ares拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ``` - cd tpc_c_cplusplus - cp thirdparty/c-ares tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh c-ares ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` c-ares/arm64-v8a c-ares/armeabi-v7a @@ -72,17 +65,16 @@ ``` #将三方库加入工程中,c-ares是对应的三方库名 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/c-ares/${OHOS_ARCH}/lib/libcares.so.2) + target_link_libraries(entry PUBLIC libace_napi.z.so ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libcares.so) #将三方库的头文件加入工程中,c-ares是对应的三方库名 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/c-ares/${OHOS_ARCH}/include) ``` - ![c-ares_usage](pic/c-ares_usage.png) ## 测试三方库 三方库的测试使用原库自带的可执行文件来做测试 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) ``` diff --git a/thirdparty/c-ares/docs/pic/c-ares_install_dir2.png b/thirdparty/c-ares/docs/pic/c-ares_install_dir2.png old mode 100644 new mode 100755 index f424b0a9ffe39409dda43e712069c78f16b5aea7..2fd99fbb33c35e892e0d3bfcfbd38896e205c5c7 Binary files a/thirdparty/c-ares/docs/pic/c-ares_install_dir2.png and b/thirdparty/c-ares/docs/pic/c-ares_install_dir2.png differ diff --git a/thirdparty/cJSON/README_zh.md b/thirdparty/cJSON/README_zh.md index 43ecc83bc3fd7a3ec48f20b2087439df42c59cc7..f037d82d21d3023368ce804494ce79e3c03ae957 100644 --- a/thirdparty/cJSON/README_zh.md +++ b/thirdparty/cJSON/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 cJSON是使用C语言编写,用来创建、解析JSON文件的库。cJSON特点就是工程文件简单,只有一个.c和一个.h,但提供函数接口功能齐全,麻雀虽小五脏俱全,使得在嵌入式工程中使用起来得心应手。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.7.15 - 当前适配的功能:创建、解析JSON文件 -- [ MIT license](https://github.com/DaveGamble/cJSON) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/cJSON/docs/hap_integrate.md b/thirdparty/cJSON/docs/hap_integrate.md index 7b568fdf46924fcd913396e074d4685feaa6697d..9665d74a648cbbf31b1b87b0f7e8aa86ef3fa3fa 100755 --- a/thirdparty/cJSON/docs/hap_integrate.md +++ b/thirdparty/cJSON/docs/hap_integrate.md @@ -3,10 +3,10 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` @@ -22,19 +22,15 @@ ├── README_zh.md ``` -- 将cJSON拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/cJSON tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh cJSON ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` cJSON/arm64-v8a cJSON/armeabi-v7a @@ -51,14 +47,13 @@ ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libcjson.so.1.7.15) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libcjson.so) #将三方库的头文件加入工程中 - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cJSON/${OHOS_ARCH}/include/cjson) - + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cJSON/${OHOS_ARCH}/include) + ``` - ![jbigkit_usage](pic/cJSON_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/cJSON/docs/pic/cJSON_install_dir.png b/thirdparty/cJSON/docs/pic/cJSON_install_dir.png index 100116eae8179d2f4a4b57b7405e577af8348c75..cdc0bd75ccdb1d2f441bbb360419e516beccc790 100644 Binary files a/thirdparty/cJSON/docs/pic/cJSON_install_dir.png and b/thirdparty/cJSON/docs/pic/cJSON_install_dir.png differ diff --git a/thirdparty/caffe/README_zh.md b/thirdparty/caffe/README_zh.md index 2bdc1b90e48812d1cf6a838dabe9058baee6b7bd..8bc9ace2e7e41e72c7755811d6f7e80d29551c50 100644 --- a/thirdparty/caffe/README_zh.md +++ b/thirdparty/caffe/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 Caffe:一个用于深度学习的快速开放框架。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:1.0 - 当前适配的功能:支持深度学习 -- [Copyright (c) 2014-2017 The Regents of the University of California](https://github.com/BVLC/caffe/blob/master/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/caffe/docs/hap_integrate.md b/thirdparty/caffe/docs/hap_integrate.md index 4d4d512d376cf6bb6fb8402bd105b8c1d05992ad..a57c4f85996cd9c7b1b3de1071d26a95c52c604c 100644 --- a/thirdparty/caffe/docs/hap_integrate.md +++ b/thirdparty/caffe/docs/hap_integrate.md @@ -3,10 +3,10 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` @@ -15,38 +15,26 @@ - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/caffe #三方库caffe的目录结构如下 - ├── docs #三方库相关文档的文件夹 - ├── HPKBUILD #构建脚本 - ├── SHA512SUM #三方库校验文件 - ├── caffe_oh_pkg.patch #补丁 - ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 - ├── Makefile.ohos #编译caffe所需依赖库cblas的makefile - ├── caffe_test.sh #三方库自测脚本 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── SHA512SUM #三方库校验文件 + ├── caffe_oh_pkg.patch #补丁 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── Makefile.ohos #编译caffe所需依赖库cblas的makefile + ├── caffe_test.sh #三方库自测脚本 ├── README_zh.md ``` -- caffe库需要依赖snappy leveldb opencv szip hdf5 boost glog zlib gflags googletest 这些库,需要将这些库和caffe库都拷贝至tools/main目录下 - ```shell - cd tpc_c_cplusplus - cp thirdparty/caffe tools/main -rf - cp thirdparty/leveldb tools/main -rf - cp thirdparty/opencv tools/main -rf - cp thirdparty/szip tools/main -rf - cp thirdparty/hdf5 tools/main -rf - cp thirdparty/boost tools/main -rf - cp thirdparty/glog tools/main -rf - cp thirdparty/zlib tools/main -rf - cp thirdparty/gflags tools/main -rf - cp thirdparty/googletest tools/main -rf - ``` -- 在tools目录下编译三方库,编译caffe库时候需要和依赖库一起进行编译。 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ```shell - cd tools - ./build.sh ./build.sh snappy leveldb opencv szip hdf5 boost glog zlib gflags googletest caffe + cd lycium + ./build.sh caffe ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + ``` caffe/arm64-v8a caffe/armeabi-v7a liboost/arm64-v8a boost/armeabi-v7a @@ -61,7 +49,7 @@ szip/arm64-v8a szip/armeabi-v7a zlib/arm64-v8a zlib/armeabi-v7a ``` - + - [测试三方库](#测试三方库) ## 应用中使用三方库 @@ -106,11 +94,11 @@ target_include_directories(entry PRIVATE ![caffe_usage](pic/caffe_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) -- 将tools/caffe/caffe_test.sh 文件拷贝到 tools/caffe/caffe-1.0目录 -- 将编译生成的tools/caffe目录 压缩成caffe.tar.gz文件 -- 将编译生成的tools/usr目录 压缩成usr.tar.gz文件 +- 将lycium/caffe/caffe_test.sh 文件拷贝到 lycium/caffe/caffe-1.0目录 +- 将编译生成的lycium/caffe目录 压缩成caffe.tar.gz文件 +- 将编译生成的lycium/usr目录 压缩成usr.tar.gz文件 - 将准备好的文件推送到开发板,在windows命令行进行如下操作 @@ -135,7 +123,7 @@ target_include_directories(entry PRIVATE LD_LIBRARY_PATH=/data/local/tmp/usr/boost/armeabi-v7a/lib:/data/local/tmp/usr/caffe/armeabi-v7a/lib:/data/local/tmp/usr/gflags/armeabi-v7a/lib:/data/local/tmp/usr/glog/armeabi-v7a/lib:/data/local/tmp/usr/googletest/armeabi-v7a/lib:/data/local/tmp/usr/hdf5/armeabi-v7a/lib:/data/local/tmp/usr/leveldb/armeabi-v7a/lib:/data/local/tmp/usr/opencv/armeabi-v7a/lib:/data/local/tmp/usr/snappy/armeabi-v7a/lib:/data/local/tmp/usr/szip/armeabi-v7a/lib:/data/local/tmp/usr/zlib/armeabi-v7a/lib /bin/sh ./caffe_test.sh armeabi-v7a #32位系统 执行命令 - ``` +```  ![caffe_test](pic/caffe_test.jpg) diff --git a/thirdparty/concurrentqueue/README_zh.md b/thirdparty/concurrentqueue/README_zh.md index 5fa3a8992e050b7c307fcba83af8b46a922bd115..11b0c62a5a05a9969db09f04c214fa10169d98dd 100644 --- a/thirdparty/concurrentqueue/README_zh.md +++ b/thirdparty/concurrentqueue/README_zh.md @@ -9,7 +9,6 @@ concurrentqueue是一个高效的线程安全的队列的库。 - Rom版本:OpenHarmony3.2 beta2 - 三方库版本:v1.0.3 - 当前适配的功能:入队与出队 -- License:[BSD License](https://github.com/cameron314/concurrentqueue/blob/master/LICENSE.md) ## 集成方式 diff --git a/thirdparty/coturn/HPKBUILD b/thirdparty/coturn/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..2bd77fe1adf7b23a8670e65dd46f4845ad00e300 --- /dev/null +++ b/thirdparty/coturn/HPKBUILD @@ -0,0 +1,72 @@ +# Contributor: Chen Xu +# Maintainer: Chen Xu +pkgname=coturn +pkgver="4.6.2" +pkgrel=0 +pkgdesc="coturn is a free open source implementation of TURN and STUN Server. The TURN Server is a VoIP media traffic NAT traversal server and gateway." +url="https://github.com/coturn/coturn" +archs=("armeabi-v7a" "arm64-v8a") +license=("BSD-3-Clause") +depends=("openssl" "libevent" "sqlite") +makedepends=() + +source="https://github.com/$pkgname/$pkgname/archive/refs/tags/$pkgver.tar.gz" + +downloadpackage=true +autounpack=true +buildtools="configure" + +builddir=$pkgname-${pkgver} +packagename=$builddir.tar.gz + +source envset.sh +host= + +prepare() { + cp -rf $builddir $builddir-$ARCH-build + if [ $ARCH == "armeabi-v7a" ] + then + setarm32ENV + host=arm-linux + fi + if [ $ARCH == "arm64-v8a" ] + then + setarm64ENV + host=aarch64-linux + fi +} + +build() { + cd $builddir-$ARCH-build + PKG_CONFIG_LIBDIR="${pkgconfigpath}" ./configure "$@" --host=$host > `pwd`/build.log 2>&1 + make -j4 VERBOSE=1 >> `pwd`/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir-$ARCH-build + make install VERBOSE=1 >> `pwd`/build.log 2>&1 + cd $OLDPWD + unset host +} + +check() { + if [ $ARCH == "armeabi-v7a" ] + then + unsetarm32ENV + fi + if [ $ARCH == "arm64-v8a" ] + then + unsetarm64ENV + fi + echo "The test must be on an OpenHarmony device!" + # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${LYCIUM_ROOT}/usr/libevent/arm64-v8a/lib/:${LYCIUM_ROOT}/usr/openssl/arm64-v8a/lib:${LYCIUM_ROOT}/usr/sqlite/arm64-v8a/lib + # make test VERBOSE=1 +} + +# 清理环境 +cleanbuild() { + rm -rf ${PWD}/$builddir ${PWD}/$builddir-arm64-v8a-build ${PWD}/$builddir-armeabi-v7a-build #${PWD}/$packagename +} diff --git a/thirdparty/coturn/HPKCHECK b/thirdparty/coturn/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..77205599c9522a99f0ebd0b620f85a171eccedc1 --- /dev/null +++ b/thirdparty/coturn/HPKCHECK @@ -0,0 +1,15 @@ +# Contributor: Chen Xu +# Maintainer: Chen Xu + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir-$ARCH-build + make test VERBOSE=1 > ${logfile} 2>&1 + res=$? + + cd $OLDPWD + return $res +} diff --git a/thirdparty/coturn/OAT.xml b/thirdparty/coturn/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..a203e523c1aaf25beaf1003708ee5b2f4c8ecc4f --- /dev/null +++ b/thirdparty/coturn/OAT.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/thirdparty/coturn/README.OpenSource b/thirdparty/coturn/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..dfbeb02993a9032e2041107f788863813225cd42 --- /dev/null +++ b/thirdparty/coturn/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "coturn", + "License": "BSD-3-Clause", + "License File": "LICENSE", + "Version Number": "4.6.2", + "Owner": "chenxu.unix@gmail.com", + "Upstream URL": "https://github.com/coturn/coturn.git", + "Description": "coturn is a free open source implementation of TURN and STUN Server. The TURN Server is a VoIP media traffic NAT traversal server and gateway." + } +] diff --git a/thirdparty/coturn/README_zh.md b/thirdparty/coturn/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..e7926fd2c2320e4b5beadaf542d665faf01cd3b8 --- /dev/null +++ b/thirdparty/coturn/README_zh.md @@ -0,0 +1,11 @@ +# coturn三方库说明 +## 功能简介 +coturn是TURN和STUN服务器的免费开源实现。 +## 使用约束 +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) +- 三方库版本:4.6.2 +- 当前适配的功能:STUN、TURN、ICE + +## 集成方式 ++ [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/coturn/SHA512SUM b/thirdparty/coturn/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..7d3d6cf1a1c3c0a37de2c935d7c21eadd14b64a7 --- /dev/null +++ b/thirdparty/coturn/SHA512SUM @@ -0,0 +1 @@ +ab8457921952a00b34111c03f2e5a2a9035977566270fdf9c8b9b777346645a8b233574134c0ef1c3aa2cf84bd89fbc82648678144c68ac0dff1712ce503b731 coturn-4.6.2.tar.gz diff --git a/thirdparty/coturn/docs/hap_integrate.md b/thirdparty/coturn/docs/hap_integrate.md new file mode 100644 index 0000000000000000000000000000000000000000..3a441f299d237cda42c76d31a65095175143d57d --- /dev/null +++ b/thirdparty/coturn/docs/hap_integrate.md @@ -0,0 +1,83 @@ +# coturn集成到应用hap +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 +## 开发环境 +- ubuntu20.04 +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) +- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../tools/README.md#编译环境准备) +- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +## 编译三方库 +- 下载本仓库 + ``` + git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 + ``` +- 三方库目录结构 + ``` + tpc_c_cplusplus/thirdparty/coturn #三方库coturn的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── SHA512SUM #三方库校验文件 + ├── OAT.xml #OAT文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md + ``` + +- 将coturn拷贝至lycium/main目录下 + ``` + cd tpc_c_cplusplus + mkdir -p lycium/main + cp thirdparty/openssl lycium/main -rf + cp thirdparty/libevent lycium/main -rf + cp thirdparty/sqlite lycium/main -rf + cp thirdparty/coturn lycium/main -rf + ``` +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#编译环境准备) + + ``` + cd lycium + ./build.sh coturn + ``` +- 三方库头文件及生成的库 + 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + ``` + coturn/armeabi-v7a coturn/arm64-v8a + ``` + +- [测试三方库](#测试三方库) + +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库头文件拷贝到该目录下, 如下图所示 + ![thirdparty_install_dir](pic/screen_cut.jpg) + +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + ``` + #将三方库加入工程中 + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libturnclient.a) + + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/coturn/${OHOS_ARCH}/include) + ``` + +## 测试三方库 +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) + +- 进入到构建目录,执行如下命令(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) +注意:以下为64位命令,如需测试32位,请将arm64-v8a替换为armeabi-v7a。 +``` +export LD_LIBRARY_PATH=${LYCIUM_ROOT}/usr/libevent/arm64-v8a/lib/:${LYCIUM_ROOT}/usr/openssl/arm64-v8a/lib:${LYCIUM_ROOT}/usr/sqlite/arm64-v8a/lib:$LD_LIBRARY_PATH +make test +``` + +测试用例运行结果如下: + + ![coturn_test](pic/run_screen_cut.jpg) + +## 参考资料 +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md) diff --git a/thirdparty/coturn/docs/pic/run_screen_cut.jpg b/thirdparty/coturn/docs/pic/run_screen_cut.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f31b5a48435c81323dcac0da8afac30b22345750 Binary files /dev/null and b/thirdparty/coturn/docs/pic/run_screen_cut.jpg differ diff --git a/thirdparty/coturn/docs/pic/screen_cut.jpg b/thirdparty/coturn/docs/pic/screen_cut.jpg new file mode 100755 index 0000000000000000000000000000000000000000..34ed6e7d636d215c6f230e9e0f0d26a5a286591d Binary files /dev/null and b/thirdparty/coturn/docs/pic/screen_cut.jpg differ diff --git a/thirdparty/cryptopp/README_zh.md b/thirdparty/cryptopp/README_zh.md index f8850f602ca449402b45f1b112179c97a0b9517b..baa704a0e7219a0f6c6c7ed78013c8fcd2dbf0f3 100644 --- a/thirdparty/cryptopp/README_zh.md +++ b/thirdparty/cryptopp/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 cryptopp是开源的C++密码学库,集成了非常多的密码算法。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:Crypto++ 8.7 release - 当前适配的功能:支持开源密码算法 -- [Boost Software License/CRYPTOGAMS License](https://github.com/weidai11/cryptopp/blob/master/License.txt) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/cryptopp/docs/hap_integrate.md b/thirdparty/cryptopp/docs/hap_integrate.md index 0764fe8686cf7d0224ed7d1f1241a84dfc1682fd..c6015758ae4b29dc7a321066cd19a03262cbad2d 100644 --- a/thirdparty/cryptopp/docs/hap_integrate.md +++ b/thirdparty/cryptopp/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/cryptopp #三方库cryptopp的目录结构如下 @@ -22,23 +23,21 @@ ├── README_zh.md ``` -- 将cryptopp拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/cryptopp tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh cryptopp ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + ``` cryptopp/arm64-v8a cryptopp/armeabi-v7a ``` - + - [测试三方库](#测试三方库) ## 应用中使用三方库 @@ -53,7 +52,7 @@ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cryptopp/${OHOS_ARCH}/lib/libcryptopp.a) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cryptopp/${OHOS_ARCH}/include) - + ``` ![cryptopp_usage](pic/cryptopp_usage.png) ## 测试三方库 diff --git a/thirdparty/curl/README_zh.md b/thirdparty/curl/README_zh.md index 698d4f5ea525dd30671b5ac8fa69febc74763114..1a61a17b494807438c3682c18e9ac1c58353762b 100644 --- a/thirdparty/curl/README_zh.md +++ b/thirdparty/curl/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 curl是一个C库用于网络请求。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:curl-8_0_1 - 当前适配的功能:支持网络请求 -- [BSD/ISC/curl](https://github.com/curl/curl) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/curl/docs/hap_integrate.md b/thirdparty/curl/docs/hap_integrate.md index 97213b6360ebeb7d6efce98f4f109274249d5196..2053ab69d6b1302972e642ab56eb1b73fee6c61d 100644 --- a/thirdparty/curl/docs/hap_integrate.md +++ b/thirdparty/curl/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/curl #三方库curl的目录结构如下 @@ -22,29 +23,22 @@ ├── README_zh.md ``` -- 将curl、openssl、zstd、nghttp2拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/curl tools/main -rf - cp thirdparty/openssl tools/main -rf - cp thirdparty/zstd tools/main -rf - cp thirdparty/nghttp2 tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools - ./build.sh openssl zstd nghttp2 curl + cd lycium + ./build.sh curl ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` curl/arm64-v8a curl/armeabi-v7a - openssl/arm64-v8a openssl/armeabi-v7a zstd/arm64-v8a zstd/armeabi-v7a nghttp2/arm64-v8a nghttp2/armeabi-v7a ``` - + - [测试三方库](#测试三方库) ## 应用中使用三方库 @@ -59,18 +53,10 @@ - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libcurl.so.4) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libcrypto.so.1.1) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libnghttp2.so.14) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libssl.so.1.1) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libzstd.so.1) + target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libcurl.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/curl/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/nghttp2/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zstd/${OHOS_ARCH}/include) ``` - ![curl_usage](pic/curl_usage.jpg) ## 参考资料 - [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) diff --git a/thirdparty/curl/docs/pic/curl_install_dir_1.jpg b/thirdparty/curl/docs/pic/curl_install_dir_1.jpg index b4f3124f7adf8d1c60cf6e5cb6a83e3c215d74b0..550b05625298e8eb0f68d1f31a75cb5c2c4a0f04 100644 Binary files a/thirdparty/curl/docs/pic/curl_install_dir_1.jpg and b/thirdparty/curl/docs/pic/curl_install_dir_1.jpg differ diff --git a/thirdparty/curl/docs/pic/curl_install_dir_2.jpg b/thirdparty/curl/docs/pic/curl_install_dir_2.jpg index db2557dadf870945c66358533e84fd1e31cf34c6..ea3accb82af686252786c5ddc283118eb0592592 100644 Binary files a/thirdparty/curl/docs/pic/curl_install_dir_2.jpg and b/thirdparty/curl/docs/pic/curl_install_dir_2.jpg differ diff --git a/thirdparty/diff-match-patch-cpp-stl/README_zh.md b/thirdparty/diff-match-patch-cpp-stl/README_zh.md index 68dce6de17ee65bf796a6ea51258c2623ff52764..050f06c58163f9450715ae65d9e4af8a636789cd 100644 --- a/thirdparty/diff-match-patch-cpp-stl/README_zh.md +++ b/thirdparty/diff-match-patch-cpp-stl/README_zh.md @@ -1,12 +1,11 @@ # diff-match-patch-cpp-stl三方库说明 ## 功能简介 -C++ STL variant of https://code.google.com/p/google-diff-match-patch. +Diff Match Patch是一个多种语言的高性能库,可操作纯文本。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:master - 当前适配的功能:支持文本对比等功能。 -- [Apache License 2.0](https://github.com/leutloff/diff-match-patch-cpp-stl/blob/master/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/diff-match-patch-cpp-stl/docs/hap_integrate.md b/thirdparty/diff-match-patch-cpp-stl/docs/hap_integrate.md index 3604172cbbfc2c45dbe71bd83a68c2278b43592a..1ae9ff0aa6fd745b89598d5fb88dcaf72d721290 100644 --- a/thirdparty/diff-match-patch-cpp-stl/docs/hap_integrate.md +++ b/thirdparty/diff-match-patch-cpp-stl/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/diff-match-patch-cpp-stl #三方库diff-match-patch-cpp-stl的目录结构如下 @@ -22,17 +23,14 @@ ├── README_zh.md ``` -- 将diff-match-patch-cpp-stl拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/diff-match-patch-cpp-stl tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh diff-match-patch-cpp-stl ``` + - [测试三方库](#测试三方库) ## 应用中使用三方库 @@ -42,7 +40,7 @@ ![diff_install](pic/diff_install.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录下目录执行可执行文件(diff_match_patch_test_string、 diff_match_patch_test_wstring),运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/djvulibre/README_zh.md b/thirdparty/djvulibre/README_zh.md index 7ef9d80e5593ad825a3845ae432e83bbb1f99422..9007eac0513b4889b1178d4c44961a4755b33a51 100644 --- a/thirdparty/djvulibre/README_zh.md +++ b/thirdparty/djvulibre/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 djvulibre是一组压缩技术,一种文件格式,以及用于通过网络递送数字文档的软件平台,扫描文档和高分辨率图像。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:3.5.27.1-7 - 当前适配的功能:支持把pbm转换djuv以及多个djuv文件合并 -- [GPLv2](https://github.com/barak/djvulibre) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/djvulibre/docs/hap_integrate.md b/thirdparty/djvulibre/docs/hap_integrate.md index 058a4ade83b739a76bde4662afa517efecca3895..e84c7ee0d290682d32afdf5f10e2413e0081d691 100644 --- a/thirdparty/djvulibre/docs/hap_integrate.md +++ b/thirdparty/djvulibre/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/djvulibre #三方库djvulibre的目录结构如下 @@ -23,19 +24,16 @@ ├── README_zh.md ``` -- 将djvulibre拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/djvulibre tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh djvulibre ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` djvulibre/arm64-v8a djvulibre/armeabi-v7a ``` @@ -55,7 +53,7 @@ ``` ![djvulibre_usage](pic/djvulibre_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的c44、djvm可执行文件及测试文件a.pbm、b.pbm准备好,备注:素材在source目录下,最终结果merge.djuv文件可通过[windjview](https://sourceforge.net/projects/windjview/) 浏览 diff --git a/thirdparty/double-conversion/README_zh.md b/thirdparty/double-conversion/README_zh.md index 245e4c2df89642312d623980e2b27b4d58fab984..38ed340cfd46e7831e5eca721615a4a6c03dc6f9 100644 --- a/thirdparty/double-conversion/README_zh.md +++ b/thirdparty/double-conversion/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 double-conversion用于IEEE高效二进制-十进制和十进制-二进制转换。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v3.2.1 - 当前适配的功能:IEEE高效二进制-十进制和十进制-二进制转换 -- [BSD](https://github.com/google/double-conversion) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/double-conversion/docs/hap_integrate.md b/thirdparty/double-conversion/docs/hap_integrate.md index 155e15c085ca84935f1601cd20e8855d629dfc1d..17df17d033b5998fe82bd8d7e7bd887d4a6bdfce 100644 --- a/thirdparty/double-conversion/docs/hap_integrate.md +++ b/thirdparty/double-conversion/docs/hap_integrate.md @@ -3,10 +3,10 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` @@ -22,19 +22,15 @@ ├── README_zh.md ``` -- 将double-conversion拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/double-conversion tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh double-conversion ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` double-conversion/arm64-v8a double-conversion/armeabi-v7a ``` @@ -54,7 +50,7 @@ ``` ![double-conversion_usage](pic/double-conversion_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/exiv2/README_zh.md b/thirdparty/exiv2/README_zh.md index 3f17162674ac3c253229393eb785540908a06c34..ef0fa509cfca964f9aaf170a210aa94aadde86b7 100644 --- a/thirdparty/exiv2/README_zh.md +++ b/thirdparty/exiv2/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 exiv2是一个C++库和命令行实用程序,用于读取、写入、删除和修改Exif、IPTC、XMP和ICC图像元数据。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v0.27.6 - 当前适配的功能:读取、写入、删除和修改Exif、IPTC、XMP和ICC图像元数据 -- [GPL2.0](https://github.com/Exiv2/exiv2) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/exiv2/docs/hap_integrate.md b/thirdparty/exiv2/docs/hap_integrate.md index d979be9f4830aba9d49b97efeec9049805ccf514..3c8201a2515c2f5b6b9fb622309a125ec10a4bf9 100644 --- a/thirdparty/exiv2/docs/hap_integrate.md +++ b/thirdparty/exiv2/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/exiv2 #三方库exiv2的目录结构如下 @@ -22,20 +23,16 @@ ├── README_zh.md ``` -- 将exiv2拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/exiv2 tools/main -rf - cp thirdparty/libexpat tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh libexpat exiv2 ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` exiv2/arm64-v8a exiv2/armeabi-v7a libexpat/arm64-v8a libexpat/armeabi-v7a @@ -53,15 +50,12 @@ - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libexiv2.so.27) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libexpat.so.1) + target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libexiv2.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/exiv2/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libexpat/${OHOS_ARCH}/include) ``` - ![exiv2_usage](pic/exiv2_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的exiv2可执行文件及测试文件exiv2.jpg、large.icc准备好,备注:jpg图片在原库下的README-SAMPLES.md文件中搜索文件名"Stonehenge.jpg"找到下载链接、large.icc:在原库的test/data/目录下 @@ -72,7 +66,9 @@ hdc_std file send exiv2 /data #将可执行文件推入开发板data目录 hdc_std file send libc++_shared.so /system/lib64 #将动态库推入开发板 hdc_std file send libexiv2.so.27 /system/lib64 + hdc_std file send libexiv2.so /system/lib64 hdc_std file send libexpat.so.1 /system/lib64 + hdc_std file send libexpat.so /system/lib64 hdc_std file send exiv2.jpg /data #将测试文件推入开发板data目录 hdc_std file send large.icc /data hdc_std shell #进入开发板 diff --git a/thirdparty/exiv2/docs/pic/exiv2_install_dir.jpg b/thirdparty/exiv2/docs/pic/exiv2_install_dir.jpg index ddd45e37595dc08ec1dada07f956ea30f033e447..8ef9384b318de733ae8bb0007cf46ca0826dad4d 100644 Binary files a/thirdparty/exiv2/docs/pic/exiv2_install_dir.jpg and b/thirdparty/exiv2/docs/pic/exiv2_install_dir.jpg differ diff --git a/thirdparty/faad2/README_zh.md b/thirdparty/faad2/README_zh.md index 4a7a1f7a62b0d679c37cdc46e47784d15fbd77dd..28a73cf968aca4b4e2672f05faf3f2e2408c0499 100644 --- a/thirdparty/faad2/README_zh.md +++ b/thirdparty/faad2/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 faad2是一个音频解码的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:2.10.1 - 当前适配的功能:支持音频的解码 -- [GPLv2](https://github.com/knik0/faad2) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/faad2/docs/hap_integrate.md b/thirdparty/faad2/docs/hap_integrate.md index a436744ff6f8de27d0ea27a1673a42ce768d152c..1f3c3dc5c3e3cfda00c56c7e84e5835469c10084 100644 --- a/thirdparty/faad2/docs/hap_integrate.md +++ b/thirdparty/faad2/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/faad2 #三方库faad2的目录结构如下 @@ -22,19 +23,16 @@ ├── README_zh.md ``` -- 将faad2拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/faad2 tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh faad2 ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` faad2/arm64-v8a faad2/armeabi-v7a ``` @@ -60,7 +58,7 @@ ``` ![faad2_usage](pic/faad2_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的faad可执行文件及音频测试文件test.aac准备好 diff --git a/thirdparty/fdk-aac/HPKCHECK b/thirdparty/fdk-aac/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..47db18fe4271b56e89d7895733c6ab5442f3d9b5 --- /dev/null +++ b/thirdparty/fdk-aac/HPKCHECK @@ -0,0 +1,20 @@ +# Contributor: shann +# Maintainer: shann + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir/$ARCH-build + ./aac-enc ./../../ring.wav ring.aac > ${logfile} 2>&1 + res=$? + if [ $res -eq 0 ] + then + mkdir ${LYCIUM__MANUAL_CONFIRM_PATH}/${pkgname} + cp ring.aac ${LYCIUM__MANUAL_CONFIRM_PATH}/${pkgname}/ + fi + cd $OLDPWD + + return $res +} \ No newline at end of file diff --git a/thirdparty/fdk-aac/README_zh.md b/thirdparty/fdk-aac/README_zh.md old mode 100755 new mode 100644 index 67b263c25f590213cf878e35049dffff059af17c..a0d8ee67c960e83e25c5db791f134c9961e5ae75 --- a/thirdparty/fdk-aac/README_zh.md +++ b/thirdparty/fdk-aac/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 fdk-aac是一个开源的AAC编码库,被认为是开源AAC编码器中音质最好的之一。它支持多种编码模式,包括LC-AAC、HE-AAC和HE-AAC V2 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v2.0.2 - 当前适配的功能:开源的AAC编码库、支持多种编码模式,包括LC-AAC、HE-AAC和HE-AAC V2 -- [Apache License 2.0](https://github.com/mstorsjo/fdk-aac/blob/master/METADATA) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/fdk-aac/docs/hap_integrate.md b/thirdparty/fdk-aac/docs/hap_integrate.md index 52a40a2c86cd002f2ce0049b5157cc206b35de8e..936bedfd9bafcd57c8ae89c69f19d5e264ee4f86 100644 --- a/thirdparty/fdk-aac/docs/hap_integrate.md +++ b/thirdparty/fdk-aac/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` wget https://github.com/mstorsjo/fdk-aac/archive/refs/tags/v2.0.2.tar.gz ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/fdk-aac #三方库fdk-aac的目录结构如下 @@ -22,20 +23,17 @@ ├── README_zh.md ``` -- 将fdk-aac拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/fdk-aac tools/main -rf - ``` -- 在tools目录下编译三方库 +- 在lycium目录下编译三方库 fdk-aac库不需要依赖其它库,所以在build时只需要编译fdk-aac库即可 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh fdk-aac ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` fdk-aac/arm64-v8a fdk-aac/armeabi-v7a ``` @@ -46,13 +44,14 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 +  ![thirdparty_install_dir](pic/fdk-aac_install_dir.jpg) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方静态库加入工程中 target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/fdk-aac/${OHOS_ARCH}/lib/libfdk-aac.a) - + #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/fdk-aac/${OHOS_ARCH}/include) ``` @@ -60,7 +59,7 @@  ![fdk-aac_usage](pic/fdk-aac_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的可执行文件及生成的动态库准备好 diff --git a/thirdparty/fftw3/HPKCHECK b/thirdparty/fftw3/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..cc7eb7296fa423d9255a4cb7b627ace5a12a6a07 --- /dev/null +++ b/thirdparty/fftw3/HPKCHECK @@ -0,0 +1,15 @@ +# Contributor: tangshaoteng +# Maintainer: tangshaoteng + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir/$ARCH-build + make check-local -C tests > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} diff --git a/thirdparty/fftw3/README_zh.md b/thirdparty/fftw3/README_zh.md index c2c17552b8270919b2566042f1d2f6bba7d8ec36..c1957867226eebf91417d6044a327692803c6ea3 100644 --- a/thirdparty/fftw3/README_zh.md +++ b/thirdparty/fftw3/README_zh.md @@ -6,7 +6,6 @@ fftw3是一个快速计算离散傅里叶变换的标准C语言程序集。 - SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:3.3.10 - 当前适配的功能:计算离散傅里叶变换 -- [GPL-2.0 license](http://fftw.org/doc/License-and-Copyright.html) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/fftw3/docs/hap_integrate.md b/thirdparty/fftw3/docs/hap_integrate.md index 0d8e90e49d106920d553eb5f8ef8d7d20cc0bf64..ae7df2b9c000e86e1a212d6bf1e98753ed7e2690 100644 --- a/thirdparty/fftw3/docs/hap_integrate.md +++ b/thirdparty/fftw3/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) -- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,29 +30,23 @@ ├── README_zh.md ``` -- 将fftw3拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/fftw3 tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh fftw3 ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库和头文件 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库和头文件 ```shell fftw3/arm64-v8a fftw3/armeabi-v7a ``` + - [测试三方库](#测试三方库) ## 应用中使用三方库 @@ -78,7 +72,7 @@ ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行如下命令: make check-local -C tests(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/fmt/README_zh.md b/thirdparty/fmt/README_zh.md index 48c0627b843cdf33a54f3b5f08bf3ccae0642b86..b8332572f439e8451031236798960565075830de 100644 --- a/thirdparty/fmt/README_zh.md +++ b/thirdparty/fmt/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 fmt是一个开源格式库,可提供C stdio和C ++ iostreams的快速安全替代品。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 4.0.3.6 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:10.0.0 - 当前适配的功能:提供C stdio和C ++ iostreams的快速安全替代品 -- [GNU Library General Public License](https://github.com/fmtlib/fmt/blob/master/LICENSE.rst) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/fmt/docs/hap_integrate.md b/thirdparty/fmt/docs/hap_integrate.md index a6e2d7ab2efa2042778e65f7d93da3ae12875c39..8c485aeafab12696d10412ed2f711401d1538265 100644 --- a/thirdparty/fmt/docs/hap_integrate.md +++ b/thirdparty/fmt/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 4.0.6.3 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/fmt #三方库CUnit的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将CUnit拷贝至tools/main目录下 - ```too - cd tpc_c_cplusplus - cp thirdparty/fmt tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh fmt ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` fmt/arm64-v8a fmt/armeabi-v7a diff --git a/thirdparty/fontconfig/README_zh.md b/thirdparty/fontconfig/README_zh.md index e766f01e3b13bf4bb1ff4f962e6d9db3e7aa9d3b..c10746495c489ecc9118db520041d7146c2d9fe4 100644 --- a/thirdparty/fontconfig/README_zh.md +++ b/thirdparty/fontconfig/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 Fontconfig是字体相关的计算机程序库,用于配置、定制全系统的字体,或将字体提供给应用程序使用。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:2.14.2 - 当前适配的功能:提供字体能力 -- [MIT license](https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/main/COPYING) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/fontconfig/docs/hap_integrate.md b/thirdparty/fontconfig/docs/hap_integrate.md index 3e38ab2b6acfe496e927776b86e0451731c05302..674e059c918d134d2408c9239251d17ab3af768f 100644 --- a/thirdparty/fontconfig/docs/hap_integrate.md +++ b/thirdparty/fontconfig/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将fontconfig拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ``` - cd tpc_c_cplusplus - cp thirdparty/fontconfig tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh fontconfig ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` fontconfig/arm64-v8a fontconfig/armeabi-v7a @@ -56,29 +49,22 @@ ## 应用中使用三方库 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示: - -  ![thirdparty_install_dir](pic/fontconfig_install_dir1.png) - -- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: +- 将三方库和依赖库的动态库拷贝到`\\entry\libs\${OHOS_ARCH}\`目录: 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录: + 将头文件拷贝到thirdparty目录下 +  ![thirdparty_install_dir](pic/fontconfig_install_dir2.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句: ``` #将三方库加入工程中,fontconfig是对应的三方库名 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/${OHOS_ARCH}/lib/libz.so) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libxml2/${OHOS_ARCH}/lib/libxml2.so) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/fontconfig/${OHOS_ARCH}/lib/libfontconfig.so.1) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/fontconfig/${OHOS_ARCH}/lib/libfontconfig.so) #将三方库的头文件加入工程中,fontconfig是对应的三方库名 - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libxml2/${OHOS_ARCH}/include) target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/fontconfig/${OHOS_ARCH}/include) ``` - ![fontconfig_usage](pic/fontconfig_usage.png) ## 参考资料 diff --git a/thirdparty/fontconfig/docs/pic/fontconfig_install_dir2.png b/thirdparty/fontconfig/docs/pic/fontconfig_install_dir2.png index c0b00149d6a9d205335f944f3c8c2ec677453ab6..813ccd64ff632a69bb0333d4acb6745449032613 100644 Binary files a/thirdparty/fontconfig/docs/pic/fontconfig_install_dir2.png and b/thirdparty/fontconfig/docs/pic/fontconfig_install_dir2.png differ diff --git a/thirdparty/freetype2/README_zh.md b/thirdparty/freetype2/README_zh.md index 8bfd3e3d7d26e0e6fd883570b4a15bc51a4af239..1f4dfa21c0dd5751751cab22f7e91539f698ba79 100644 --- a/thirdparty/freetype2/README_zh.md +++ b/thirdparty/freetype2/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 FreeType是用C语言编写的。它设计为小巧、高效且高度可定制,同时能够为数字排版生成大多数矢量和位图字体格式的高质量输出(字形图像)。FreeType是一个免费提供的便携式软件库,用于渲染字体 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:2.13.0 - 当前适配的功能:支持数字排版生成大多数矢量和位图字体格式,免费提供的便携式软件库,用于渲染字体。 -- [ General Public License](https://github.com/freetype/freetype/blob/master/LICENSE.TXT) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/freetype2/docs/hap_integrate.md b/thirdparty/freetype2/docs/hap_integrate.md index 48991ba32448d8154d20478c30524dcb0dbabc57..316468751e69d21544a6912f4324d40767bec2f3 100644 --- a/thirdparty/freetype2/docs/hap_integrate.md +++ b/thirdparty/freetype2/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/freetype2 #三方库freetype2的目录结构如下 @@ -22,24 +23,15 @@ ├── README_zh.md ``` -- 将freetype2及其依赖库zlib、bzip2、brotli、libpng、harfbuzz拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/zlib tools/main -rf - cp thirdparty/bzip2 tools/main -rf - cp thirdparty/brotli tools/main -rf - cp thirdparty/libpng tools/main -rf - cp thirdparty/harfbuzz tools/main -rf - cp thirdparty/freetype2 tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh zlib bzip2 brotli libpng harfbuzz freetype2 ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` freetype2/arm64-v8a freetype2/armeabi-v7a ``` @@ -48,20 +40,19 @@ ## 应用中使用三方库 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 +- 将生成的动态库以及依赖库拷贝到libs目录下,如下图所示 - ![freetype_install_dir](pic/freetype_install_dir.PNG) +  ![freetype_install_dir](pic/freetype_install_dir.PNG) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/freetype2/${OHOS_ARCH}/lib/libfreetype.a) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libfreetype.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/freetype2/${OHOS_ARCH}/include) ``` - ![freetype_usage](pic/freetype_usage.PNG) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录下freetype-cmake-testbuild/tb目录,运行ctest,运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/freetype2/docs/pic/freetype_install_dir.PNG b/thirdparty/freetype2/docs/pic/freetype_install_dir.PNG index 6bf39e5a190643d0b297b3874aeb787f4150247a..48a169d4ad4786442ded99c15de16c76b2adc7b2 100644 Binary files a/thirdparty/freetype2/docs/pic/freetype_install_dir.PNG and b/thirdparty/freetype2/docs/pic/freetype_install_dir.PNG differ diff --git a/thirdparty/fribidi/HPKCHECK b/thirdparty/fribidi/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..6031a809234bbe7a5bd98cd5dabf4a246b067dc2 --- /dev/null +++ b/thirdparty/fribidi/HPKCHECK @@ -0,0 +1,15 @@ +# Contributor: xucaiming <719260170@qq.com> +# Maintainer: xucaiming <719260170@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir/$ARCH-build/test/unicode-conformance + make check-TESTS > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} diff --git a/thirdparty/fribidi/README_zh.md b/thirdparty/fribidi/README_zh.md index a91c874597ce07a6f645c8976312e7324f10f4d9..3f8aced6cb99c24281325feb917836a7999b226a 100644 --- a/thirdparty/fribidi/README_zh.md +++ b/thirdparty/fribidi/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 fribidi是Unicode双向算法的实现库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.0.12 - 当前适配的功能:支持Unicode双向算法 -- [LGPL-2.1 license](https://github.com/fribidi/fribidi/blob/master/COPYING) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/fribidi/docs/hap_integrate.md b/thirdparty/fribidi/docs/hap_integrate.md index 24a6d8110667c30865c0d22e48cbb06a45b936e1..5d0c50e8637ecccdd05428c7054a6853a2cb3172 100644 --- a/thirdparty/fribidi/docs/hap_integrate.md +++ b/thirdparty/fribidi/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将fribidi拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/fribidi tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh fribidi ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell fribidi/arm64-v8a fribidi/armeabi-v7a @@ -76,7 +69,7 @@ ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行如下命令 ``` diff --git a/thirdparty/geos/README_zh.md b/thirdparty/geos/README_zh.md index a54bb459109a0f79af4719a2b799602fd5a8bbc9..725dab3c266edbda3d4e62964e0a0cc2dd01847e 100644 --- a/thirdparty/geos/README_zh.md +++ b/thirdparty/geos/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 GEOS是一个C++库,用于对二维矢量几何图形执行操作。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:3.11.2 - 当前适配的功能:处理二维矢量几何图形 -- [LGPL v2.1](https://github.com/libgeos/geos) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/geos/docs/hap_integrate.md b/thirdparty/geos/docs/hap_integrate.md index 35f80508cf91ebea8e91b310b1747ee2555ddedf..e80e54652775d00e0b01305fbca239b09e6c79d3 100644 --- a/thirdparty/geos/docs/hap_integrate.md +++ b/thirdparty/geos/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/geos #三方库geos的目录结构如下 @@ -22,19 +23,16 @@ ├── README_zh.md ``` -- 将geos拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/geos tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh geos ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` geos/arm64-v8a geos/armeabi-v7a ``` @@ -55,7 +53,7 @@ ``` ![geos_usage](pic/geos_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/giflib/README_zh.md b/thirdparty/giflib/README_zh.md index 7b9bcb8658b4d4a593532bb4b40e70ba4d85f68d..f587e9ddf9994e69842efb65996871f404f75a8b 100755 --- a/thirdparty/giflib/README_zh.md +++ b/thirdparty/giflib/README_zh.md @@ -6,11 +6,10 @@ giflib是一个用于阅读和编写gif图像的库 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:5.2.1 - 当前适配的功能:阅读和编写gif图像 -- [giflib COPYING](https://sourceforge.net/p/giflib/code/ci/master/tree/COPYING) ## 集成方式 diff --git a/thirdparty/giflib/docs/hap_integrate.md b/thirdparty/giflib/docs/hap_integrate.md index 01fc5169e60fa81fa3974fdaa1171e3c40688661..735d8e3694bf3c8d55577434f7c64a251fa1e06b 100755 --- a/thirdparty/giflib/docs/hap_integrate.md +++ b/thirdparty/giflib/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将giflib拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/giflib tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh giflib ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell giflib/arm64-v8a giflib/armeabi-v7a @@ -77,7 +70,7 @@ ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/glm/HPKCHECK b/thirdparty/glm/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..72bace46a30b9a980185c09b4b837f813dd218c1 --- /dev/null +++ b/thirdparty/glm/HPKCHECK @@ -0,0 +1,20 @@ +# Contributor: dingqian <1052888395@qq.com> +# Maintainer: dingqian <1052888395@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + ctest > $logfile 2>&1 + res=$? + if [ $res -ne 0 ] + then + mkdir ${LYCIUM_FAULT_PATH}/${pkgname} + cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/ + fi + cd $OLDPWD + + return $res +} diff --git a/thirdparty/glm/README_zh.md b/thirdparty/glm/README_zh.md index e02a7d8816d1fdff2845a056a95f60ac49bc76ea..78393e85d9483b891e0a1ee0db37d1546e8b061c 100644 --- a/thirdparty/glm/README_zh.md +++ b/thirdparty/glm/README_zh.md @@ -6,7 +6,6 @@ OpenGL Mathematics(GLM)是一个基于OpenGL着色语言(GLSL)规范的 - SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:0.9.9.8 - 当前适配的功能:OpenGL着色语言(GLSL)规范的图形软件的仅限标题的C++数学库 -- [BSD-3-Clause license](https://github.com/g-truc/glm/blob/0.9.9.8/copying.txt) ## 集成方式 + [应用hap包集成](docs/hap_ingtegrate.md) \ No newline at end of file diff --git a/thirdparty/glm/docs/hap_ingtegrate.md b/thirdparty/glm/docs/hap_ingtegrate.md index 61f09dd9e367933828fa20220036174eab63fc03..294fd1bcc2ab472eee22c5a0ba7a3d41ea1fa884 100644 --- a/thirdparty/glm/docs/hap_ingtegrate.md +++ b/thirdparty/glm/docs/hap_ingtegrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) -- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,29 +30,23 @@ ├── README_zh.md ``` -- 将glm拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/glm tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh glm ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell glm/arm64-v8a glm/armeabi-v7a ``` + - [测试三方库](#测试三方库) ## 应用中使用三方库 @@ -67,7 +61,7 @@ ```shell #将三方库加入工程中 target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glm/${OHOS_ARCH}/lib/libglm_static.a) - + #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glm/${OHOS_ARCH}/include) ``` @@ -76,7 +70,7 @@ ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行如下命令ctest(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/gmp/README_zh.md b/thirdparty/gmp/README_zh.md index 499aefbd8a91e1ef0cfb68296f02815db34f09ea..07ff5ed706d10a5ac344dd255fc514975ed3a8da 100644 --- a/thirdparty/gmp/README_zh.md +++ b/thirdparty/gmp/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 gmp是用于任意精度算术的运算库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.0.12 - 当前适配的功能:支持任意精度算术 -- [GNU LGPL v3 | GNU GPL v2](https://gmplib.org/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/gmp/docs/hap_integrate.md b/thirdparty/gmp/docs/hap_integrate.md index 0f9cf943d23cc5719cf98c6f83c909de329de0fb..4f1247153d9e8dff895ea00f4191c101c295ad1c 100644 --- a/thirdparty/gmp/docs/hap_integrate.md +++ b/thirdparty/gmp/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将gmp拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/gmp tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh gmp ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell gmp/arm64-v8a gmp/armeabi-v7a @@ -72,11 +65,11 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gmp/${OHOS_ARCH}/include) ``` - ![gmp_usage](pic/gmp_usage.png) +  ![gmp_usage](pic/gmp_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行命令make check-TESTS VERBOSE=1 -C tests/ (arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/googletest/HPKCHECK b/thirdparty/googletest/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..bcec352296b14094c847275ec0884b69730315ae --- /dev/null +++ b/thirdparty/googletest/HPKCHECK @@ -0,0 +1,21 @@ +# Contributor: lpzhong <278527840@qq.com> +# Maintainer: lpzhong <278527840@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + ctest > ${logfile} 2>&1 + res=$? + if [ $res -ne 0 ] + then + mkdir ${LYCIUM_FAULT_PATH}/${pkgname} + cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/ + fi + + cd $OLDPWD + + return $res +} diff --git a/thirdparty/googletest/README_zh.md b/thirdparty/googletest/README_zh.md index 6293b4a7561cd9704b3af0f9c92d65daf0bf03f2..4b49810427a1f721cc3e51c2631b07d0584f0e07 100644 --- a/thirdparty/googletest/README_zh.md +++ b/thirdparty/googletest/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 googletest是Google提供的一套单元测试框架。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.0.12 - 当前适配的功能:提供单元测试框架 -- [BSD-3-Clause license](https://github.com/google/googletest/blob/main/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/googletest/docs/hap_integrate.md b/thirdparty/googletest/docs/hap_integrate.md index dfa5251975e47b09cf41520c90e9ef6eb8c9c854..472da718a146dbef5a6b21b70a11cec6246cfba4 100644 --- a/thirdparty/googletest/docs/hap_integrate.md +++ b/thirdparty/googletest/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将googletest拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/googletest tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh googletest ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell googletest/arm64-v8a googletest/armeabi-v7a @@ -61,7 +54,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示   - ![thirdparty_install_dir](pic/googletest_install_dir.png) +  ![thirdparty_install_dir](pic/googletest_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -79,7 +72,7 @@ ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行如下命令ctest(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/harfbuzz/README_zh.md b/thirdparty/harfbuzz/README_zh.md index 09832214f7118bec05eaf6cf390189d5048c975e..8a8992e937cd7d8ee56793e36ca766e6f580acfa 100644 --- a/thirdparty/harfbuzz/README_zh.md +++ b/thirdparty/harfbuzz/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 harfbuzz是一个有OpenType文本整形能力的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:7.1.0 - 当前适配的功能:支持OpenType文本整形能力 -- [Old MIT](https://github.com/harfbuzz/harfbuzz/blob/main/COPYING) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/harfbuzz/docs/hap_integrate.md b/thirdparty/harfbuzz/docs/hap_integrate.md index 6abbe7e20d5e086ba4727e02c04aad0473405640..4c87a4ff53a04313801a64b1dbe06acbec58bdf5 100644 --- a/thirdparty/harfbuzz/docs/hap_integrate.md +++ b/thirdparty/harfbuzz/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将harfbuzz拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ``` - cd tpc_c_cplusplus - cp thirdparty/harfbuzz tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh harfbuzz ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` harfbuzz/arm64-v8a harfbuzz/armeabi-v7a @@ -58,29 +51,22 @@ ## 应用中使用三方库 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示: +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示:  ![thirdparty_install_dir](pic/harfbuzz_install_dir1.png) -- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: - - 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录: - -  ![thirdparty_install_dir](pic/harfbuzz_install_dir2.png) - - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句: ``` #将三方库加入工程中,harfbuzz是对应的三方库名 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/harfbuzz/${OHOS_ARCH}/lib/libharfbuzz.so.0) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libharfbuzz.so) #将三方库的头文件加入工程中,harfbuzz是对应的三方库名 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/harfbuzz/${OHOS_ARCH}/include) ``` - ![harfbuzz_usage](pic/harfbuzz_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行make check运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/harfbuzz/docs/pic/harfbuzz_install_dir1.png b/thirdparty/harfbuzz/docs/pic/harfbuzz_install_dir1.png index c82ef7c6224587b17cb102c9c2a04f828163db81..2a3b3223551ed11ac032e2d899bbc1634ef8aeaa 100644 Binary files a/thirdparty/harfbuzz/docs/pic/harfbuzz_install_dir1.png and b/thirdparty/harfbuzz/docs/pic/harfbuzz_install_dir1.png differ diff --git a/thirdparty/hunspell/README_zh.md b/thirdparty/hunspell/README_zh.md index 4123db3c6d4b6097d18ff86eede1c17cb5a547a7..93bb711156f558d579002257f157807edde8787c 100644 --- a/thirdparty/hunspell/README_zh.md +++ b/thirdparty/hunspell/README_zh.md @@ -7,10 +7,9 @@ hunspell 是一个免费的拼写检查器和形态分析器库和命令行工 ## 使用约束 - IDE版本:DevEco Studio 3.1 Release -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.7.2 - 当前适配的功能:支持拼写检查以及形态分析。 -- [LGPL-2.1/GPL-2.0 License](https://github.com/hunspell/hunspell/blob/master/COPYING.LESSER) ## 集成方式 diff --git a/thirdparty/hunspell/docs/hap_integrate.md b/thirdparty/hunspell/docs/hap_integrate.md index 737f132d052a5cb0c3cc6e844234425ccbdfce61..4bce5054229d97c6e81ccfeb2f5f8f13148d0611 100644 --- a/thirdparty/hunspell/docs/hap_integrate.md +++ b/thirdparty/hunspell/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将hunspell拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/hunspell tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh hunspell ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell hunspell/arm64-v8a hunspell/armeabi-v7a @@ -74,7 +67,7 @@ ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行make check-TEST -C ./tests 运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/jasper/README_zh.md b/thirdparty/jasper/README_zh.md index 25cdfc5a2b27233c9fb18c72e8e15e6258b07365..5e00a8e6e69b385182be7d7d28d545af253c81a7 100755 --- a/thirdparty/jasper/README_zh.md +++ b/thirdparty/jasper/README_zh.md @@ -6,11 +6,10 @@ JasPer是一个用于图像编码和操作的软件集合. ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:4.0.0 - 当前适配的功能:支持图像编码和读写操作。 -- [jasper license files](https://github.com/jasper-software/jasper/blob/master/LICENSE.txt) ## 集成方式 diff --git a/thirdparty/jasper/docs/hap_integrate.md b/thirdparty/jasper/docs/hap_integrate.md index 8d6596cc80b2e86d55184a276cc892de0deba70b..0543265d8a29f736ed303397a3e8a0fc5c8df83a 100755 --- a/thirdparty/jasper/docs/hap_integrate.md +++ b/thirdparty/jasper/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,28 +30,18 @@ ├── README_zh.md ``` -- 将jasper拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - jasper编译依赖了`libjpeg-turbo`,因此编译时需要同时[编译`libjpeg-turbo`](../../libjpeg-turbo) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tpc_c_cplusplus - cp thirdparty/jasper tools/main -rf ## 拷贝jasper三方库 - cp thirdparty/libjpeg-turbo tools/main -rf ## 拷贝jasper依赖库libjpeg-turbo - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - - ```shell - cd tools + cd lycium ./build.sh jasper libjpeg-turbo ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell jasper/arm64-v8a jasper/armeabi-v7a libjpeg-turbo/arm64-v8a libjpeg-turbo/armeabi-v7a @@ -61,32 +51,23 @@ ## 应用中使用三方库 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示:  ![thirdparty_install_dir](pic/jasper_install_dir.png) -- 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,因此需要将对应的动态库拷贝到`\\entry\libs\${OHOS_ARCH}\`目录。 - -  ![thirdparty_so_install_dir](pic/jasper_so_install_dir.png) - - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ```shell # 将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libjasper.so.7) + target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libjasper.so) # 将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/jasper/${OHOS_ARCH}/include) - # 将三方库的依赖库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libjpeg.so.62) - # 将三方库的依赖库头文件加入工程中 - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libjpeg-turbo/${OHOS_ARCH}/include) ``` - - ![jasper_usage](pic/jasper_usage.png) + ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/jasper/docs/pic/jasper_install_dir.png b/thirdparty/jasper/docs/pic/jasper_install_dir.png index cefab25c930e35f00ffc63299d91cc29fdbb2603..b1392b0659874978af734afdf2acee1f1074752d 100755 Binary files a/thirdparty/jasper/docs/pic/jasper_install_dir.png and b/thirdparty/jasper/docs/pic/jasper_install_dir.png differ diff --git a/thirdparty/jbig2dec/README_zh.md b/thirdparty/jbig2dec/README_zh.md index 930ffff85e7f61d59b8893e3efabf452bc2cc9d8..6799806e8aa183d58cbbfd692960f283db47d987 100644 --- a/thirdparty/jbig2dec/README_zh.md +++ b/thirdparty/jbig2dec/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 jbig2dec是JBIG2图像压缩格式的解码器实现。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:0.19 - 当前适配的功能:JBIG2图像压缩格式的解码 -- [AGPLv3](https://jbig2dec.com/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/jbig2dec/docs/hap_integrate.md b/thirdparty/jbig2dec/docs/hap_integrate.md index 0eb1b9b5b358329723bdac0498b08a965597b420..9f1b3a92c8a8221cc43f9c2692c03eb96427754b 100644 --- a/thirdparty/jbig2dec/docs/hap_integrate.md +++ b/thirdparty/jbig2dec/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/jbig2dec #三方库jbig2dec的目录结构如下 @@ -22,19 +23,16 @@ ├── README_zh.md ``` -- 将jbig2dec拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/jbig2dec tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh jbig2dec ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` jbig2dec/arm64-v8a jbig2dec/armeabi-v7a ``` @@ -52,9 +50,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/jbig2dec/${OHOS_ARCH}/include) ``` - ![jbig2dec_usage](pic/jbig2dec_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行make check运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) 备注:由于ohos不支持python,因此涉及到python的用例无法通过 diff --git a/thirdparty/jbig2enc/README_zh.md b/thirdparty/jbig2enc/README_zh.md index e3938fed0706bc759833e35492bb92430ba75cb3..2135b7af0c7f52d8eaf2ff4de0d4839e29d6699d 100755 --- a/thirdparty/jbig2enc/README_zh.md +++ b/thirdparty/jbig2enc/README_zh.md @@ -9,7 +9,6 @@ jbig2enc是 JBIG2文件的编码器。 - ROM版本:OpenHarmony3.2 beta1 - 三方库版本:0.29 - 当前适配的功能:[JBIG2](https://github.com/agl/jbig2enc/blob/0.29/fcd14492.pdf) 文件编码, 图片格式转换 -- License:[Apache License](https://github.com/agl/jbig2enc/blob/0.29/COPYING) ## 集成方式 diff --git a/thirdparty/jbigkit/README_zh.md b/thirdparty/jbigkit/README_zh.md index d3c4893352a78384d7edcbd643aedc53c36857ae..f27e9c9ed5bbaf183dff6dd12be71a1a7b67c950 100644 --- a/thirdparty/jbigkit/README_zh.md +++ b/thirdparty/jbigkit/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 JBIG-KIT是JBIG1数据压缩标准(ITU-T T.82)的软件实现,该标准是为扫描文档等双层图像数据设计的。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v2.5.0 - 当前适配的功能:支持数据压缩标准的软件实现 -- [GNU General Public License](https://www.cl.cam.ac.uk/~mgk25/jbigkit/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/jbigkit/docs/hap_integrate.md b/thirdparty/jbigkit/docs/hap_integrate.md index fd4da39edc978ac8c45c02af469893227870dd76..984ab5a23cfe49e00c2a765a229c7a053fdd72e4 100644 --- a/thirdparty/jbigkit/docs/hap_integrate.md +++ b/thirdparty/jbigkit/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/jbigkit #三方库jbigkit的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将jbigkit拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/jbigkit tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh jbigkit ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` jbigkit/arm64-v8a jbigkit/armeabi-v7a @@ -55,9 +52,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/jbigkit/${OHOS_ARCH}/include) ``` - ![jbigkit_usage](pic/jbigkit_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/jpeg/README_zh.md b/thirdparty/jpeg/README_zh.md index 17967f1a49e718f7f220916ade599daefb3a6ff5..e31aaeb00c887b9ad4dcfa19ef400c2940940b0f 100644 --- a/thirdparty/jpeg/README_zh.md +++ b/thirdparty/jpeg/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 jpeg是JPEG图像压缩免费库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v9e - 当前适配的功能:支持JPEG图像压缩 -- [Libjpeg License](https://jpegclub.org/reference/libjpeg-license) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/jpeg/docs/hap_integrate.md b/thirdparty/jpeg/docs/hap_integrate.md index 2580682dedfd9098c17cb982c230024cd69d14b7..d1e397e4c0fd45de994d101f54c44f8dc80815c9 100644 --- a/thirdparty/jpeg/docs/hap_integrate.md +++ b/thirdparty/jpeg/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将jpeg拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/jpeg tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh jpeg ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell jpeg/arm64-v8a jpeg/armeabi-v7a @@ -61,7 +54,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示   - ![thirdparty_install_dir](pic/jpeg_install_dir.png) +  ![thirdparty_install_dir](pic/jpeg_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -76,7 +69,7 @@ ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行make check-local命令(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/json-c/README_zh.md b/thirdparty/json-c/README_zh.md index e066885e1e8f0bc20b96aaa939be4bfd2414726c..1f8b5290858edc01a20bcb68544975192bd4052d 100644 --- a/thirdparty/json-c/README_zh.md +++ b/thirdparty/json-c/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 json-c是json数据解析库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:0.16-20220414 - 当前适配的功能:支持json数据解析 -- [MIT license](https://github.com/json-c/json-c/blob/master/COPYING) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/json-c/docs/hap_integrate.md b/thirdparty/json-c/docs/hap_integrate.md index c30c4a089fd18e0509b7fe528026c6889d48730b..bd93663169a5a82a107d9e11202f830e1b96840f 100644 --- a/thirdparty/json-c/docs/hap_integrate.md +++ b/thirdparty/json-c/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将json-c拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/json-c tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh json-c ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell json-c/arm64-v8a json-c/armeabi-v7a @@ -59,7 +52,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示   - ![thirdparty_install_dir](pic/json-c_install_dir.png) +  ![thirdparty_install_dir](pic/json-c_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -70,7 +63,6 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/json-c/${OHOS_ARCH}/include) ``` - ![json-c_usage](pic/json-c_usage.png) ## 参考资料 diff --git a/thirdparty/json-schema-validator/README_zh.md b/thirdparty/json-schema-validator/README_zh.md index 3b940654868ed78f5886bca1f68d6eac240883c2..50fff311039c8b3fc925aea9b27eb202c49019bf 100644 --- a/thirdparty/json-schema-validator/README_zh.md +++ b/thirdparty/json-schema-validator/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 json-schema-validator用于验证基于JSON Schema的JSON文档。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:2.2.0 - 当前适配的功能:验证JSON Schema的JSON文档 -- [MIT](https://github.com/pboettch/json-schema-validator) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/json-schema-validator/docs/hap_integrate.md b/thirdparty/json-schema-validator/docs/hap_integrate.md index 2414b847288feee025b2ec806ee753f0866b9152..624ccc77c53d2d44c60098ba278cc0234844a0b7 100644 --- a/thirdparty/json-schema-validator/docs/hap_integrate.md +++ b/thirdparty/json-schema-validator/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/json-schema-validator #三方库json-schema-validator的目录结构如下 @@ -23,20 +24,15 @@ ├── README_zh.md ``` -- 将json-schema-validator拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/json-schema-validator tools/main -rf - cp thirdparty/json tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh json json-schema-validator ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` json-schema-validator/arm64-v8a json-schema-validator/armeabi-v7a json/arm64-v8a json/armeabi-v7a @@ -48,17 +44,15 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 备注:这里要拷贝json库生成的include的文件到thirdparty/json-schema-validator/include目录下。 - ![thirdparty_install_dir](pic/json-schema-validator_install_dir.jpg) +  ![thirdparty_install_dir](pic/json-schema-validator_install_dir.jpg) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/json-schema-validator/${OHOS_ARCH}/lib/libnlohmann_json_schema_validator.a) - #将三方库的头文件加入工程中(由于改库没有静态库或动态库,直接引入源文件使用) target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/json-schema-validator/${OHOS_ARCH}/include) ``` - ![json-schema-validator_usage](pic/json-schema-validator_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)  ![json-schema-validator_test](pic/json-schema-validator_test.jpg) diff --git a/thirdparty/json/README_zh.md b/thirdparty/json/README_zh.md index 19e81568e587a1fb317aac2db6ab4df5d70b296f..b3bbc7304b21237adba9f49623bdb2397dd58b3f 100644 --- a/thirdparty/json/README_zh.md +++ b/thirdparty/json/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 json是一个C++的处理json数据解析的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v3.11.2 - 当前适配的功能:json数据解析 -- [MIT](https://github.com/nlohmann/json) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/json/docs/hap_integrate.md b/thirdparty/json/docs/hap_integrate.md index 54f0d7daf89264e4546eaa2ecead0a23019cfc20..88856c477ae14f61dfffdaf94676882cba6f15e3 100644 --- a/thirdparty/json/docs/hap_integrate.md +++ b/thirdparty/json/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/json #三方库json的目录结构如下 @@ -22,19 +23,16 @@ ├── README_zh.md ``` -- 将json拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/json tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh json ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` json/arm64-v8a json/armeabi-v7a ``` @@ -50,9 +48,8 @@ #将三方库的头文件加入工程中(由于改库没有静态库或动态库,直接引入源文件使用) target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/json/${OHOS_ARCH}/include) ``` - ![json_usage](pic/json_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 先在linux系统进入构建目录执行ctest执行测试用例:download_test_data  ![json_test](pic/json_test1.jpg) 然后进入板子到构建目录执行以下可执行文件运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/jsoncpp/README_zh.md b/thirdparty/jsoncpp/README_zh.md index 55c7a3bf620cd6a25bef6449da61ea6db5e67217..7c504b39c83c1e7b67c8e22040f1a1222cbb1ba5 100644 --- a/thirdparty/jsoncpp/README_zh.md +++ b/thirdparty/jsoncpp/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 jsoncpp是一个C++库,允许操作JSON值,包括对字符串的序列化和反序列化。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:1.9.5 - 当前适配的功能:提供JSON序列化和反序列化能力 -- [MIT License](https://github.com/open-source-parsers/jsoncpp/blob/master/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/jsoncpp/docs/hap_integrate.md b/thirdparty/jsoncpp/docs/hap_integrate.md index 4490e16b1beba6bb3f059423c22443d1c01a890a..f2650c5ca62de5df8a0e0320efd71553388c3de1 100644 --- a/thirdparty/jsoncpp/docs/hap_integrate.md +++ b/thirdparty/jsoncpp/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将jsoncpp拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/jsoncpp tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh jsoncpp ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell jsoncpp/arm64-v8a jsoncpp/armeabi-v7a @@ -61,7 +54,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示   - ![thirdparty_install_dir](pic/jsoncpp_install_dir.png) +  ![thirdparty_install_dir](pic/jsoncpp_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -72,7 +65,6 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/jsoncpp/${OHOS_ARCH}/include) ``` - ![jsoncpp_usage](pic/jsoncpp_usage.png) ## 测试三方库 diff --git a/thirdparty/kissfft/README_zh.md b/thirdparty/kissfft/README_zh.md index 234c8a90fec18dac20bd86112b17e6e1906172b1..af862aeefc9325aa5ef63beeb561a4568f3fc20e 100644 --- a/thirdparty/kissfft/README_zh.md +++ b/thirdparty/kissfft/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 kissfft是提供快速傅立叶变换算法能力的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.0.2 - 当前适配的功能:支持开源密码算法 -- [BSD-3-Clause](https://github.com/mborgerding/kissfft/blob/master/LICENSES/BSD-3-Clause) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/kissfft/docs/hap_integrate.md b/thirdparty/kissfft/docs/hap_integrate.md index 78dbbe7496e472bbb678a20db13de2c6c429691b..568e82c3304d073e6e46d1abac30f8df34336a6a 100644 --- a/thirdparty/kissfft/docs/hap_integrate.md +++ b/thirdparty/kissfft/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将kissfft拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/kissfft tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh kissfft ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell kissfft/arm64-v8a kissfft/armeabi-v7a @@ -61,7 +54,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示   - ![thirdparty_install_dir](pic/kissfft_install_dir.png) +  ![thirdparty_install_dir](pic/kissfft_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -72,13 +65,12 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/kissfft/${OHOS_ARCH}/include) ``` - ![kissfft_usage](pic/kissfft_usage.png) ## 测试三方库 三方库的测试使用原库自带的可执行文件来做测试 -进入到构建目录,再进入tools目录,执行./fftconv-float(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) +进入到构建目录,再进入lycium目录,执行./fftconv-float(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录)  ![kissfft_test](pic/kissfft_test.png) diff --git a/thirdparty/lame/HPKCHECK b/thirdparty/lame/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..050c25a806df35cb63132c1ec36b7e35da7ba0c9 --- /dev/null +++ b/thirdparty/lame/HPKCHECK @@ -0,0 +1,15 @@ +# Contributor: xucaiming <719260170@qq.com> +# Maintainer: xucaiming <719260170@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir/$ARCH-build + make test > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} diff --git a/thirdparty/lame/README_zh.md b/thirdparty/lame/README_zh.md index 324aae2ba44a4cca8b3becce291f8ef400ae23f6..265314f0b6c1cbb9d669beeda4004206a4027dc5 100644 --- a/thirdparty/lame/README_zh.md +++ b/thirdparty/lame/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 lame是非常优秀的一种MP3编码器。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:3.100 - 当前适配的功能:MP3编码器 -- [LGPLv2/GPLv2 license](https://sourceforge.net/projects/lame/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/lame/docs/hap_integrate.md b/thirdparty/lame/docs/hap_integrate.md index ddcdb6f2e54282eab613436b473909ade2ad0d90..3ae2eeb4eeaa0e728a4db66534f50ac7657f1020 100644 --- a/thirdparty/lame/docs/hap_integrate.md +++ b/thirdparty/lame/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,29 +30,23 @@ ├── README_zh.md ``` -- 将lame拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/lame tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh lame ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库和头文件 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库和头文件 ```shell lame/arm64-v8a lame/armeabi-v7a ``` + - [测试三方库](#测试三方库) ## 应用中使用三方库 @@ -60,7 +54,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示   - ![thirdparty_install_dir](pic/lame_install_dir.png) +  ![thirdparty_install_dir](pic/lame_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -75,7 +69,7 @@ ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行如下命令make test(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/lcms2/README_zh.md b/thirdparty/lcms2/README_zh.md index ffa0c7114e7447984c7d19b78c041614da820edb..55deab5329a936b697601213c9ff9c0a527011d3 100644 --- a/thirdparty/lcms2/README_zh.md +++ b/thirdparty/lcms2/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 Little cms is a color management library. Implements fast transforms between ICC profiles. It is focused on speed, and is portable across several platforms. ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:2.15 - 当前适配的功能:颜色管理 -- [ MIT license](https://sourceforge.net/projects/lcms) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/lcms2/docs/hap_integrate.md b/thirdparty/lcms2/docs/hap_integrate.md index a6ecfae18c6adc4b78f29214667678b5b19ace50..d4d463609f2192c0aadba058ebf9b129016c7723 100755 --- a/thirdparty/lcms2/docs/hap_integrate.md +++ b/thirdparty/lcms2/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/lcms2 #三方库lcms2的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将lcms2拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/lcms2 tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh lcms2 ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` lcms2/arm64-v8a lcms2/armeabi-v7a @@ -54,11 +51,11 @@ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/liblcms2.so.2) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/include/lcms2/${OHOS_ARCH}) - + ``` ![lcms2_usage](pic/lcms2_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/leptonica/README_zh.md b/thirdparty/leptonica/README_zh.md index a7524906d6060c6001ef6c879b26c7a625586dd8..3acb3d25e4682f303d4ec494286cc4e3c0688515 100644 --- a/thirdparty/leptonica/README_zh.md +++ b/thirdparty/leptonica/README_zh.md @@ -7,11 +7,10 @@ Leptonica是一个开放源码的C语言库,它被广泛地运用于图像处 ## 使用约束 - ROM版本:OpenHarmony3.2 Beta1 -- IDE版本:DevEco Studio 3.1 Release(3.1.0.500) -- SDK:API9 Release(3.2.12.2) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:1.83.1 - 当前适配的功能:已验证扫描的图片“去污”、“提色”功能和图片转pdf功能等 -- [License : leptonica-license](http://www.leptonica.org/source/README.html) ## 集成方式 diff --git a/thirdparty/leptonica/docs/hap_integrate.md b/thirdparty/leptonica/docs/hap_integrate.md index d2676809958897f19a31583b26c7095afbda020d..f63dbe6862e2691146abb7995708a7a6e4c75104 100644 --- a/thirdparty/leptonica/docs/hap_integrate.md +++ b/thirdparty/leptonica/docs/hap_integrate.md @@ -2,17 +2,18 @@ 本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 ## 开发环境 - ubuntu20.04 -- [OpenHarmony3.2.1Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2.1%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.12.5](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2.1%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/16/v3/YO_7mAQNTbS8jekrvez5IA/devecostudio-windows-3.1.0.500.zip?HW-CC-KV=V1&HW-CC-Date=20230512T073650Z&HW-CC-Expire=315360000&HW-CC-Sign=90814E421B9A6D8DB4757FAFC21A965CF890A387DF9A2633B4AB797AD77E6485) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/leptonica #三方库leptonica的目录结构如下 @@ -26,30 +27,16 @@ ├── README_zh.md ``` -- 将leptonica拷贝和依赖的库拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/leptonica tools/main -rf - cp thirdparty/zlib tools/main -rf - cp thirdparty/libpng tools/main -rf - cp thirdparty/libjpeg-turbo tools/main -rf - cp thirdparty/libwebp tools/main -rf - cp thirdparty/tiff tools/main -rf - cp thirdparty/giflib tools/main -rf - cp thirdparty/openjpeg tools/main -rf - cp thirdparty/xz tools/main -rf - cp thirdparty/zstd tools/main -rf - cp thirdparty/libdeflate tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh leptonica zlib libpng libjpeg-turbo libwebp tiff giflib openjpeg zstd xz libdeflate ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` leptonica/arm64-v8a leptonica/armeabi-v7a zlib/arm64-v8a zlib/armeabi-v7a @@ -63,45 +50,17 @@ - [测试三方库](#测试三方库) ## 应用中使用三方库 -- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: - 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 - ![leptonica_install](pic/leptonica_install.png) +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示: +  ![leptonica_install](pic/leptonica_install.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` - #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libdeflate.so.0) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libleptonica.so.6.0.0) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libsharpyuv.so.0) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libz.so.1) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libjpeg.so.62) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/liblzma.so.5) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libtiff.so.6) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libzstd.so.1) target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libleptonica.so) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libopenjp2.so.7) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libwebp.so.7) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libleptonica.so.6) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libpng16.so.16) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libwebpmux.so.3) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/leptonica/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libjpeg-turbo/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libwebp/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/giflib/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openjpeg/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tiff/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zstd/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/xz/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libdeflate/${OHOS_ARCH}/include) - ``` - ![leptonica_usage](pic/leptonica_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行 make -C prog check-TESTS 运行测试用例,如下截图(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/leptonica/docs/pic/leptonica_install.png b/thirdparty/leptonica/docs/pic/leptonica_install.png index e306c013653e2a3130e56d999bcc66a526192bee..385fa08d3da38b5081760b1444dfd56b0903839a 100644 Binary files a/thirdparty/leptonica/docs/pic/leptonica_install.png and b/thirdparty/leptonica/docs/pic/leptonica_install.png differ diff --git a/thirdparty/libarchive/HPKCHECK b/thirdparty/libarchive/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..c74d01e639ae8609b545d47f34523dc53c095a76 --- /dev/null +++ b/thirdparty/libarchive/HPKCHECK @@ -0,0 +1,20 @@ +# Contributor: liucheng <1596268623@qq.com> +# Maintainer: liucheng <1596268623@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + ctest > $logfile 2>&1 + res=$? + if [ $res -ne 0 ] + then + mkdir ${LYCIUM_FAULT_PATH}/${pkgname} + cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/ + fi + cd $OLDPWD + + return $res +} diff --git a/thirdparty/libarchive/README_zh.md b/thirdparty/libarchive/README_zh.md index 198dc7fe3ca12142aca9e8ca141b88ffecaa0df8..880141de947b04fc2a21026baa9b4a601b4bfc5a 100644 --- a/thirdparty/libarchive/README_zh.md +++ b/thirdparty/libarchive/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 libarchive项目开发了一种便携式,高效的C库,可以以各种格式读取和编写流库。它还包括使用libarchive库的常见功能包括,tar,cpio 和 zcat 命令行工具的实现。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 4.0.3.6 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v3.6.2 - libarchive项目开发了一种便携式,高效的C库,可以以各种格式读取和编写流库 -- [GNU Library General Public License](https://github.com/libarchive/libarchive/blob/master/COPYING) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libarchive/docs/hap_integrate.md b/thirdparty/libarchive/docs/hap_integrate.md index 854f1851e5bec7dc3a079e267815bb57fa5ac0fb..328f8dc31e48ae53fbb1855407b31c6c580f3b5a 100644 --- a/thirdparty/libarchive/docs/hap_integrate.md +++ b/thirdparty/libarchive/docs/hap_integrate.md @@ -5,15 +5,16 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) -- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libarchive #三方库的目录结构如下 @@ -24,19 +25,16 @@ ├── README_zh.md ``` -- 将三方库拷贝至tools/main目录下 - ```shell - cd tpc_c_cplusplus - cp thirdparty/libarchive tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh libarchive ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libarchive/arm64-v8a libarchive/armeabi-v7a diff --git a/thirdparty/libass/README_zh.md b/thirdparty/libass/README_zh.md index 5657e639632ed59be1a7ed8e3c9faab799fcec74..dadaeca68de337090dac9682bb86b26594e4d80b 100644 --- a/thirdparty/libass/README_zh.md +++ b/thirdparty/libass/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 libass库则是一个轻量级的对ASS/SSA格式字幕进行渲染的开源库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:0.17.1 - 当前适配的功能:支持ASS/SSA格式字幕进行渲染 -- [ISC License](https://github.com/libass/libass/blob/master/COPYING) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libass/docs/hap_integrate.md b/thirdparty/libass/docs/hap_integrate.md index 9b8cf0025de514a889dd17466c2ba2a29936dcff..a2da972cc706fbe49b3ea44fbe833ea6487d758f 100644 --- a/thirdparty/libass/docs/hap_integrate.md +++ b/thirdparty/libass/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将libass拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ``` - cd tpc_c_cplusplus - cp thirdparty/libass tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh libass ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libass/arm64-v8a libass/armeabi-v7a @@ -58,29 +51,18 @@ ## 应用中使用三方库 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示: +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示:  ![thirdparty_install_dir](pic/libass_install_dir.png) -- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: - - 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录: - -  ![thirdparty_install_dir](pic/libass_install_dir2.png) - - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句: ``` #将三方库加入工程中,libass是对应的三方库名 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/fribidi/${OHOS_ARCH}/lib/libfribidi.so.0) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/harfbuzz/${OHOS_ARCH}/lib/libharfbuzz.so.0) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libass/${OHOS_ARCH}/lib/libass.so.9) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libass/${OHOS_ARCH}/lib/libass.so) #将三方库的头文件加入工程中,libass是对应的三方库名 - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/fribidi/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/harfbuzz/${OHOS_ARCH}/include) target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libass/${OHOS_ARCH}/include) ``` - ![libass_usage](pic/libass_usage.png) ## 测试三方库 diff --git a/thirdparty/libass/docs/pic/libass_install_dir.png b/thirdparty/libass/docs/pic/libass_install_dir.png index d2054fc4a655b7ce4458a7bee7dac95038a3bfe1..7d0d8749f5232286d044b57dfbb1650a50509c3e 100644 Binary files a/thirdparty/libass/docs/pic/libass_install_dir.png and b/thirdparty/libass/docs/pic/libass_install_dir.png differ diff --git a/thirdparty/libdash/README_zh.md b/thirdparty/libdash/README_zh.md index 6e6f775e36cb87f493b08a53143612848e08de66..0929572eb65ecb1e77db6eae952cf9a4ade2524a 100644 --- a/thirdparty/libdash/README_zh.md +++ b/thirdparty/libdash/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 libdash是ISO/IEC MPEG-DASH标准的官方参考软件,为Bitmovin开发的MPEG-DASH提供面向对象(OO)接口。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v2.2 - 当前适配的功能:支持MPEG-DASH编码 -- [LGPLv2.1](https://github.com/bitmovin/libdash) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libdash/docs/hap_integrate.md b/thirdparty/libdash/docs/hap_integrate.md index 366cf03f536274351b83aa843cbdfce5f3619e02..453f081f8fd5a41dc181ff6b5320912e1edce908 100644 --- a/thirdparty/libdash/docs/hap_integrate.md +++ b/thirdparty/libdash/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libdash #三方库libdash的目录结构如下 @@ -23,28 +24,15 @@ ├── README_zh.md ``` -- 将libdash拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libdash tools/main -rf - cp thirdparty/libxml2 tools/main -rf - cp thirdparty/curl tools/main -rf - cp thirdparty/openssl tools/main -rf - cp thirdparty/zstd tools/main -rf - cp thirdparty/nghttp2 tools/main -rf - cp thirdparty/CUnit tools/main -rf - cp thirdparty/xz tools/main -rf - cp thirdparty/openssl_quic tools/main -rf - cp thirdparty/nghttp3 tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh CUnit openssl_quic nghttp3 openssl zstd nghttp2 xz libxml2 curl libdash ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libdash/arm64-v8a libdash/armeabi-v7a libxml2/arm64-v8a libxml2/armeabi-v7a @@ -62,34 +50,19 @@ ## 应用中使用三方库 -- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: - 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录 +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示:  ![thirdparty_install_dir](pic/libdash_install_dir_1.jpg) -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 -  ![thirdparty_install_dir](pic/libdash_install_dir_2.jpg) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libdash.so) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libcurl.so) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libcrypto.so.1.1) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libnghttp2.so.14) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libssl.so.1.1) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libxml2.so.2) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libzstd.so.1) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libdash/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/curl/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libxml2/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/nghttp2/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zstd/${OHOS_ARCH}/include) ``` - ![libdash_usage](pic/libdash_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的libdash_networkpart_test可执行文件准备好(注意:需要联网) @@ -106,7 +79,7 @@ hdc_std file send libssl.so.1.1 /system/lib64 hdc_std file send libxml2.so.2 /system/lib64 hdc_std file send libzstd.so.1 /system/lib64 - + hdc_std shell #进入开发板 chmod 777 libdash_networkpart_test #添加权限 ./libdash_networkpart_test #执行测试用例 diff --git a/thirdparty/libdash/docs/pic/libdash_install_dir_1.jpg b/thirdparty/libdash/docs/pic/libdash_install_dir_1.jpg index 14b0a64e4f2e4d397a89a57ae05f1d4bf82ce329..38de430eb9f71d7d57e5d7c7f1e9a1c253736b2b 100644 Binary files a/thirdparty/libdash/docs/pic/libdash_install_dir_1.jpg and b/thirdparty/libdash/docs/pic/libdash_install_dir_1.jpg differ diff --git a/thirdparty/libexpat/README_zh.md b/thirdparty/libexpat/README_zh.md index 38452fea555ed2b121ab68bf8fa127adb99d01dd..c244c06ddbe882c9883261d43e344cc84aa2c017 100644 --- a/thirdparty/libexpat/README_zh.md +++ b/thirdparty/libexpat/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 libexpat是一个用于解析XML 1.0的C99库,面向流的XML解析器。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:R_2_5_0 - 当前适配的功能:解析XML -- [MIT](https://github.com/libexpat/libexpat) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libexpat/docs/hap_integrate.md b/thirdparty/libexpat/docs/hap_integrate.md index 6607f34c61e4a24c7d3a187b4354082eb44ce52b..909466180d786ac23f250f61ed3baa6747f58763 100644 --- a/thirdparty/libexpat/docs/hap_integrate.md +++ b/thirdparty/libexpat/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libexpat #三方库libexpat的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将libexpat拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libexpat tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh libexpat ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libexpat/arm64-v8a libexpat/armeabi-v7a ``` @@ -43,22 +40,18 @@ ## 应用中使用三方库 -- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: - 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 - -  ![thirdparty_install_dir](pic/libexpat_install_dir.jpg) +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示: +  ![thirdparty_install_dir](pic/libexpat_install_dir.jpg) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libexpat.so.1) + target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libexpat.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libexpat/${OHOS_ARCH}/include) ``` - ![libexpat_usage](pic/libexpat_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/libexpat/docs/pic/libexpat_install_dir.jpg b/thirdparty/libexpat/docs/pic/libexpat_install_dir.jpg index 8d7d75458fd43e6861a22a61501d38475c7dda49..976056ce9db5019303c867d6859ab2a3e9f732f1 100644 Binary files a/thirdparty/libexpat/docs/pic/libexpat_install_dir.jpg and b/thirdparty/libexpat/docs/pic/libexpat_install_dir.jpg differ diff --git a/thirdparty/libheif/README_zh.md b/thirdparty/libheif/README_zh.md index f30ae7f241281c8f0d7c3f40a77f60b0f4676f38..afaf33b67ed8cbe3ff99285dbf069b90a5f75e66 100644 --- a/thirdparty/libheif/README_zh.md +++ b/thirdparty/libheif/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 libheif是HEIF和AVIF文件格式编解码三方库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.15.2 - 当前适配的功能:支持HEIF和AVIF文件格式编解码 -- [GNU LESSER GENERAL PUBLIC LICENSE](https://github.com/strukturag/libheif/blob/master/COPYING) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libheif/docs/hap_integrate.md b/thirdparty/libheif/docs/hap_integrate.md index 02ce503d84d15fedc5aaa9ce3b6e7f6958421f8f..d514982abf41ce665cc14b628de6fc4b99f5baeb 100644 --- a/thirdparty/libheif/docs/hap_integrate.md +++ b/thirdparty/libheif/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将libheif拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/libheif tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh libheif ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell libheif/arm64-v8a libheif/armeabi-v7a @@ -61,7 +54,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示   - ![thirdparty_install_dir](pic/libheif_install_dir.png) +  ![thirdparty_install_dir](pic/libheif_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -72,11 +65,10 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libheif/${OHOS_ARCH}/include) ``` - ![libheif_usage](pic/libheif_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行 ``` diff --git a/thirdparty/libjpeg-turbo/README_zh.md b/thirdparty/libjpeg-turbo/README_zh.md index d9d73c78f594e3c1fb8805d2cd411b5c7fee1f68..fdfcd5a46ca482dfeafbbcb2f60dc24cdaa212a0 100755 --- a/thirdparty/libjpeg-turbo/README_zh.md +++ b/thirdparty/libjpeg-turbo/README_zh.md @@ -6,11 +6,10 @@ libjpeg-turbo是一种JPEG图像编解码器,它使用SIMD指令来加速基 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:2.1.91 - 当前适配的功能:支持JPEG图像编解码。 -- [IJG(Independent JPEG Group) License/3-clause BSD License/zlib License](https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/LICENSE.md) ## 集成方式 diff --git a/thirdparty/libjpeg-turbo/docs/hap_integrate.md b/thirdparty/libjpeg-turbo/docs/hap_integrate.md index d563a45be22776cf591e725f6e5c78e969bea39f..4a121ebc7600db81668787a349791166702be820 100755 --- a/thirdparty/libjpeg-turbo/docs/hap_integrate.md +++ b/thirdparty/libjpeg-turbo/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将libjpeg-turbo拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/libjpeg-turbo tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh libjpeg-turbo ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell libjpeg-turbo/arm64-v8a libjpeg-turbo/armeabi-v7a @@ -77,7 +70,7 @@ ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行`ctest`运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/liblinear/HPKBUILD b/thirdparty/liblinear/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..7203f761acf3fd9171fb8bfb210999e91148b4a1 --- /dev/null +++ b/thirdparty/liblinear/HPKBUILD @@ -0,0 +1,64 @@ +# Contributor: 城meto +# Maintainer: 城meto + +pkgname=liblinear +pkgver=v246 +pkgrel=0 +pkgdesc="LIBLINEAR is a simple package for solving large-scale regularized linear classification, regression and outlier detection." +url="https://www.csie.ntu.edu.tw" +archs=("armeabi-v7a" "arm64-v8a") +license=("BSD-3-Clause") +depends=() +makedepends=() +source="https://codeload.github.com/cjlin1/$pkgname/tar.gz/refs/tags/$pkgver" +buildtools="make" + +autounpack=true +downloadpackage=true + +builddir=$pkgname-${pkgver:1} +packagename=$pkgname-$pkgver.tar.gz + +source envset.sh + +prepare() { + cp -rf $builddir $builddir-$ARCH-build/ + if [ $ARCH == "armeabi-v7a" ];then + setarm32ENV + elif [ $ARCH == "arm64-v8a" ];then + setarm64ENV + else + echo "$ARCH not support" + return -1 + fi +} + +build() { + make -j4 -C $builddir-$ARCH-build VERBOSE=1 >> $builddir-$ARCH-build/build.log 2>&1 + ret=$? + return $ret +} + +package() { + # Makefile 没有提供install,只能copy + mkdir -p $LYCIUM_ROOT/usr/$pkgname/$ARCH/include + mkdir -p $LYCIUM_ROOT/usr/$pkgname/$ARCH/lib + mkdir -p $LYCIUM_ROOT/usr/$pkgname/$ARCH/bin + find $builddir-$ARCH-build -name '*.a' -exec cp -af {} $LYCIUM_ROOT/usr/$pkgname/$ARCH/lib/ \; + find ./$builddir-$ARCH-build -name '*.h' -exec cp -af {} $LYCIUM_ROOT/usr/$pkgname/$ARCH/include/ \; + cp -af $builddir-$ARCH-build/predict $LYCIUM_ROOT/usr/$pkgname/$ARCH/bin + cp -af $builddir-$ARCH-build/train $LYCIUM_ROOT/usr/$pkgname/$ARCH/bin +} + +check() { + echo "The test must be on an OpenHarmony device!" + # real test + # train heart_scale 生成heart_scale.model + # predict heart_scale.t heart_scale.model output 查看预测精度 +} + +# 清理环境 +cleanbuild(){ + rm -rf $builddir-armeabi-v7a-build $builddir-arm64-v8a-build + rm -rf $builddir # $packagename +} \ No newline at end of file diff --git a/thirdparty/liblinear/HPKCHECK b/thirdparty/liblinear/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..f7ec34bb1146cd20efc05bd30952ae6fbe2a452f --- /dev/null +++ b/thirdparty/liblinear/HPKCHECK @@ -0,0 +1,59 @@ +# Contributor: 城meto +# Maintainer: 城meto + +source HPKBUILD > /dev/null 2>&1 # 导入HPKBUILD文件 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log +total_count=0 +uint_count=0 # 用于统计测试用例成功执行个数 + +uint_test() { + ret=0 + cd ${builddir}-${ARCH}-build + ((total_count++)) + # 测试步骤,执行训练、预期结果 + echo "---------------------- Test $total_count: type$1 -- $2 ----------------------" >> ${logfile} 2>&1 + ./train -s $1 heart_scale >> ${logfile} 2>&1 + cp heart_scale heart_scale.t + ./predict heart_scale.t heart_scale.model output >> ${logfile} 2>&1 + ret=$? + + # 清空还原 + rm heart_scale.t + rm heart_scale.model + + # 输出结果 + if [ $ret -ne 0 ];then + echo "---------------------- FAIL ----------------------" >> ${logfile} 2>&1 + else + echo "---------------------- SUCCESS ----------------------" >> ${logfile} 2>&1 + ((uint_count++)) + fi + cd $OLDPWD + return $ret +} + +# 在OH环境执行测试的接口 +openharmonycheck() { + uint_count=0 + + echo "Unit Test Begin: " > ${logfile} 2>&1 + uint_test 0 "L2-regularized logistic regression (primal)" + uint_test 1 "L2-regularized L2-loss support vector classification (dual)" + uint_test 2 "L2-regularized L2-loss support vector classification (primal)" + uint_test 3 "L2-regularized L1-loss support vector classification (dual)" + uint_test 4 "support vector classification by Crammer and Singer" + uint_test 5 "L1-regularized L2-loss support vector classification" + uint_test 6 "L1-regularized logistic regression" + uint_test 7 "L2-regularized logistic regression (dual)" + uint_test 11 "L2-regularized L2-loss support vector regression (primal)" + uint_test 12 "L2-regularized L2-loss support vector regression (dual)" + uint_test 13 "L2-regularized L1-loss support vector regression (dual)" + uint_test 21 "one-class support vector machine (dual)" + + echo "Unit Test End: Success $uint_count, Total: $total_count" >> ${logfile} 2>&1 + if [ $uint_count -ne 12 ];then + return -1 + else + return 0 + fi +} diff --git a/thirdparty/liblinear/LICENSE b/thirdparty/liblinear/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8197583736fa9df59afa1acbe553dcf6db5e3821 --- /dev/null +++ b/thirdparty/liblinear/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright {yyyy} {name of copyright owner} + +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/liblinear/OAT.xml b/thirdparty/liblinear/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..96937ea08644b79312d0ced7c0b3eb1e845108ee --- /dev/null +++ b/thirdparty/liblinear/OAT.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/thirdparty/liblinear/README.OpenSource b/thirdparty/liblinear/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..1440ddc82ed69c9858b9765fb1b05c42ee70d94b --- /dev/null +++ b/thirdparty/liblinear/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "liblinear", + "License": "BSD-3-Clause", + "License File": "COPYRIGHT", + "Version Number": "2.4.6", + "Owner": "myxuan475@126.com", + "Upstream URL": "https://codeload.github.com/cjlin1/liblinear/tar.gz/refs/tags/v246", + "Description": "LIBLINEAR is a simple package for solving large-scale regularized linear classification, regression and outlier detection." + } +] \ No newline at end of file diff --git a/thirdparty/liblinear/README_zh.md b/thirdparty/liblinear/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..1ee4d16f8724758cbf29013813a1c7223c1b1913 --- /dev/null +++ b/thirdparty/liblinear/README_zh.md @@ -0,0 +1,11 @@ +# liblinear三方库说明 +## 功能简介 +liblinear 是一个用于解决线性规划、回归算法和异常检测的库。 +## 使用约束 +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) +- 三方库版本:2.4.6 +- 当前适配的功能:提供线性规划、SVM、异常检测等。 + +## 集成方式 ++ [应用hap包集成](docs/hap_integrate.md) \ No newline at end of file diff --git a/thirdparty/liblinear/SHA512SUM b/thirdparty/liblinear/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..e620229519851d756680e82a6ba174495fcd736d --- /dev/null +++ b/thirdparty/liblinear/SHA512SUM @@ -0,0 +1 @@ +f75cad393477eff7d2ebbc0927be37fd48cd4b08f5cc4196b3605b4822d4dda5edd65a2c190034fa349bc359b4da0bc90b6e507f57e7842fd7a048f88278654f liblinear-v246.tar.gz diff --git a/thirdparty/liblinear/docs/hap_integrate.md b/thirdparty/liblinear/docs/hap_integrate.md new file mode 100755 index 0000000000000000000000000000000000000000..0fe3d44e8c01f0372d12723e678f0b6b3494e718 --- /dev/null +++ b/thirdparty/liblinear/docs/hap_integrate.md @@ -0,0 +1,88 @@ +# liblinear集成到应用hap + +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 + +## 开发环境 + +- ubuntu20.04 +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) +- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#ci环境准备) + +## 编译三方库 + +- 下载本仓库 + + ```shell + git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 + ``` + +- 三方库目录结构 + + ```shell + tpc_c_cplusplus/thirdparty/liblinear #三方库的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── SHA512SUM #三方库校验文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md + ``` + + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#编译环境准备) + +- 进入lycium 目录编译 + + 本仓库没有依赖库,可直接编译。 + ```shell + cd lycium + ./build.sh liblinear + ``` + +- 三方库头文件及生成的库 + + 在lycium目录下会生成usr目录,该目录下存在已编译完成64位三方库 + + ```shell + liblinear/arm64-v8a liblinear/armeabi-v7a + ``` +- [测试三方库](#测试三方库) + +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,动态库文件会自动拷贝到libs目录下打包,如下图所示: + + ![thirdparty_install_dir](pic/liblinear_js.png) + +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + + ```shell + #将三方库加入工程中 + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/liblinear/${OHOS_ARCH}/lib/blas.a) + + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/liblinear/${OHOS_ARCH}/include) + + #该库没有动态库,不需考虑打包问题 + ``` + 修改IDE的entry/build-profile.json5 文件,增加编译架构过滤:"abiFilters": ["arm64-v8a", "armeabi-v7a"], 如下图所示: + + ![liblinear_build](pic/liblinear_build.png) + + 然后,执行编译运行. + +## 测试三方库 + +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#ci环境准备) + +进入到构建目录,执行如下命令ctest(arm64-v8a-build为构建64位的目录, armeabi-v7a-build为构建32位的目录) + +![liblinear_test](pic/liblinear_test.png) + +## 参考资料 + +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md) diff --git a/thirdparty/liblinear/docs/pic/entry_libs.png b/thirdparty/liblinear/docs/pic/entry_libs.png new file mode 100755 index 0000000000000000000000000000000000000000..b752574b09cf39b5aee920ad601fedcc3c83152a Binary files /dev/null and b/thirdparty/liblinear/docs/pic/entry_libs.png differ diff --git a/thirdparty/liblinear/docs/pic/liblinear_build.png b/thirdparty/liblinear/docs/pic/liblinear_build.png new file mode 100755 index 0000000000000000000000000000000000000000..3a44fbf78c725c6d94bc99434b2eca64cf72b8a9 Binary files /dev/null and b/thirdparty/liblinear/docs/pic/liblinear_build.png differ diff --git a/thirdparty/liblinear/docs/pic/liblinear_js.png b/thirdparty/liblinear/docs/pic/liblinear_js.png new file mode 100755 index 0000000000000000000000000000000000000000..a1ee99b249481ed574c94e018d7e9c75348a85ff Binary files /dev/null and b/thirdparty/liblinear/docs/pic/liblinear_js.png differ diff --git a/thirdparty/liblinear/docs/pic/liblinear_test.png b/thirdparty/liblinear/docs/pic/liblinear_test.png new file mode 100755 index 0000000000000000000000000000000000000000..d0cc8e8b86a7854bc02baf4d795be136843d66cc Binary files /dev/null and b/thirdparty/liblinear/docs/pic/liblinear_test.png differ diff --git a/thirdparty/libmp3lame/README_zh.md b/thirdparty/libmp3lame/README_zh.md index d7e5b102030134770691e054c0f80443f4e254bf..5a66ed4d847056452dc1b00513ceb9e1acc94f41 100644 --- a/thirdparty/libmp3lame/README_zh.md +++ b/thirdparty/libmp3lame/README_zh.md @@ -9,7 +9,6 @@ libmp3lame是开源mp3编码库,使用MPGLIB解码引擎,专门用于编码 - Rom版本:OpenHarmony3.2 beta1 - 三方库版本:v3.99.5 - 当前适配的功能:mp3文件编码 -- License:[LGPL](https://github.com/gypified/libmp3lame/blob/master/COPYING) ## 集成方式 diff --git a/thirdparty/libosip2/HPKBUILD b/thirdparty/libosip2/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..8fbadd2dd3c5ec677e57376ad96a891562f09cc0 --- /dev/null +++ b/thirdparty/libosip2/HPKBUILD @@ -0,0 +1,64 @@ +# Contributor: shann +# Maintainer: shann +pkgname=libosip2 +pkgver=5.3.1 +pkgrel=0 +pkgdesc="libosip2 is a C language library for parsing and processing the SIP protocol. It provides a powerful set of APIs used to implement SIP clients and servers." +url="https://ftp.gnu.org/gnu/osip/" +archs=("armeabi-v7a" "arm64-v8a") +license=("LGPL") +depends=() +makedepends=() + +source="https://ftp.gnu.org/gnu/osip/$pkgname-$pkgver.tar.gz" + +autounpack=true +downloadpackage=true +buildtools="configure" + +builddir=$pkgname-${pkgver} +packagename=$builddir.tar.gz + +source envset.sh +host= +prepare() { + mkdir -p $builddir/$ARCH-build + if [ $ARCH == "armeabi-v7a" ] + then + setarm32ENV + host=arm-linux + fi + if [ $ARCH == "arm64-v8a" ] + then + setarm64ENV + host=aarch64-linux + fi +} + +build() { + cd $builddir/$ARCH-build + ../configure "$@" --host=$host --enable-test > `pwd`/build.log 2>&1 + make -j4 VERBOSE=1 >> `pwd`/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir + make -C $ARCH-build install >> `pwd`/$ARCH-build/build.log 2>&1 + cd $OLDPWD +} + +check() { + cd $builddir/$ARCH-build + sed -i '/check: check-am/c\#check: check-am' src/test/Makefile + cd $OLDPWD + echo "The test must be on an OpenHarmony device!" + #编译生成目录$ARCH-build/src/test下执行make chech +} + +# 清理环境 +cleanbuild() { + rm -rf ${PWD}/$builddir #${PWD}/$packagename +} diff --git a/thirdparty/libosip2/HPKCHECK b/thirdparty/libosip2/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..c0632614d2f2ed70896594005894f3b780708320 --- /dev/null +++ b/thirdparty/libosip2/HPKCHECK @@ -0,0 +1,15 @@ +# Contributor: shann +# Maintainer: shann + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_ROOT}/../thirdparty/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir/$ARCH-build/src/test/ + make check > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} \ No newline at end of file diff --git a/thirdparty/libosip2/OAT.xml b/thirdparty/libosip2/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..90978a8a397427b9aa784690e96bba986a824e3f --- /dev/null +++ b/thirdparty/libosip2/OAT.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/libosip2/README.OpenSource b/thirdparty/libosip2/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..fdfcd0a90bc1b3b4e898e80679b37bd17bc33eca --- /dev/null +++ b/thirdparty/libosip2/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "libosip2", + "License": "LGPL", + "License File": "http://www.gnu.org", + "Version Number": "5.3.1", + "Owner": "swkec@isoftstone.com", + "Upstream URL": "https://ftp.gnu.org/gnu/osip/libosip2-5.3.1.tar.gz", + "Description": "libosip2 is a C language library for parsing and processing the SIP protocol. It provides a powerful set of APIs used to implement SIP clients and servers." + } +] diff --git a/thirdparty/libosip2/README_zh.md b/thirdparty/libosip2/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..bbe232cf1eb6c1cffda38a29ce5606487df44f38 --- /dev/null +++ b/thirdparty/libosip2/README_zh.md @@ -0,0 +1,11 @@ +# libosip2三方库说明 +## 功能简介 +libosip2是一个开放源代码的sip协议栈,是开源代码中不多使用C语言写的协议栈之一,它具有短小简洁的特点,专注于sip底层解析使得它的效率比较高. +## 使用约束 +- IDE版本:DevEco Studio 3.1 Beta2 +- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- 三方库版本:5.3.1 +- 当前适配的功能:支持sip消息的解析和生成、头处理和会话管理等功能 + +## 集成方式 ++ [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libosip2/SHA512SUM b/thirdparty/libosip2/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..1f9555d4fbe00cb98524e31306d5148bed536824 --- /dev/null +++ b/thirdparty/libosip2/SHA512SUM @@ -0,0 +1 @@ +cd9db7a736cca90c6862b84c4941ef025f5affab8af9bbc02ce0dd3310a2c555e0922c1bfa72d8ac08791fa1441bbcc30b627d52ca8b51f3471573a10ac82a00 libosip2-5.3.1.tar.gz diff --git a/thirdparty/libosip2/docs/hap_integrate.md b/thirdparty/libosip2/docs/hap_integrate.md new file mode 100644 index 0000000000000000000000000000000000000000..1d36668e14cf8d133ec454c89a455d8ee236c392 --- /dev/null +++ b/thirdparty/libosip2/docs/hap_integrate.md @@ -0,0 +1,78 @@ +# libosip2集成到应用hap +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 +## 开发环境 +- ubuntu20.04 +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) +- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) +- [准备三方库构建环境](../../../lycium/README.md#编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#ci环境准备) +## 编译三方库 +- 下载本仓库 + ``` + wget https://ftp.gnu.org/gnu/osip/libosip2-5.3.1.tar.gz + ``` +- 三方库目录结构 + ``` + tpc_c_cplusplus/thirdparty/libosip2 #三方库libosip2的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── SHA512SUM #三方库校验文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md + ``` + +- 将libosip2拷贝至lycium/main目录下(没有main目录就手动创建一下) + ``` + cd tpc_c_cplusplus + cp thirdparty/libosip2 lycium/main -rf + ``` +- 在lycium目录下编译三方库 + libosip2库不需要依赖其它库,所以在build时只需要编译libosip2库即可 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#编译环境准备) + ``` + cd lycium + ./build.sh libosip2 + ``` +- 三方库头文件及生成的库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + ``` + libosip2/arm64-v8a libosip2/armeabi-v7a + ``` + +- [测试三方库](#测试三方库) + +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 + + ![thirdparty_install_dir](pic/osip2_install_dir.jpg) + +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + ``` + #将三方库加入工程中 + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libosip2/${OHOS_ARCH}/lib/libosip2.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libosip2/${OHOS_ARCH}/lib/libosipparser2.a) + + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libosip2/${OHOS_ARCH}/include/osip2/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libosip2/${OHOS_ARCH}/include/osipparser2/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libosip2/${OHOS_ARCH}/include/osipparser2/headers) + ``` + + ![osip2_usage](pic/osip2_usage.jpg) + +## 测试三方库 +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#ci环境准备) + +- 将编译生成的可执行文件及生成的动态库准备好 + +- 将准备好的文件推送到开发板,进入到构建的目录$ARCH-build/src/test下执行make chech + + ![osip2_test](pic/osip2_test.jpg) + +## 参考资料 +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md) diff --git a/thirdparty/libosip2/docs/pic/osip2_install_dir.jpg b/thirdparty/libosip2/docs/pic/osip2_install_dir.jpg new file mode 100644 index 0000000000000000000000000000000000000000..707a6545460a8c6c46ade669289faaafd05fe853 Binary files /dev/null and b/thirdparty/libosip2/docs/pic/osip2_install_dir.jpg differ diff --git a/thirdparty/libosip2/docs/pic/osip2_test.jpg b/thirdparty/libosip2/docs/pic/osip2_test.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3dd182db0099797d3232c68555d76a9d01ed958f Binary files /dev/null and b/thirdparty/libosip2/docs/pic/osip2_test.jpg differ diff --git a/thirdparty/libosip2/docs/pic/osip2_usage.jpg b/thirdparty/libosip2/docs/pic/osip2_usage.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3b0f257c2df373352a5b0353e4645200e03545b3 Binary files /dev/null and b/thirdparty/libosip2/docs/pic/osip2_usage.jpg differ diff --git a/thirdparty/libpcap/README_zh.md b/thirdparty/libpcap/README_zh.md index bf0226016010855dd9ae108adef79a1bd1e16f7a..0e56e72b28734ae91e12cb91d469defc1a421590 100644 --- a/thirdparty/libpcap/README_zh.md +++ b/thirdparty/libpcap/README_zh.md @@ -3,11 +3,10 @@ libpcap是unix/linux平台下的网络数据包捕获函数包,大多数网络监控软件都以它为基础。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:libpcap-1.10.3 - 当前适配的功能:支持网络数据包捕获 -- [BSD](https://github.com/the-tcpdump-group/libpcap/blob/master/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libpcap/docs/hap_integrate.md b/thirdparty/libpcap/docs/hap_integrate.md index 5031fe3ad2d5420a949790ffd6e2847229b485ef..c66547ab19fa2f0e59c1a676a5e32634e7638390 100644 --- a/thirdparty/libpcap/docs/hap_integrate.md +++ b/thirdparty/libpcap/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libpcap #三方库libpcap的目录结构如下 @@ -22,19 +23,16 @@ ├── README_zh.md ``` -- 将libpcap拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libpcap tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh libpcap ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libpcap/arm64-v8a libpcap/armeabi-v7a @@ -54,9 +52,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpcap/${OHOS_ARCH}/include) ``` - ![tinyxpath_usage](pic/libpcap_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,再去testprogs目录执行./capturetest进行抓包测试(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录,下图是设备联网后应用请求网络数据的抓包测试截图) diff --git a/thirdparty/libpng/README_zh.md b/thirdparty/libpng/README_zh.md index 6ec1977412bce53db539f640d7dbb292e748f727..044aae0c1dc2c81377b33a8271ecca1dfffb5d9d 100644 --- a/thirdparty/libpng/README_zh.md +++ b/thirdparty/libpng/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 libpng是一款C语言编写的用来读写PNG文件的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:1.6.39 - 当前适配的功能:处理PNG文件的读写 -- [zlib/libpng License](https://sourceforge.net/projects/libpng/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libpng/docs/hap_integrate.md b/thirdparty/libpng/docs/hap_integrate.md index 4192e45ae238ffb59c3333d04355fc5457c9a0f2..5519ca6fb5645e5e02549a535ea92bde2db24acb 100644 --- a/thirdparty/libpng/docs/hap_integrate.md +++ b/thirdparty/libpng/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libpng #三方库WavPack的目录结构如下 @@ -22,23 +23,21 @@ ├── README_zh.md ``` -- 将libpng拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libpng tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh libpng ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + ``` libpng/arm64-v8a libpng/armeabi-v7a ``` - + - [测试三方库](#测试三方库) ## 应用中使用三方库 @@ -52,9 +51,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng/${OHOS_ARCH}/include) ``` - ![libpng_usage](pic/libpng_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行make check运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/libqrencode/README_zh.md b/thirdparty/libqrencode/README_zh.md index 9526be824462aaf58975e703bf02f2506cdaafdb..5a4b348ab18029a1a7c2b67d3f838182ec3dae14 100644 --- a/thirdparty/libqrencode/README_zh.md +++ b/thirdparty/libqrencode/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 Libqrencode是一个快速紧凑的库,用于将数据编码为二维码,二维码是一种二维符号,可以通过智能手机等方便的终端进行扫描。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v4.1.1 - 将数据编码为二维码 -- [ MIT license](https://github.com/fukuchi/libqrencode/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libqrencode/docs/hap_integrate.md b/thirdparty/libqrencode/docs/hap_integrate.md index d8a05a9621953eb4afdb828c8df076c0c37999d6..b8540db3e9bb800d4b534f4cd2006326c216ba92 100644 --- a/thirdparty/libqrencode/docs/hap_integrate.md +++ b/thirdparty/libqrencode/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libqrencode #三方库libqrencode的目录结构如下 @@ -22,20 +23,15 @@ ├── README_zh.md ``` -- 将libqrencode和libpng拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libqrencode tools/main -rf - cp thirdparty/libpng tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh libqrencode libpng ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libqrencode/arm64-v8a libqrencode/armeabi-v7a @@ -59,9 +55,8 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng/${OHOS_ARCH}/include/libpng16) ``` - ![jbigkit_usage](pic/libqrencode_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/libsrtp/README_zh.md b/thirdparty/libsrtp/README_zh.md index d6c48ca2957c93f18ebdaedfbe7dea9caaba4245..70c51dd1e48a1616814ad90d526ac248e6d48bec 100644 --- a/thirdparty/libsrtp/README_zh.md +++ b/thirdparty/libsrtp/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 libSRTP提供了保护RTP和RTCP的功能。RTP数据包可以进行加密和身份验证(使用srtp_protect()函数),将其转换为srtp数据包。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v2.5.0 - 当前适配的功能:支持加密的rtp数据包传输 -- [2001-2017 Cisco Systems, Inc](https://github.com/cisco/libsrtp/blob/main/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libsrtp/docs/hap_integrate.md b/thirdparty/libsrtp/docs/hap_integrate.md index 1ffd06ea218449cb2490b76e33c59bc1f1e44ddd..a0eae6802e7f1227e365c3f806dc9767fca37c2c 100644 --- a/thirdparty/libsrtp/docs/hap_integrate.md +++ b/thirdparty/libsrtp/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libsrtp #三方库libsrtp的目录结构如下 @@ -23,21 +24,15 @@ ├── libsrtp_oh_pkg.patch #三方库libsrtp的patch文件 ``` -- 将libsrtp拷贝至tools/main目录下,并且将依赖的openssl和libpcap也拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libsrtp tools/main -rf - cp thirdparty/openssl tools/main -rf - cp thirdparty/libpcap tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh libsrtp openssl libpcap ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libsrtp/arm64-v8a libsrtp/armeabi-v7a libpcap/arm64-v8a libpcap/armeabi-v7a openssl/arm64-v8a openssl/armeabi-v7a @@ -56,14 +51,11 @@ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpcap/${OHOS_ARCH}/lib/libpcap.a) target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/lib/libssl.a) target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/lib/libcrypto.a) -#将三方库的头文件加入工程中 + #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libsrtp/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpcap/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/include) ``` - ![libsrtp_usage](pic/libsrtp_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/libsvm/README_zh.md b/thirdparty/libsvm/README_zh.md index 5c914a1ad4eb46cc1e9900cb62d1f71b15c7ec02..346bfcb24586f60e389df8059adced0996f2e8d1 100644 --- a/thirdparty/libsvm/README_zh.md +++ b/thirdparty/libsvm/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 libsvm是一个支持向量机的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v331 - 当前适配的功能:支持向量机 -- [BSD](https://github.com/cjlin1/libsvm) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libsvm/docs/hap_integrate.md b/thirdparty/libsvm/docs/hap_integrate.md index 986ae4da94e90a8ee19069ada0788950bb40f374..d31325bf2906a815914132d73c64f5a4a17f952f 100644 --- a/thirdparty/libsvm/docs/hap_integrate.md +++ b/thirdparty/libsvm/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libsvm #三方库libsvm的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将libsvm拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libsvm tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh libsvm ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libsvm/arm64-v8a libsvm/armeabi-v7a ``` @@ -43,10 +40,8 @@ ## 应用中使用三方库 -- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: - 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 - ![thirdparty_install_dir](pic/libsvm_install_dir.jpg) +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示: +  ![thirdparty_install_dir](pic/libsvm_install_dir.jpg) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 @@ -56,7 +51,7 @@ ``` ![libsvm_usage](pic/libsvm_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的svm-train、svm-scale、svm-predict可执行文件及音频测试文件test.data准备好 diff --git a/thirdparty/libsvm/docs/pic/libsvm_install_dir.jpg b/thirdparty/libsvm/docs/pic/libsvm_install_dir.jpg index 67bb1ca747303f4cff5958d5a992f67ea42102b3..a372129198fe4d775978b61e826252ce76289916 100644 Binary files a/thirdparty/libsvm/docs/pic/libsvm_install_dir.jpg and b/thirdparty/libsvm/docs/pic/libsvm_install_dir.jpg differ diff --git a/thirdparty/libtess2/README_zh.md b/thirdparty/libtess2/README_zh.md index bfce4c519c53ccc1c92dfdcf46c1d833d96ec2f4..66c0a02321202f7235e526cb1e3e63f1241f6d53 100644 --- a/thirdparty/libtess2/README_zh.md +++ b/thirdparty/libtess2/README_zh.md @@ -3,10 +3,9 @@ libtess2 可以对复杂多边形进行曲面细分。 ## 使用约束 - IDE版本:DevEco Studio 3.1 Release -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:1.3.1 - 当前适配的功能:支持对复杂多边形进行曲面细分 -- [SGI FREE SOFTWARE LICENSE B](https://github.com/memononen/libtess2/blob/master/LICENSE.txt) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libtess2/docs/hap_integrate.md b/thirdparty/libtess2/docs/hap_integrate.md index 76eb46236b5ce3849ac01f20040173a0d055ddfe..12ddb6e45bb17d85177b17246d958e737af279b6 100644 --- a/thirdparty/libtess2/docs/hap_integrate.md +++ b/thirdparty/libtess2/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -31,25 +31,18 @@ ├── libtess2_oh_pkg.patch ``` -- 将libtess2拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/libtess2 tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh libtess2 ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell libtess2/arm64-v8a libtess2/armeabi-v7a @@ -73,13 +66,12 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libtess2/${OHOS_ARCH}/include) ``` - ![libtess2_usage](pic/libtess2_usage.png) ## 测试三方库 三方库的测试使用原库自带的可执行文件来做测试 -进入到构建目录,再进入tools目录,执行./example(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) +进入到构建目录,再进入lycium目录,执行./example(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录)  ![libtess2_test](pic/libtess2_test.png) diff --git a/thirdparty/libtommath/README_zh.md b/thirdparty/libtommath/README_zh.md index a267f1cec6b0dce3a99eb9d6daec1feaf670a320..7e61e7cd05642e7b36f3c236d219b4ddd4e3bbb9 100644 --- a/thirdparty/libtommath/README_zh.md +++ b/thirdparty/libtommath/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 libtommath是一个完全用C语言编写的免费开源可移植数字理论多精度整数(MPI)库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:1.2.0 - 当前适配的功能:数字理论多精度整数 -- [BSD](https://github.com/libtom/libtommath) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libtommath/docs/hap_integrate.md b/thirdparty/libtommath/docs/hap_integrate.md index 0d2ed54e767743d4b0ebb84d111ae2204736d8de..7044be3a6aaff14276225d0759f90cdab94209d9 100644 --- a/thirdparty/libtommath/docs/hap_integrate.md +++ b/thirdparty/libtommath/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libtommath #三方库libtommath的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将libtommath拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libtommath tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh libtommath ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libtommath/arm64-v8a libtommath/armeabi-v7a ``` @@ -52,9 +49,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libtommath/${OHOS_ARCH}/include) ``` - ![libtommath_usage](pic/libtommath_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行./test运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/libuuid/README_zh.md b/thirdparty/libuuid/README_zh.md index c2fa2490ee25c123d7e4d4a39296cdb7c4fcd20a..7eca62a81a822c10dccf4efd118feee9c1b6b0f6 100644 --- a/thirdparty/libuuid/README_zh.md +++ b/thirdparty/libuuid/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 The libuuid library is used to generate unique identifiers for objects that may be accessible beyond the local system. ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:1.0.3 - 当前适配的功能:生成唯一识别码 -- [ BSD license](https://sourceforge.net/projects/libuuid/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libuuid/docs/hap_integrate.md b/thirdparty/libuuid/docs/hap_integrate.md index b60579d7cecc1f2f3ba7803fa4352eb2017273a1..7339147e89e5c75253f5db4f03c2456e1dc122b6 100755 --- a/thirdparty/libuuid/docs/hap_integrate.md +++ b/thirdparty/libuuid/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libuuid #三方库libuuid的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将libuuid拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libuuid tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh libuuid ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libuuid/arm64-v8a libuuid/armeabi-v7a @@ -51,14 +48,13 @@ ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libuuid.so.1) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libuuid.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/include/libuuid/${OHOS_ARCH}) - + ``` - ![libuuid_usage](pic/libuuid_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/libwebp/HPKCHECK b/thirdparty/libwebp/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..c2359dde1d32df13d3b4e332a12fedf019ac156b --- /dev/null +++ b/thirdparty/libwebp/HPKCHECK @@ -0,0 +1,36 @@ +# Contributor: liucheng <1596268623@qq.com> +# Maintainer: liucheng <1596268623@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + + ./cwebp ../examples/test_ref.ppm -q 80 -o output.webp > $logfile 2>&1 + res=$? + if [ $res -ne 0 ] + then + cd $OLDPWD + return $res + else + mkdir -p ${LYCIUM__MANUAL_CONFIRM_PATH}/${pkgname} + cp output.webp ${LYCIUM__MANUAL_CONFIRM_PATH}/${pkgname}/ + fi + + ./dwebp output.webp -ppm -o test.ppm > $logfile 2>&1 + res=$? + if [ $res -ne 0 ] + then + cd $OLDPWD + return $res + else + mkdir -p ${LYCIUM__MANUAL_CONFIRM_PATH}/${pkgname} + cp ./test.ppm ${LYCIUM__MANUAL_CONFIRM_PATH}/${pkgname}/ + fi + + cd $OLDPWD + + return $res +} diff --git a/thirdparty/libwebp/README_zh.md b/thirdparty/libwebp/README_zh.md index b9c9d8cef17dc183d483dbd427501abb604f1e07..15c0dbca1ac66359c85d7258fadf3bc80123a49f 100644 --- a/thirdparty/libwebp/README_zh.md +++ b/thirdparty/libwebp/README_zh.md @@ -3,10 +3,9 @@ WebP 编解码器是一个用于编码和解码 WebP 格式图像的库。该软件包包含可用于其他程序以添加WebP支持的库,以及分别用于压缩和解压缩图像的命令行工具“cwebp”和“dwebp”。 ## 使用约束 - IDE版本:DevEco Studio 3.1 Release -- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 9 Release) +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.3.1 - WebP 编解码器是一个用于编码和解码 WebP 格式图像的库。该软件包包含可用于其他程序以添加WebP支持的库,以及分别用于压缩和解压缩图像的命令行工具“cwebp”和“dwebp”。 -- [GNU Library General Public License](https://github.com/webmproject/libwebp/blob/main/COPYING) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libwebp/docs/hap_integrate.md b/thirdparty/libwebp/docs/hap_integrate.md index 9383193c88c8a058e3013dd21c3f45e5dbc5f51a..c72916b5f9446e5e51564c34349af344c4c0e15c 100644 --- a/thirdparty/libwebp/docs/hap_integrate.md +++ b/thirdparty/libwebp/docs/hap_integrate.md @@ -5,15 +5,16 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) -- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libwebp #三方库的目录结构如下 @@ -24,22 +25,15 @@ ├── README_zh.md ``` -- 将三方库拷贝至tools/main目录下 - ```shell - cd tpc_c_cplusplus - mkdir -p tools/main - cp thirdparty/libpng tools/main/ -rf - cp thirdparty/libwebp tools/main/ -rf - cp thirdparty/libjpeg-turbo tools/main/ -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh libwebp libpng libjpeg-turbo ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libwebp/arm64-v8a libwebp/armeabi-v7a @@ -59,21 +53,14 @@ ``` #将三方库加入工程中 -target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libjpeg.a) -target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libturbojpeg.a) -target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libpng.a) -target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libpng16.a) target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libsharpyuv.so) target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libwebp.so) target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libwebpdecoder.so) target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libwebpdemux.so) target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libwebpmux.so) #将三方库的头文件加入工程中 -target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libjpeg-turbo/${OHOS_ARCH}/include) -target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng/${OHOS_ARCH}/include) target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libwebp/${OHOS_ARCH}/include) ``` - ![thirdparty_usage](pic/usage.png) ## 测试三方库 三方库的测试使用原库自带的测试用例来做测试 diff --git a/thirdparty/libwebp/docs/pic/install_dir.png b/thirdparty/libwebp/docs/pic/install_dir.png old mode 100755 new mode 100644 diff --git a/thirdparty/libwebp/docs/pic/test_result.png b/thirdparty/libwebp/docs/pic/test_result.png old mode 100755 new mode 100644 diff --git a/thirdparty/libwebp/docs/pic/usage.png b/thirdparty/libwebp/docs/pic/usage.png old mode 100755 new mode 100644 diff --git a/thirdparty/libxls/README_zh.md b/thirdparty/libxls/README_zh.md index b6a94ec604905d99c7860d6856dd72ccab9d3448..a63c026bf266fcf2b03ca3a0c923ce2ca5de21bf 100644 --- a/thirdparty/libxls/README_zh.md +++ b/thirdparty/libxls/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 libxls是一个解析Excel表格的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.6.2 - 当前适配的功能:解析Excel表格 -- [BSD](https://github.com/libxls/libxls) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libxls/docs/hap_integrate.md b/thirdparty/libxls/docs/hap_integrate.md index dbc30be703595c65374c0aced7975faae2c83aaf..23ba0a7e2eb85095a2f64e124e8f0a3a6370e642 100644 --- a/thirdparty/libxls/docs/hap_integrate.md +++ b/thirdparty/libxls/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libxls #三方库libxls的目录结构如下 @@ -23,19 +24,15 @@ ├── README_zh.md ``` -- 将libxls拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libxls tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh libxls ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libxls/arm64-v8a libxls/armeabi-v7a ``` @@ -53,9 +50,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libxls/${OHOS_ARCH}/include) ``` - ![libxls_usage](pic/libxls_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行make check运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/libxlsxwriter/README_zh.md b/thirdparty/libxlsxwriter/README_zh.md index d146388670082bdd4308f49aafcdced32feab3e9..8f41337abe322cbeba29459d4175d04b5b3ad3be 100644 --- a/thirdparty/libxlsxwriter/README_zh.md +++ b/thirdparty/libxlsxwriter/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 libxlsxwriter是一个可以向Excel写入文字和图片的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:RELEASE_1.1.5 - 当前适配的功能:Excel写入文字和图片 -- [FreeBSD](https://github.com/jmcnamara/libxlsxwriter) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libxlsxwriter/docs/hap_integrate.md b/thirdparty/libxlsxwriter/docs/hap_integrate.md index fffa23792aab8c6242b65021d70f1a6f7863d623..99e8d0f22c44b86ae3b517619518de7312f39543 100644 --- a/thirdparty/libxlsxwriter/docs/hap_integrate.md +++ b/thirdparty/libxlsxwriter/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libxlsxwriter #三方库libxlsxwriter的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将libxlsxwriter拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libxlsxwriter tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh libxlsxwriter ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libxlsxwriter/arm64-v8a libxlsxwriter/armeabi-v7a ``` @@ -52,9 +49,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libxlsxwriter/${OHOS_ARCH}/include) ``` - ![libxlsxwriter_usage](pic/libxlsxwriter_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录), 备注:由于ohos不支持python,因此涉及到python的用例无法通过 diff --git a/thirdparty/libxml2/README_zh.md b/thirdparty/libxml2/README_zh.md index 36eb1023d03a55b4035df9255f07e337f9b08499..b0314098707f454c6bbd16aea158ed1e06b6c447 100644 --- a/thirdparty/libxml2/README_zh.md +++ b/thirdparty/libxml2/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 libxml2是一个用于像素操作的低级软件库,提供图像合成和梯形光栅化等功能。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:0.42.2 - 当前适配的功能:像素操作,图像合成,光栅化 -- [ MIT license](https://github.com/GNOME/libxml2) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libxml2/docs/hap_integrate.md b/thirdparty/libxml2/docs/hap_integrate.md index 717e22dc4e1f4aa5e450dcdf55a649a1b26fa073..f010a32f1f76d806c054c00b1e2d994649d6b6c1 100755 --- a/thirdparty/libxml2/docs/hap_integrate.md +++ b/thirdparty/libxml2/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libxml2 #三方库libxml2的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将libxml2拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libxml2 tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh libxml2 ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libxml2/arm64-v8a libxml2/armeabi-v7a @@ -54,11 +51,10 @@ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libxml2.so.2) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/include/libxml2/${OHOS_ARCH}) - + ``` - ![libxml2_usage](pic/libxml2_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/libyuv/HPKCHECK b/thirdparty/libyuv/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..9ce7619d764a8c622615090219eb572d10f41351 --- /dev/null +++ b/thirdparty/libyuv/HPKCHECK @@ -0,0 +1,15 @@ +# Contributor: shann +# Maintainer: shann + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir/$ARCH-build + ./libyuv_unittest > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} \ No newline at end of file diff --git a/thirdparty/libyuv/README_zh.md b/thirdparty/libyuv/README_zh.md index cb047498f4ba3468b772a89b056a97cb6c86ceb5..89d9eff6df8beb5e8d83057bf6998a44a60e0cfc 100644 --- a/thirdparty/libyuv/README_zh.md +++ b/thirdparty/libyuv/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 libyuv是一个开源的图像处理库,提供了多种图像处理功能,包括图像格式转换、颜色空间转换、颜色调整、去噪、去雾、锐化、缩放等。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:c0031cf(该版本为镜像仓版本,官方版本:c0031cfd95e131c7b11be41d0272455cc63f10f4) - 当前适配的功能:支持多种图像处理功能,包括图像格式转换、颜色空间转换、颜色调整、去噪、去雾、锐化、缩放等 -- BSD-3-Clause license (地址见README.OpenSource文件) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libyuv/docs/hap_integrate.md b/thirdparty/libyuv/docs/hap_integrate.md index 081a58778c559df53dc33267194bd3d26aa527e0..a5b19b962832cc00a39dbc86f83a15141c6ccd22 100644 --- a/thirdparty/libyuv/docs/hap_integrate.md +++ b/thirdparty/libyuv/docs/hap_integrate.md @@ -3,16 +3,17 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库(需要可以可以访问国外网络的环境) ``` 官方下载地址:wget https://chromium.googlesource.com/libyuv/libyuv/+archive/c0031cfd95e131c7b11be41d0272455cc63f10f4.tar.gz 镜像仓下载地址:wget https://github.com/N22E114/libyuv/archive/refs/tags/c0031cf.tar.gz ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libyuv #三方库libyuv的目录结构如下 @@ -23,20 +24,16 @@ ├── README_zh.md ``` -- 将libyuv拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libyuv tools/main -rf - ``` -- 在tools目录下编译三方库 +- 在lycium目录下编译三方库 libyuv库需要依赖googletest这个库进行测试,所以在build时需要将依赖库一起编译进来 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh googletest libyuv ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libyuv/arm64-v8a libyuv/armeabi-v7a googletest/arm64-v8a googletest/armeabi-v7a @@ -48,21 +45,20 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 +  ![thirdparty_install_dir](pic/libyuv_install_dir.jpg) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libyuv/${OHOS_ARCH}/lib/libyuv.so) - + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libyuv/${OHOS_ARCH}/lib/libyuv.a) + #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libyuv/${OHOS_ARCH}/include) ``` - ![libyuv_usage](pic/libyuv_usage.jpg) - ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的可执行文件及生成的动态库准备好 diff --git a/thirdparty/libzip/README_zh.md b/thirdparty/libzip/README_zh.md index b311effe6cd43d7adc2e5a498cdbf96c94c704b1..1ecccf29652001a705711ea42be0e3e93224de74 100644 --- a/thirdparty/libzip/README_zh.md +++ b/thirdparty/libzip/README_zh.md @@ -3,11 +3,10 @@ libzip是一个用于读取、创建和修改zip存档的C库。文件可以从数据缓冲区、文件或直接从其他zip档案复制的压缩数据中添加。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:1.9.2 - 当前适配的功能:读取、创建和修改zip存档功能 -- [BSD License](https://github.com/nih-at/libzip/blob/main/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/libzip/docs/hap_integrate.md b/thirdparty/libzip/docs/hap_integrate.md index 923f7ffe7f4d6389b8ffa5e714086bb37e006300..18bcc369d16594de23f564f72154657ba082e43c 100644 --- a/thirdparty/libzip/docs/hap_integrate.md +++ b/thirdparty/libzip/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/libzip #三方库libzip的目录结构如下 @@ -23,23 +24,15 @@ ├── README_zh.md ``` -- 将libzip拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/libzip tools/main -rf - cp thirdparty/bzip2 tools/main -rf - cp thirdparty/openssl tools/main -rf - cp thirdparty/xz tools/main -rf - cp thirdparty/zstd tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh libzip xz zstd openssl bzip2 ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` libzip/arm64-v8a libzip/armeabi-v7a xz/arm64-v8a xz/armeabi-v7a @@ -52,28 +45,17 @@ ## 应用中使用三方库 -- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: - 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示:  ![libzip_install_dir](pic/libzip_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libzip.so.5.5) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libcrypto.so.1.1) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/liblzma.so.5.4.1) - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libzstd.so) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/bzip2/${OHOS_ARCH}/lib/libbz2.a) + target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libzip.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libzip/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/xz/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/bzip2/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zstd/${OHOS_ARCH}/include) - ``` - ![libzip_usage](pic/libzip_usage.png) + ``` ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,需要使用到perl工具,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,需要使用到perl工具,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/libzip/docs/pic/libzip_install_dir.png b/thirdparty/libzip/docs/pic/libzip_install_dir.png index 40f4d76e49acba9e4773fbc6d04d8032d788294f..e09faf373afdd8c6e0302a02f238a658632bd243 100644 Binary files a/thirdparty/libzip/docs/pic/libzip_install_dir.png and b/thirdparty/libzip/docs/pic/libzip_install_dir.png differ diff --git a/thirdparty/log4cplus/README_zh.md b/thirdparty/log4cplus/README_zh.md index 2aa00879e9801f159ab5b47c72c40dc62d58d5f5..8fd19c0b3468329501ff7007f530faa8ad0f06ce 100755 --- a/thirdparty/log4cplus/README_zh.md +++ b/thirdparty/log4cplus/README_zh.md @@ -6,11 +6,10 @@ log4cplus是一个简单易用的C++日志记录API,它对日志管理和配 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:REL_2_1_0 - 当前适配的功能:支持输出日志并将日志保存到本地 -- [BSD/Apache license](https://github.com/log4cplus/log4cplus/blob/master/LICENSE) ## 集成方式 diff --git a/thirdparty/log4cplus/docs/hap_integrate.md b/thirdparty/log4cplus/docs/hap_integrate.md index 9827e12051303a96790b81f1dbed5b648af082db..5b3cc6348192bfd240570f637cf367bcb38b39b5 100755 --- a/thirdparty/log4cplus/docs/hap_integrate.md +++ b/thirdparty/log4cplus/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将log4cplus拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/log4cplus tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh log4cplus ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell log4cplus/arm64-v8a log4cplus/armeabi-v7a @@ -73,11 +66,10 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/log4cplus/${OHOS_ARCH}/include) ``` - ![log4cplus_usage](../../thirdparty_template/docs/pic/xxx_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/lpeg/HPKBUILD b/thirdparty/lpeg/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..6e0fd93a6da86cc9104e2b125e67ba341087426b --- /dev/null +++ b/thirdparty/lpeg/HPKBUILD @@ -0,0 +1,85 @@ +# Contributor: Ding Qian <1052888395@qq.com> +# Maintainer: Ding Qian <1052888395@qq.com> +pkgname=lpeg +pkgver=master +pkgrel=0 +pkgdesc="Peg is a new pattern-matching library for Lua" +url="https://github.com/luvit/lpeg" +archs=("armeabi-v7a" "arm64-v8a") +license=("MIT") +depends=("LuaJIT") +makedepends=() +source="https://github.com/luvit/$pkgname.git" +commitid=fda374f3bbac50653bdeba7404d63e13972e6210 + +autounpack=false +downloadpackage=false +buildtools="make" + +builddir=$pkgname-${commitid} +packagename= +cloneflag=true +source envset.sh + +prepare() { + if [ $cloneflag == true ] + then + mkdir $builddir + git clone -b $pkgver $source $builddir + if [ $? != 0 ] + then + return -1 + fi + cd $builddir + git reset --hard $commitid + if [ $? != 0 ] + then + return -2 + fi + cd $OLDPWD + cloneflag=false + fi + + cp -rf $builddir $builddir-$ARCH-build + cd $builddir-$ARCH-build + if [ $ARCH == "armeabi-v7a" ] + then + setarm32ENV + fi + if [ $ARCH == "arm64-v8a" ] + then + setarm64ENV + fi + cd $OLDPWD +} + +build() { + cd $builddir-$ARCH-build + make CC=${CC} AR=${AR} CFLAGS="-Wno-macro-redefined -I ${LYCIUM_ROOT}/usr/LuaJIT/$ARCH/include/luajit-2.1 $CFLAGS" \ + LDFLAGS="${LDFLAGS} -L ${LYCIUM_ROOT}/usr/LuaJIT/$ARCH/lib" -j4 > `pwd`/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir-$ARCH-build + mkdir -p $LYCIUM_ROOT/usr/$pkgname/$ARCH/include/ + mkdir -p $LYCIUM_ROOT/usr/$pkgname/$ARCH/lib/ + mkdir -p $LYCIUM_ROOT/usr/$pkgname/$ARCH/test/ + cp *.h $LYCIUM_ROOT/usr/$pkgname/$ARCH/include/ + cp *.so $LYCIUM_ROOT/usr/$pkgname/$ARCH/lib/ + cp *test* $LYCIUM_ROOT/usr/$pkgname/$ARCH/test/ + cd $OLDPWD + unset cc ar +} + +check() { + echo "The test must be on an OpenHarmony device!" + # TODO +} + +# 清理环境 +cleanbuild(){ + rm -rf ${PWD}/$builddir $builddir-armeabi-v7a-build $builddir-arm64-v8a-build +} \ No newline at end of file diff --git a/thirdparty/lpeg/OAT.xml b/thirdparty/lpeg/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..96937ea08644b79312d0ced7c0b3eb1e845108ee --- /dev/null +++ b/thirdparty/lpeg/OAT.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/thirdparty/lpeg/README.OpenSource b/thirdparty/lpeg/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..0fa0a2eb8425369ec11e33adc7aab94feee00998 --- /dev/null +++ b/thirdparty/lpeg/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "lpeg", + "License": "MIT license", + "License File": "LICENSES", + "Version Number": "master", + "Owner": "qiandinge@isoftstone.com", + "Upstream URL": "https://github.com/luvit/lpeg/archive/refs/heads/master.zip", + "Description": "LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs)" + } +] \ No newline at end of file diff --git a/thirdparty/lpeg/README_zh.md b/thirdparty/lpeg/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..f560f7bab9cf99cedcfab69f8ec4d770cb0df6f8 --- /dev/null +++ b/thirdparty/lpeg/README_zh.md @@ -0,0 +1,12 @@ +# lpeg三方库说明 +## 功能简介 +LPEG是一个供lua使用的基于 Parsing Expression Grammars 的模式匹配库 +## 使用约束 +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) +- 三方库版本:master +- 当前适配的功能:LPEG是一个供lua使用的基于 Parsing Expression Grammars 的模式匹配库 +- [BSD-3-Clause license](http://www.inf.puc-rio.br/~roberto/lpeg/#license) + +## 集成方式 ++ [应用hap包集成](docs/hap_ingtegrate.md) \ No newline at end of file diff --git a/thirdparty/lpeg/SHA512SUM b/thirdparty/lpeg/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..3fdba504f10118257cd0c8e6f9b5dd6f39571e8d --- /dev/null +++ b/thirdparty/lpeg/SHA512SUM @@ -0,0 +1 @@ +c7bfefac102f06dc2504af8f446e12672f1886e751bddf5bc4b0b9093945b5033c5a5acb7236dd2fc7e118a65a61d8f7a7c3ba0e946f8d772862b912aba09bc8 lpeg-master.zip diff --git a/thirdparty/lpeg/docs/hap_ingtegrate.md b/thirdparty/lpeg/docs/hap_ingtegrate.md new file mode 100644 index 0000000000000000000000000000000000000000..b7e80ffb5c3301fe562fae357bb160c780993964 --- /dev/null +++ b/thirdparty/lpeg/docs/hap_ingtegrate.md @@ -0,0 +1,80 @@ +# lpeg集成到应用hap + +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 + +## 开发环境 + +- ubuntu20.04 +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) +- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../tools/README.md#编译环境准备) +- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +## 编译三方库 +- 下载本仓库 + ``` + git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 + ``` +- 三方库目录结构 + ``` + tpc_c_cplusplus/thirdparty/lpeg #三方库lpeg的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── SHA512SUM #三方库校验文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md + ``` + +- 将lpeg拷贝至tools/main目录下 + ``` + cd tpc_c_cplusplus + cp thirdparty/lpeg tools/main -rf + ``` +- 在tools目录下编译三方库 + lpeg库需要依赖LuaJIT这个库,所以在build时需要将依赖库一起编译进来 + 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + ``` + cd tools + ./build.sh lpeg LuaJIT + ``` +- 三方库头文件及生成的库 + 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + ``` + lpeg/arm64-v8a lpeg/armeabi-v7a + LuaJIT/arm64-v8a LuaJIT/armeabi-v7a + ``` + +- [测试三方库](#测试三方库) + +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库和依赖库拷贝到该目录下,如下图所示 +   + ![thirdparty_install_dir](pic/lpeg_install_dir.png) + +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + ```shell + #将三方库加入工程中 + target_link_libraries(entry PRIVATE -LCMAKECURRENTSOURCEDIR/../../../libs/{OHOS_ARCH}/lpeg.so) + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE CMAKECURRENTSOURCEDIR/thirdparty/lpeg/{OHOS_ARCH}/include) + + ``` + +![lpeg_usage](pic/lpeg_usage.png) + +## 测试三方库 +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) + +- 将编译生成的可执行文件及生成的动态库准备好 + +- 将准备好的文件推送到开发板,进入到构建的目录添加执行文件权限和lib库环境执行ctest + ![lpeg_test](pic/lpeg_test.png) + + +StalenessCheckTest测试选项需要依赖python环境,导致测试错误 +## 参考资料 +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md) diff --git a/thirdparty/lpeg/docs/pic/lpeg_install_dir.png b/thirdparty/lpeg/docs/pic/lpeg_install_dir.png new file mode 100644 index 0000000000000000000000000000000000000000..c306b45e8ae1b0241814c7d68098342ccc2e0a50 Binary files /dev/null and b/thirdparty/lpeg/docs/pic/lpeg_install_dir.png differ diff --git a/thirdparty/lpeg/docs/pic/lpeg_test.png b/thirdparty/lpeg/docs/pic/lpeg_test.png new file mode 100644 index 0000000000000000000000000000000000000000..3dc5b13f16d4cbb8feae8af0688130cb1303d1e9 Binary files /dev/null and b/thirdparty/lpeg/docs/pic/lpeg_test.png differ diff --git a/thirdparty/lpeg/docs/pic/lpeg_usage.png b/thirdparty/lpeg/docs/pic/lpeg_usage.png new file mode 100644 index 0000000000000000000000000000000000000000..01d7f9a57e6f5f1f11d10acf075d3fb4d1814975 Binary files /dev/null and b/thirdparty/lpeg/docs/pic/lpeg_usage.png differ diff --git a/thirdparty/lua-amf3/HPKBUILD b/thirdparty/lua-amf3/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..b156a1a0156fcbbd7afde9708fa2807e7e0f3a5c --- /dev/null +++ b/thirdparty/lua-amf3/HPKBUILD @@ -0,0 +1,72 @@ +# Contributor: Chen Xu +# Maintainer: Chen Xu +pkgname=lua-amf3 +pkgver=2.0.5 +pkgrel=0 +pkgdesc="lua-amf3 provides fast AMF3 encoding/decoding routines for Lua." +url="https://github.com/neoxic/lua-amf3" +archs=("armeabi-v7a" "arm64-v8a") +license=("MIT License") +depends=("LuaJIT") +makedepends=() +source="https://github.com/neoxic/$pkgname/archive/refs/tags/$pkgver.tar.gz" + +autounpack=true +downloadpackage=true + +builddir=$pkgname-${pkgver} +packagename=$builddir.tar.gz + +source envset.sh + +prepare() { + mkdir -p $builddir/$ARCH-build + if [ $ARCH == "armeabi-v7a" ] + then + setarm32ENV + fi + if [ $ARCH == "arm64-v8a" ] + then + setarm64ENV + fi +} + +build() { + cd $builddir + ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DUSE_LUA_VERSION=jit -DCMAKE_PREFIX_PATH=${LYCIUM_ROOT}/usr/LuaJIT/$ARCH \ + -DCMAKE_SHARED_LINKER_FLAGS="-L${LYCIUM_ROOT}/usr/LuaJIT/$ARCH/lib -lluajit-5.1" \ + -DLUA_COMMAND="${LYCIUM_ROOT}/usr/LuaJIT/$ARCH/bin/luajit-2.1.0-beta3" \ + -DOHOS_ARCH=$ARCH -B$ARCH-build -S./ -L > `pwd`/$ARCH-build/build.log 2>&1 + + # 编译 + make -j4 -C $ARCH-build VERBOSE=1 >> `pwd`/$ARCH-build/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir + make -C $ARCH-build install VERBOSE=1 >> `pwd`/$ARCH-build/build.log 2>&1 + cd $OLDPWD +} + +check() { + if [ $ARCH == "armeabi-v7a" ] + then + unsetarm32ENV + fi + if [ $ARCH == "arm64-v8a" ] + then + unsetarm64ENV + fi + echo "The test must be on an OpenHarmony device!" + # export ROOT_PATH=/data/local/tmp/lycium + # cd ${ROOT_PATH}/main/lua-amf3/lua-amf3-2.0.5/arm64-v8a-build + # ctest +} + +# 清理环境 +cleanbuild() { + rm -rf ${PWD}/$builddir $builddir-armeabi-v7a-build $builddir-arm64-v8a-build #${PWD}/$packagename +} diff --git a/thirdparty/lua-amf3/HPKCHECK b/thirdparty/lua-amf3/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..7f3e48cc7cbc729801a6c67edb9dbf9e58611c15 --- /dev/null +++ b/thirdparty/lua-amf3/HPKCHECK @@ -0,0 +1,19 @@ +# Contributor: Chen Xu +# Maintainer: Chen Xu + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir/$ARCH-build + ctest > ${logfile} 2>&1 + res=$? + if [ $res -ne 0 ] + then + mkdir ${LYCIUM_FAULT_PATH}/${pkgname} + cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/ + fi + cd $OLDPWD + return $res +} diff --git a/thirdparty/lua-amf3/OAT.xml b/thirdparty/lua-amf3/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..59b89c6535b6c4ce513410a7645a51ddf2d48abd --- /dev/null +++ b/thirdparty/lua-amf3/OAT.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/thirdparty/lua-amf3/README.OpenSource b/thirdparty/lua-amf3/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..12d6a751126a6cbbc6d9eaaf16550988e56279a9 --- /dev/null +++ b/thirdparty/lua-amf3/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "lua-amf3", + "License": "MIT License", + "License File": "LICENSE", + "Version Number": "2.0.5", + "Owner": "chenxu.unix@gmail.com", + "Upstream URL": "https://github.com/neoxic/lua-amf3.git", + "Description": "lua-amf3 provides fast AMF3 encoding/decoding routines for Lua." + } +] diff --git a/thirdparty/lua-amf3/README_zh.md b/thirdparty/lua-amf3/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..c6a2023fb48ace61fc1d2204f90802add7d9b9b7 --- /dev/null +++ b/thirdparty/lua-amf3/README_zh.md @@ -0,0 +1,11 @@ +# lua-amf3三方库说明 +## 功能简介 +lua-amf3为lua提供AMF二进制格式数据编解码功能。 +## 使用约束 +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) +- 三方库版本:2.0.5 +- 当前适配的功能:读取解析xml + +## 集成方式 ++ [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/lua-amf3/SHA512SUM b/thirdparty/lua-amf3/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..03559a54949963b4689b34ddd69fef6eef9566de --- /dev/null +++ b/thirdparty/lua-amf3/SHA512SUM @@ -0,0 +1 @@ +e8bd2a57a1313bdb9f454de5d9662ed272cde73658f35726861d697be08b97f8b9ced39b01633a4eb23d5e10a795ca443b45adcc7511e0c953ee8305ea4fdec6 lua-amf3-2.0.5.tar.gz diff --git a/thirdparty/lua-amf3/docs/hap_integrate.md b/thirdparty/lua-amf3/docs/hap_integrate.md new file mode 100644 index 0000000000000000000000000000000000000000..5f19586b00fe751a738bf7b2adf307978297b46b --- /dev/null +++ b/thirdparty/lua-amf3/docs/hap_integrate.md @@ -0,0 +1,74 @@ +# lua-amf3集成到应用hap +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 +## 开发环境 +- ubuntu20.04 +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) +- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../tools/README.md#编译环境准备) +- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +## 编译三方库 +- 下载本仓库 + ``` + git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 + ``` +- 三方库目录结构 + ``` + tpc_c_cplusplus/thirdparty/lua-amf3 #三方库lua-amf3的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── SHA512SUM #三方库校验文件 + ├── OAT.xml #OAT文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md + ``` + +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#编译环境准备) + + ``` + cd lycium + ./build.sh lua-amf3 + ``` +- 三方库头文件及生成的库 + 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + ``` + lua-amf3/armeabi-v7a lua-amf3/arm64-v8a + ``` + +- [测试三方库](#测试三方库) + +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty\lua-amf3\arm64-v8a\include目录和thirdparty\lua-amf3\armeabi-v7a\include目录,将编译机器上面的tpc_c_cplusplus/thirdparty/lua-amf3/lua-amf3-2.0.5/src路径下的amf3.h文件拷贝到工程的cpp\thirdparty\lua-amf3\arm64-v8a\include目录下 +32位的拷贝到工程的cpp\thirdparty\lua-amf3\armeabi-v7a\include目录下 +- 在IDE的libs目录下新增arm64-v8a目录和armeabi-v7a目录,分别将64位和32位的amf3.so文件放到该目录下,如下图所示: + + ![thirdparty_install_dir](pic/screen_cut.jpg) + +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + ``` + #将三方库加入工程中 + target_link_libraries(entry PRIVATE -L${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/amf3.so) + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/lua-amf3/${OHOS_ARCH}/include) + ``` + +## 测试三方库 +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) + +- 进入到构建目录,执行如下命令(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) +注意:以下为64位命令,如需测试32位,请将arm64-v8a替换为armeabi-v7a。 +``` +ctest +``` + +测试用例运行结果如下: + + ![lua-amf3_test](pic/run_screen_cut.jpg) + +## 参考资料 +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md) diff --git a/thirdparty/lua-amf3/docs/pic/run_screen_cut.jpg b/thirdparty/lua-amf3/docs/pic/run_screen_cut.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fbb7cc1ec2848cb4364aff7494ad00cce9fc5028 Binary files /dev/null and b/thirdparty/lua-amf3/docs/pic/run_screen_cut.jpg differ diff --git a/thirdparty/lua-amf3/docs/pic/screen_cut.jpg b/thirdparty/lua-amf3/docs/pic/screen_cut.jpg new file mode 100755 index 0000000000000000000000000000000000000000..2427b3b2a25008a50994a1a907b0a590c00cd914 Binary files /dev/null and b/thirdparty/lua-amf3/docs/pic/screen_cut.jpg differ diff --git a/thirdparty/lzma/README_zh.md b/thirdparty/lzma/README_zh.md index af18c2225e06f1abbbc0a311af24ba2068d31456..06c67c31f81d07b4dd2263c9e96818c292256f25 100644 --- a/thirdparty/lzma/README_zh.md +++ b/thirdparty/lzma/README_zh.md @@ -5,6 +5,5 @@ LZMA(Lempel-Ziv-Markov chain-Algorithm的缩写)是2001年以来得到发展的 - ROM版本:OpenHarmony3.2 Beta1 - 三方库版本:4.32.7 - 当前适配的功能:完成了 .lzma 格式文件的压缩、解压缩 -- [License : LGPLv2+](https://tukaani.org/lzma/) ## 集成方式 + [系统Rom包集成](docs/rom_integrate.md) \ No newline at end of file diff --git a/thirdparty/marisa-trie/README_zh.md b/thirdparty/marisa-trie/README_zh.md index 26afb870ded0596b481d378c9d24b145d495ff87..8234d445b7e55cc8aaeb2b458e05b04b9f32ce5f 100755 --- a/thirdparty/marisa-trie/README_zh.md +++ b/thirdparty/marisa-trie/README_zh.md @@ -6,11 +6,10 @@ marisa 递归存储匹配算法种静态的、节省空间的trie数据结构. ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:4.0.0 - 当前适配的功能:提供字典树数据结构算法,用于生成并加载asr字典树. -- [LGPL-2.1/GPL-2.0](https://github.com/s-yata/marisa-trie/blob/master/COPYING.md) ## 集成方式 diff --git a/thirdparty/marisa-trie/docs/hap_integrate.md b/thirdparty/marisa-trie/docs/hap_integrate.md index 6d5c58a7ccc3a90dbafe22e3ed13fa117f3e493e..6f8c30e8c12e0cd80556b01261e8b3e705cb7490 100755 --- a/thirdparty/marisa-trie/docs/hap_integrate.md +++ b/thirdparty/marisa-trie/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将marisa-trie拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/marisa-trie tools/main -rf ## 拷贝marisa三方库到编译目录 - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools ## 进入到编译目录 + cd lycium ## 进入到编译目录 ./build.sh marisa-trie ## 编译三方库 ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell marisa-trie/arm64-v8a marisa-trie/armeabi-v7a @@ -73,11 +66,10 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/marisa/${OHOS_ARCH}/include) ``` - ![marisa_usage](../../thirdparty_template/docs/pic/xxx_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行`make check-TESTS -C tests`运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/md5-c/HPKCHECK b/thirdparty/md5-c/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..a14e52a70719ac933093ccbdc2aba8088eebf491 --- /dev/null +++ b/thirdparty/md5-c/HPKCHECK @@ -0,0 +1,79 @@ +# Contributor: dingqian <1052888395@qq.com> +# Maintainer: dingqian <1052888395@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd ${builddir}-${ARCH}-build + + ./md5 "Hello, World!" >> $logfile 2>&1 + res=$? + if [ $res -ne 0 ] + then + cd $old_pwd + return $res + fi + + ./md5 "Multiple" Strings >> $logfile 2>&1 + res=$? + if [ $res -ne 0 ] + then + cd $old_pwd + return $res + fi + + ./md5 "" >> $logfile 2>&1 + res=$? + if [ $res -ne 0 ] + then + cd $old_pwd + return $res + fi + + ./md5 "Can use \" escapes" >> $logfile 2>&1 + res=$? + if [ $res -ne 0 ] + then + cd $old_pwd + return $res + fi + + echo -n "Hello, World!" | ./md5 >> $logfile 2>&1 + res=$? + if [ $res -ne 0 ] + then + cd $old_pwd + return $res + fi + + echo "Hello, World!" | ./md5 >> $logfile 2>&1 + res=$? + if [ $res -ne 0 ] + then + cd $old_pwd + return $res + fi + + echo "File Input" > testFile | ./md5 >> $logfile 2>&1 + res=$? + if [ $res -ne 0 ] + then + cd $old_pwd + return $res + fi + + cat testFile | ./md5 >> $logfile 2>&1 + res=$? + if [ $res -ne 0 ] + then + cd $old_pwd + return $res + fi + + res=$? + cd $OLDPWD + + return $res +} diff --git a/thirdparty/md5-c/README_zh.md b/thirdparty/md5-c/README_zh.md index cd66429bd6134d921f7dc45bd881fb808d9d5828..ac06b3e48222bda13dac043a5cb952fa8814c17d 100644 --- a/thirdparty/md5-c/README_zh.md +++ b/thirdparty/md5-c/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 md5的全称是md5信息摘要算法,用于确保信息传输的完整一致。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:main - 当前适配的功能:提供数据的序列化框架 -- [BSD-3-Clause license](https://github.com/Zunawe/md5-c/blob/main/UNLICENSE) ## 集成方式 + [应用hap包集成](docs/hap_ingtegrate.md) \ No newline at end of file diff --git a/thirdparty/md5-c/docs/hap_ingtegrate.md b/thirdparty/md5-c/docs/hap_ingtegrate.md index 41340df372bab4a093a049e42f9195b8398e4329..7f5f7b51a30ddd1509dc4d8b84686d2ce50e2e69 100644 --- a/thirdparty/md5-c/docs/hap_ingtegrate.md +++ b/thirdparty/md5-c/docs/hap_ingtegrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -22,7 +22,7 @@ - 三方库目录结构 ```shell - tpc_c_cplusplus/thirdparty/md5-c #三方库md5-c的目录结构如下 + tpc_c_cplusplus/thirdparty/md5-c #三方库md5-c的目录结构如下 ├── docs #三方库相关文档的文件夹 ├── HPKBUILD #构建脚本 ├── md5-c_oh_pkg.patch #补丁 @@ -32,37 +32,29 @@ ├── README_zh.md ``` -- 将md5-c拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/md5-c tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh md5-c ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell md5-c/arm64-v8a md5-c/armeabi-v7a ``` + - [测试三方库](#测试三方库) ## 应用中使用三方库 - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 -   - - ![thirdparty_install_dir](pic/md5-c_install_dir.png) +  ![thirdparty_install_dir](pic/md5-c_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -74,11 +66,10 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/md5-c/${OHOS_ARCH}/include) ``` - ![md5-c_usage](pic/md5-c_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行如下命令ctest(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/miniini/HPKCHECK b/thirdparty/miniini/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..9af81c770c881debb6b37e50fc2ce054c6a77751 --- /dev/null +++ b/thirdparty/miniini/HPKCHECK @@ -0,0 +1,20 @@ +# Contributor: lpzhong <278527840@qq.com> +# Maintainer: lpzhong <278527840@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +checkprepare() { + # 此库生成的路径非{ARCH}/lib,故在此单独加载该库路径 + export LD_LIBRARY_PATH=${LYCIUM_ROOT}/usr/${pkgname}/${ARCH}/usr/lib:$LD_LIBRARY_PATH +} + +openharmonycheck() { + res=0 + cd $builddir-$ARCH-build + ./bin/tester > $logfile 2>&1 + res=$? + cd $OLDPWD + + return $res +} diff --git a/thirdparty/miniini/README_zh.md b/thirdparty/miniini/README_zh.md index 63c4860794da8d57dea7f0a33a9517abddc77d2b..5a9eb41bdf7e57e1dbb8a61750d8a429d90682cd 100644 --- a/thirdparty/miniini/README_zh.md +++ b/thirdparty/miniini/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 miniini是一个用于解析INI文件的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:0.9 - 当前适配的功能:解析INI文件 -- [MIT](http://miniini.tuxfamily.org/downloads.php) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/miniini/docs/hap_integrate.md b/thirdparty/miniini/docs/hap_integrate.md index 09d19bf43d8caadc7eca75a89d23b8bd8cf536c0..356889a44a342a94b4de6473ad220fa23b35a2d8 100644 --- a/thirdparty/miniini/docs/hap_integrate.md +++ b/thirdparty/miniini/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/miniini #三方库miniini的目录结构如下 @@ -23,19 +24,15 @@ ├── README_zh.md ``` -- 将miniini拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/miniini tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh miniini ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` miniini/arm64-v8a miniini/armeabi-v7a ``` @@ -54,9 +51,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/miniini/${OHOS_ARCH}/include) ``` - ![miniini_usage](pic/miniini_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行./bin/tester运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/minizip-ng/README_zh.md b/thirdparty/minizip-ng/README_zh.md index 3ae4aec1bcc8141a6fa6c372031336cb7316ca36..e7609a278835fe56e127e79a60e43a2b34da6ffc 100644 --- a/thirdparty/minizip-ng/README_zh.md +++ b/thirdparty/minizip-ng/README_zh.md @@ -7,8 +7,8 @@ minizip是一个用C编写的zip文件操作库。 ## 使用约束 - ROM版本:OpenHarmony3.2 Beta1 -- IDE版本:DevEco Studio 3.1 Release(3.1.3.400) -- SDK:API9 Release(3.2.11.5) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:3.0.4 - 当前适配的功能: - 创建和解压缩zip存档。 @@ -22,7 +22,6 @@ minizip是一个用C编写的zip文件操作库。 - 将本地文件头信息归零。 - 压缩/解压缩中心目录以减小大小 - 如果中心目录损坏或丢失,则恢复该目录 -- [License : zlib](https://github.com/zlib-ng/minizip-ng/tree/3.0.4/LICENSE) ## 集成方式 diff --git a/thirdparty/minizip-ng/docs/hap_integrate.md b/thirdparty/minizip-ng/docs/hap_integrate.md index ce326c7ae290400f452d687d9d5bf02bfffbb9a4..40dbb0cdca677f74fb9e97fe245f162282425af5 100755 --- a/thirdparty/minizip-ng/docs/hap_integrate.md +++ b/thirdparty/minizip-ng/docs/hap_integrate.md @@ -8,8 +8,8 @@ - [OpenHarmony3.2.1Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2.1%2Fdayu200_standard_arm32.tar.gz) - [ohos_sdk_public 3.2.12.5](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2.1%2Fohos-sdk-windows_linux-public.tar.gz) - [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -33,37 +33,18 @@ ├── README_zh.md ``` -- 将minizip-ng拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/minizip-ng tools/main -rf - ``` - -- 将minizip-ng的依赖库拷贝至tools/main目录下 - - minizip-ng依赖了openssl,xz,bzip2,zstd以及googletest等三方库,其中googletest是minizip-ng的测试用例所依赖的库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cp thirdparty/openssl tools/main -rf - cp thirdparty/xz tools/main -rf - cp thirdparty/bzip2 tools/main -rf - cp thirdparty/zstd tools/main -rf - cp thirdparty/googletest tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - - ```shell - cd tools + cd lycium ./build.sh minizip-ng googletest xz zstd bzip2 openssl ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库及其依赖库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库及其依赖库 ```shell minizip-ng/arm64-v8a minizip-ng/armeabi-v7a @@ -75,36 +56,23 @@ ## 应用中使用三方库 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示:  ![minizip_install_dir](pic/minizip_install_dir.png) - 将对应的so拷贝到工程目录的对应架构的libs目录下: - -  ![minizip_install_libs](pic/minizip_install_libs.png) - - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ```shell #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libminizip.so.4 - ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libssl.so.1.1 - ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libcrypto.so.1.1 - ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/liblzma.so.5 - ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libzstd.so.1 - ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libminizip.so.4) + target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libminizip.so) #将三方库的头文件加入工程中 - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/minizip-ng/${OHOS_ARCH}/include - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/include - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/xz/${OHOS_ARCH}/include - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zstd/${OHOS_ARCH}/include) + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/minizip-ng/${OHOS_ARCH}/include) ``` - - ![minizip_usage](pic/minizip_usage.png) + ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行`ctest`运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/minizip-ng/docs/pic/minizip_install_dir.png b/thirdparty/minizip-ng/docs/pic/minizip_install_dir.png index e2691cda67f6d23ed4fb72b241510dbe446aee16..13b91036e3e31d43591182a0450b0c1768339194 100755 Binary files a/thirdparty/minizip-ng/docs/pic/minizip_install_dir.png and b/thirdparty/minizip-ng/docs/pic/minizip_install_dir.png differ diff --git a/thirdparty/modbus/README_zh.md b/thirdparty/modbus/README_zh.md index 9230d9671457608ff9f2e3f6319051af4b6bbc02..6066d6b731dcf2367ce832434a37d43a722f9e93 100755 --- a/thirdparty/modbus/README_zh.md +++ b/thirdparty/modbus/README_zh.md @@ -9,7 +9,6 @@ modbus 是用 C 语言编写的第三方Modbus库来实现modbus通讯,支持 - ROM版本:OpenHarmony3.2 beta4 - 三方库版本:v3.1.10 - 当前适配的功能:完成modbus鸿蒙编译的适配 -- License:[LGPL v2.1 or Later](https://github.com/stephane/libmodbus/COPYING.LESSER) ## 集成方式 diff --git a/thirdparty/mqtt/README_zh.md b/thirdparty/mqtt/README_zh.md index cadda24c46fd9dd6dbbab6cc00c12ae7d63258da..a1cce6083bfb1fa62bd9ee65f3fb58ee00a43af2 100755 --- a/thirdparty/mqtt/README_zh.md +++ b/thirdparty/mqtt/README_zh.md @@ -9,7 +9,6 @@ MQTT 是用 C 语言编写的用于MQTT协议的Eclipse Paho C客户端库。 - ROM版本:OpenHarmony3.2 beta4 - 三方库版本:v1.3.12 - 当前适配的功能:完成Eclipse Paho C客户端库编译的适配 -- License:[Eclipse Public License v2.0](https://github.com/eclipse/paho.mqtt.c/blob/v1.3.12/LICENSE) ## 集成方式 diff --git a/thirdparty/mythes/HPKCHECK b/thirdparty/mythes/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..25aeadfcdc9654cb8e9402b461bfd2e92ba07a71 --- /dev/null +++ b/thirdparty/mythes/HPKCHECK @@ -0,0 +1,32 @@ +# Contributor: lpzhong <278527840@qq.com> +# Maintainer: lpzhong <278527840@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log +linuxresult=$LYCIUM_ROOT/main/$pkgname/mythes_linux_result.txt +openharmonycheck() { + res=0 + cd $pkgname-$ARCH-build + ./.libs/example th_en_US_new.idx th_en_US_new.dat checkme.lst > $logfile 2>&1 + res=$? + if [ $res -eq 0 ] + then + ./.libs/example morph.idx morph.dat morph.lst morph.aff morph.dic >> $logfile 2>&1 + res=$? + fi + + if [ $res -eq 0 ] + then + ret=`diff $linuxresult $logfile` + if [ ! -z "$ret" ] + then + res=1 + echo "check $pkgname failed" >> $logfile + echo "$ret" >> $logfile + fi + fi + + cd $OLDPWD + + return $res +} diff --git a/thirdparty/mythes/README_zh.md b/thirdparty/mythes/README_zh.md index 33ff4f9f1bb5c011bda60c4f75f32016f516e0e5..6356d4f6b5264d44ca87477b143bd1637263c106 100644 --- a/thirdparty/mythes/README_zh.md +++ b/thirdparty/mythes/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 mythes是一个简单的词库,使用结构化的具有二进制搜索的文本数据文件和索引文件查找单词和短语并返回词性、意义和同义词。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:0.9 - 当前适配的功能:查找单词并返回词性、意义和同义词 -- [BSD](https://github.com/hunspell/mythes) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/mythes/docs/hap_integrate.md b/thirdparty/mythes/docs/hap_integrate.md index 3e180617fec34d45c3981528c6f1df2f0d1e7873..a9f8c099d408f1cc5cf47ed30a62e473d8948b9f 100644 --- a/thirdparty/mythes/docs/hap_integrate.md +++ b/thirdparty/mythes/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/mythes #三方库mythes的目录结构如下 @@ -22,20 +23,15 @@ ├── README_zh.md ``` -- 将mythes、hunspell拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/mythes tools/main -rf - cp thirdparty/hunspell tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh hunspell mythes ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` mythes/arm64-v8a mythes/armeabi-v7a hunspell/arm64-v8a hunspell/armeabi-v7a @@ -51,13 +47,12 @@ - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libmythes-1.2.so.0) + target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libmythes-1.2.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/mythes/${OHOS_ARCH}/include) ``` - ![mythes_usage](pic/mythes_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的example可执行文件及测试资源文件(原库下有这些素材)th_en_US_new.idx th_en_US_new.dat checkme.lst morph.idx morph.dat morph.lst morph.aff morph.dic准备好 diff --git a/thirdparty/mythes/docs/pic/mythes_install_dir.jpg b/thirdparty/mythes/docs/pic/mythes_install_dir.jpg index 52cca0e8aef6b85ba7cab8df4daff4c54244cc89..4edb0473c5b1194c5b5de7421fbea08a5541c680 100644 Binary files a/thirdparty/mythes/docs/pic/mythes_install_dir.jpg and b/thirdparty/mythes/docs/pic/mythes_install_dir.jpg differ diff --git a/thirdparty/mythes/mythes_linux_result.txt b/thirdparty/mythes/mythes_linux_result.txt new file mode 100644 index 0000000000000000000000000000000000000000..01e5d84ec3350d54e4d7cc596cb072e6e306e7eb --- /dev/null +++ b/thirdparty/mythes/mythes_linux_result.txt @@ -0,0 +1,208 @@ +Thesaurus uses encoding ISO8859-1 + +simple has 9 meanings + meaning 0: (adj) simple + simple + elemental + ultimate + oversimplified + simplistic + simplex + simplified + unanalyzable + undecomposable + uncomplicated + unsophisticated + easy + plain + unsubdivided + + meaning 1: (adj) elementary + elementary + uncomplicated + unproblematic + easy + + meaning 2: (adj) bare + bare + mere + plain + + meaning 3: (adj) childlike + childlike + wide-eyed + dewy-eyed + naive + naif + + meaning 4: (adj) dim-witted + dim-witted + half-witted + simple-minded + retarded + + meaning 5: (adj) simple + simple + unsubdivided + unlobed + smooth + + meaning 6: (adj) plain + plain + + meaning 7: (noun) herb + herb + herbaceous plant + + meaning 8: (noun) simpleton + simpleton + person + individual + someone + somebody + mortal + human + soul + + + +complex has 5 meanings + meaning 0: (adj) complex + complex + analyzable + decomposable + Byzantine + convoluted + intricate + involved + knotty + labyrinthine + tangled + tortuous + colonial + compound + complicated + composite + compound + daedal + Gordian + interlacing + interlinking + interlocking + interwoven + labyrinthine + labyrinthian + mazy + multifactorial + multiplex + thickening + compound + difficult + hard + + meaning 1: (noun) composite + composite + whole + + meaning 2: (noun) coordination compound + coordination compound + compound + chemical compound + + meaning 3: (noun) feeling + feeling + + meaning 4: (noun) building complex + building complex + structure + construction + + + +junk has 3 meanings + meaning 0: (noun) debris + debris + dust + rubble + detritus + rubbish + trash + scrap + + meaning 1: (noun) boat + boat + + meaning 2: (verb) trash + trash + scrap + discard + fling + toss + toss out + toss away + chuck out + cast aside + dispose + throw out + cast out + throw away + cast away + put away + + + +"jhjhjh" is not in thesaurus! +Thesaurus uses encoding ISO8859-1 + +mouse has 1 meanings + meaning 0: (n) rodent + rodent + + + +stem: mouse +mouse has 1 meanings + meaning 0: (n) rodent + rodents + + + +stem: rodent +rodent has 1 meanings + meaning 0: (n) mouse + mice + + + +stem: eat +eat has 1 meanings + meaning 0: (v) consume + consumes + ingests + + + +stem: eat +eat has 1 meanings + meaning 0: (v) consume + consumed + ingested + + + +stem: eat +eat has 1 meanings + meaning 0: (v) consume + consumed + ingested + + + +stem: eat +eat has 1 meanings + meaning 0: (v) consume + consuming + ingesting + + + diff --git a/thirdparty/nghttp2/README_zh.md b/thirdparty/nghttp2/README_zh.md index d45e6e57acff310597d4f15a3ba37d148bf343f6..0ee5e1ac4be7fc81c6aab56c8a6efe47ac04e7d5 100644 --- a/thirdparty/nghttp2/README_zh.md +++ b/thirdparty/nghttp2/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 nghttp2是一个实现http2超文本传输协议的C库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.52.0 - 当前适配的功能:支持http2协议 -- [MIT](https://github.com/nghttp2) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/nghttp2/docs/hap_integrate.md b/thirdparty/nghttp2/docs/hap_integrate.md index 303613d8c925bb9f8a975de0adc3a6e86114b832..ec31d1576393be49721116e804e792ee72d21036 100644 --- a/thirdparty/nghttp2/docs/hap_integrate.md +++ b/thirdparty/nghttp2/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/nghttp2 #三方库nghttp2的目录结构如下 @@ -22,23 +23,15 @@ ├── README_zh.md ``` -- 将nghttp2、openssl_quic、CUnit、nghttp3、libxml2拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/nghttp2 tools/main -rf - cp thirdparty/openssl_quic tools/main -rf - cp thirdparty/CUnit tools/main -rf - cp thirdparty/nghttp3 tools/main -rf - cp thirdparty/libxml2 tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh openssl_quic CUnit nghttp3 libxml2 nghttp2 ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` nghttp2/arm64-v8a nghttp2/armeabi-v7a openssl_quic/arm64-v8a openssl_quic/armeabi-v7a @@ -61,9 +54,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/nghttp2/${OHOS_ARCH}/include) ``` - ![nghttp2_usage](pic/nghttp2_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/nghttp3/README_zh.md b/thirdparty/nghttp3/README_zh.md index c0052ad28ba22a54328daa872de4f39e0d22c345..6095980275708b98964c9aff6e28e6a967bffff5 100644 --- a/thirdparty/nghttp3/README_zh.md +++ b/thirdparty/nghttp3/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 nghttp3是在C中通过QUIC和QPACK进行HTTP/3映射的实现,它不依赖于任何特定的QUIC传输实现 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v0.10.0 - 当前适配的功能:支持http3 -- [MIT License](https://github.com/ngtcp2/nghttp3/blob/main/COPYING) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/nghttp3/docs/hap_integrate.md b/thirdparty/nghttp3/docs/hap_integrate.md index 684ef62a276178c81dce9a3682ed677818d77491..111eabf4e815e6e76b4bfee5b90dd2595abd7268 100644 --- a/thirdparty/nghttp3/docs/hap_integrate.md +++ b/thirdparty/nghttp3/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/nghttp3 #三方库nghttp3的目录结构如下 @@ -22,20 +23,15 @@ ├── README_zh.md ``` -- 将nghttp3及其依赖库CUnit拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/CUnit tools/main -rf - cp thirdparty/nghttp3 tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh CUnit nghttp3 ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` nghttp3/arm64-v8a nghttp3/armeabi-v7a ``` @@ -55,9 +51,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/nghttp3/${OHOS_ARCH}/include) ``` - ![nghttp3_usage](pic/nghttp3_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/ngtcp2/HPKCHECK b/thirdparty/ngtcp2/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..fea0f02e4f2deb2a6e567fd434938b6e69c46e2c --- /dev/null +++ b/thirdparty/ngtcp2/HPKCHECK @@ -0,0 +1,21 @@ +# Contributor: chengkan +# Maintainer: chengkan + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + ctest > $logfile 2>&1 + res=$? + + if [ $res -ne 0 ] + then + mkdir ${LYCIUM_FAULT_PATH}/${pkgname} + cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/ + fi + cd $OLDPWD + + return $res +} diff --git a/thirdparty/ngtcp2/README_zh.md b/thirdparty/ngtcp2/README_zh.md index c6993455851415e733a202cdd08b5888303b5601..197501b7ba8bafe1abf413f6d2dd971a471c8ecc 100644 --- a/thirdparty/ngtcp2/README_zh.md +++ b/thirdparty/ngtcp2/README_zh.md @@ -3,14 +3,9 @@ ngtcp2项目是实现RFC9000 QUIC协议。 ## 使用约束 - ROM版本:OpenHarmony3.2Release - - IDE版本:DevEco Studio 3.1 Release - -- SDK:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:3.3.10 - -- [MIT license](https://github.com/ngtcp2/ngtcp2/blob/main/COPYING) ## 集成方式 + [系统hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/ngtcp2/docs/hap_integrate.md b/thirdparty/ngtcp2/docs/hap_integrate.md index 1b012d4f2648d76036d235cf1f3cdbdbfc7e0a9d..29288874dc7aa3efe1c7d75284b945608085587e 100644 --- a/thirdparty/ngtcp2/docs/hap_integrate.md +++ b/thirdparty/ngtcp2/docs/hap_integrate.md @@ -3,16 +3,17 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) -- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/ngtcp2 #三方库ngtcp2的目录结构如下 @@ -23,59 +24,36 @@ ├── README_zh.md ``` -- 将ngtcp2拷贝和依赖的库拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/ngtcp2 tools/main -rf - cp thirdparty/CUnit tools/main -rf - cp thirdparty/openssl_quic tools/main -rf - cp thirdparty/nghttp3 tools/main -rf - - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - (ngtcp2库所需要的依赖库有 CUnit openssl_quic nghttp3,所以编译时需要一起编译) - - cd tools + cd lycium ./build.sh CUnit openssl_quic nghttp3 ngtcp2 ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` - ngtcp2/arm64-v8a ngtcp2/armeabi-v7a CUnit/arm64-v8a CUnit/armeabi-v7a - openssl_quic/arm64-v8a openssl_quic/armeabi-v7a nghttp3/arm64-v8a nghttp3/armeabi-v7a + ngtcp2/arm64-v8a ngtcp2/armeabi-v7a ``` - [测试三方库](#测试三方库) ## 应用中使用三方库 -- 在IDE中将编译生成的库都拷贝到libs目录下,如下图所示 +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示:  ![ngtcp2_install](pic/ngtcp2_install.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` - #将三方库加入工程中 - target_link_libraries(entry PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libnghttp3.so - ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libssl.so - ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libcrypto.so - ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libngtcp2_crypto_openssl.so - ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libngtcp2.so) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libngtcp2.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/ngtcp2/ngtcp2/${OHOS_ARCH}/include - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/ngtcp2/openssl_quic/${OHOS_ARCH}/include - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/ngtcp2/nghttp3/${OHOS_ARCH}/include) - + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/ngtcp2/${OHOS_ARCH}/include ``` - ![ngtcp2_usage](pic/ngtcp2_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) - - +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将测试资源导入到开发板 - 设置依赖库路径 @@ -85,7 +63,7 @@ export LD_LIBRARY_PATH=/data/local/tmp/lycium/usr/CUnit/armeabi-v7a/lib:/data/lo ##64位系统 export LD_LIBRARY_PATH=/data/local/tmp/lycium/usr/CUnit/arm64-v8a/lib:/data/local/tmp/lycium/usr/nghttp3/arm64-v8a/lib:/data/local/tmp/lycium/usr/ngtcp2/arm64-v8a/lib:/data/local/tmp/lycium/usr/openssl_quic/arm64-v8a/lib -``` +``` - 进入到构建目录执行 ctest 运行测试用例,如下截图(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/ngtcp2/docs/pic/ngtcp2_install.png b/thirdparty/ngtcp2/docs/pic/ngtcp2_install.png index 076ddbdf515716d1de8aed032efde588a035003f..f5ecc1e607367db7981fa77f631007add605f79f 100644 Binary files a/thirdparty/ngtcp2/docs/pic/ngtcp2_install.png and b/thirdparty/ngtcp2/docs/pic/ngtcp2_install.png differ diff --git a/thirdparty/oneDNN/HPKBUILD b/thirdparty/oneDNN/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..569fd923f280ff3253e621d2d9560ecae8fc485a --- /dev/null +++ b/thirdparty/oneDNN/HPKBUILD @@ -0,0 +1,74 @@ +# Contributor: 城meto +# Maintainer: 城meto + +pkgname=oneDNN +pkgver=v3.2 +pkgrel=0 +pkgdesc="oneDNN is an open-source cross-platform performance library of basic building blocks for deep learning applications." +url="https://github.com/oneapi-src/oneDNN" +archs=("arm64-v8a") +license=("Apache-2.0 license") +depends=("openmp") +makedepends=() +source="https://github.com/oneapi-src/$pkgname/archive/refs/tags/$pkgver.tar.gz" + +autounpack=true +downloadpackage=true +patchflag=true + +builddir=$pkgname-${pkgver:1} +packagename=$pkgname-$pkgver.tar.gz + +source envset.sh + +prepare() { + mkdir -p $builddir/$ARCH-build + + # 1.平台差异无法使用同样的方式获取cpu cache信息 + # 2.cmake 文件没有做OHOS兼容 + if [ $patchflag == true ];then + cd $builddir + patch -p1 < `pwd`/../oneDNN_oh_pkg.patch + patchflag=false + cd $OLDPWD + fi + if [ $ARCH == "arm64-v8a" ];then + setarm64ENV + host=aarch64-linux + else + echo "${ARCH} not support" + fi +} + +build() { + cd $builddir + # 需要配置openmp 的动态库路径,否则无法找到路径 + ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" \ + -DDNNL_BUILD_TESTS=ON \ + -DCMAKE_C_FLAGS="${CFLAGS} -I${LYCIUM_ROOT}/usr/openmp/${ARCH}/include" \ + -DCMAKE_CXX_FLAGS="${CXXFLAGS} -I${LYCIUM_ROOT}/usr/openmp/${ARCH}/include" \ + -DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS} -L${LYCIUM_ROOT}/usr/openmp/${ARCH}/lib" \ + -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS} -L${LYCIUM_ROOT}/usr/openmp/${ARCH}/lib" \ + -DOHOS_ARCH=$ARCH -B$ARCH-build -S./ -L > `pwd`/$ARCH-build/build.log 2>&1 + make -j4 -C $ARCH-build VERBOSE=1 >> `pwd`/$ARCH-build/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir + make -C $ARCH-build install VERBOSE=1 >> `pwd`/$ARCH-build/build.log 2>&1 + cd $OLDPWD +} + +check() { + echo "The test must be on an OpenHarmony device!" + # real test + # ctest +} + +# 清理环境 +cleanbuild(){ + rm -rf ${PWD}/$builddir #${PWD}/$packagename +} \ No newline at end of file diff --git a/thirdparty/oneDNN/HPKCHECK b/thirdparty/oneDNN/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..055c4aa275c259f50e7d0c1dde78f3498a433080 --- /dev/null +++ b/thirdparty/oneDNN/HPKCHECK @@ -0,0 +1,19 @@ +# Contributor: 城meto +# Maintainer: 城meto + +source HPKBUILD > /dev/null 2>&1 # 导入HPKBUILD文件 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +# 在OH环境执行测试的接口 +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + ctest > ${logfile} 2>&1 + res=$? + if [ $res -ne 0 ];then + mkdir ${LYCIUM_FAULT_PATH}/${pkgname} + cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/ + fi + cd $OLDPWD + return $res +} diff --git a/thirdparty/oneDNN/OAT.xml b/thirdparty/oneDNN/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..96937ea08644b79312d0ced7c0b3eb1e845108ee --- /dev/null +++ b/thirdparty/oneDNN/OAT.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/thirdparty/oneDNN/README.OpenSource b/thirdparty/oneDNN/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..f0c6a1dc3a54a293a1fb1db911b6d0c1fa59cbbb --- /dev/null +++ b/thirdparty/oneDNN/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "oneDNN", + "License": "Apache-2.0 license", + "License File": "LICENSE", + "Version Number": "v3.2", + "Owner": "myxuan475@126.com", + "Upstream URL": "https://github.com/oneapi-src/oneDNN/archive/refs/tags/v3.2.tar.gz", + "Description": "oneDNN is an open-source cross-platform performance library of basic building blocks for deep learning applications." + } +] \ No newline at end of file diff --git a/thirdparty/oneDNN/README_zh.md b/thirdparty/oneDNN/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..7e708c138bbb3a8fd393ed4112b1afdcbf9457f9 --- /dev/null +++ b/thirdparty/oneDNN/README_zh.md @@ -0,0 +1,12 @@ +# oneDNN三方库说明 +## 功能简介 +oneDNN是为深度学习应用开发的一块跨平台开源库。 +## 使用约束 +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) +- 三方库版本:v3.2 +- 当前适配的功能:提供CNN基元、RNN原语、元素操作、支持多种函数和优化的数据布局。 +- [Apache License](https://github.com/oneapi-src/oneDNN/tree/v3.2/LICENSE) + +## 集成方式 ++ [应用hap包集成](docs/hap_integrate.md) \ No newline at end of file diff --git a/thirdparty/oneDNN/SHA512SUM b/thirdparty/oneDNN/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..6e8db93210dd69f432174d31db3adc8249b9796e --- /dev/null +++ b/thirdparty/oneDNN/SHA512SUM @@ -0,0 +1 @@ +6777927537370759e0d2043bee3fbbe39cb26414ae9e2155bf0978471b7615f7eede13c9622c335343e4ad1aba56b4d3534a151688b6f2c11731da8c54157f41 oneDNN-v3.2.tar.gz diff --git a/thirdparty/oneDNN/docs/hap_integrate.md b/thirdparty/oneDNN/docs/hap_integrate.md new file mode 100644 index 0000000000000000000000000000000000000000..19e09b4004ff14fbdca3ac7a748b51fd23833bfc --- /dev/null +++ b/thirdparty/oneDNN/docs/hap_integrate.md @@ -0,0 +1,105 @@ +# oneDNN集成到应用hap + +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 + +## 开发环境 + +- ubuntu20.04 +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) +- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../tools/README.md#编译环境准备) +- [准备三方库测试环境](../../../tools/README.md#ci环境准备) + +## 编译三方库 + +- 下载本仓库 + + ```shell + git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 + ``` + +- 三方库目录结构 + + ```shell + tpc_c_cplusplus/thirdparty/oneDNN #三方库avrocpp的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── SHA512SUM #三方库校验文件 + ├── oneDNN_oh_pkg.patch #PATCH 文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md + ``` + +- 将oneDNN拷贝至tools/main目录下 + + 拷贝前要如果tools下没有main目录,需要自己创建。 + + ```shell + cd tpc_c_cplusplus + cp -rf thirdparty/oneDNN tools/main + ``` + oneDNN依赖openmp, 需要把openmp也拷贝到tools/main 下。 + + 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + + ```shell + cd tools + ./build.sh oneDNN openmp + ``` + +- 三方库头文件及生成的库 + + 在tools目录下会生成usr目录,该目录下存在已编译完成64位三方库 + + ```shell + oneDNN/arm64-v8a + ``` +- [测试三方库](#测试三方库) + +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,动态库文件会自动拷贝到libs目录下打包,如下图所示: + + ![thirdparty_install_dir](pic/oneDNN_js.png) + +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + + ```shell + #将三方库加入工程中 + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/oneDNN/${OHOS_ARCH}/lib/libdnnl.so) + + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/oneDNN/${OHOS_ARCH}/include) + + #将动态库打包到libs + file(GLOB allLibs "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/oneDNN/${OHOS_ARCH}/lib/*.so*") + add_custom_command(TARGET entry POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${allLibs} + ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/) + ``` + 修改IDE的entry/build-profile.json5 文件,增加编译架构过滤:"abiFilters": ["arm64-v8a"], 该库不支持armeabi-v7a, 如下图所示: + + ![oneDNN_build](pic/oneDNN_build.png) + + 第一次编译,可能IDE不能创建目录,需要在entry/libs/下创建arm64-v8a 目录, 如下图: + + ![entry_libs](pic/entry_libs.png) + + 然后,执行编译运行. + +## 测试三方库 + +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) + +进入到构建目录,执行如下命令ctest(arm64-v8a-build为构建64位的目录) + +![oneDNN_test](pic/oneDNN_test.png) + +## 参考资料 + +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md) diff --git a/thirdparty/oneDNN/docs/pic/entry_libs.png b/thirdparty/oneDNN/docs/pic/entry_libs.png new file mode 100644 index 0000000000000000000000000000000000000000..b752574b09cf39b5aee920ad601fedcc3c83152a Binary files /dev/null and b/thirdparty/oneDNN/docs/pic/entry_libs.png differ diff --git a/thirdparty/oneDNN/docs/pic/oneDNN_build.png b/thirdparty/oneDNN/docs/pic/oneDNN_build.png new file mode 100644 index 0000000000000000000000000000000000000000..0f2f985d149428e14c93f6e2046be34e17fd08a5 Binary files /dev/null and b/thirdparty/oneDNN/docs/pic/oneDNN_build.png differ diff --git a/thirdparty/oneDNN/docs/pic/oneDNN_js.png b/thirdparty/oneDNN/docs/pic/oneDNN_js.png new file mode 100644 index 0000000000000000000000000000000000000000..8d27e4b5b7757cec7257b3c0a0fb4c3e10b2872f Binary files /dev/null and b/thirdparty/oneDNN/docs/pic/oneDNN_js.png differ diff --git a/thirdparty/oneDNN/docs/pic/oneDNN_test.png b/thirdparty/oneDNN/docs/pic/oneDNN_test.png new file mode 100644 index 0000000000000000000000000000000000000000..d704ff1d8cb3c7e1e76d3cfa3058bf39132f2eaf Binary files /dev/null and b/thirdparty/oneDNN/docs/pic/oneDNN_test.png differ diff --git a/thirdparty/oneDNN/oneDNN_oh_pkg.patch b/thirdparty/oneDNN/oneDNN_oh_pkg.patch new file mode 100644 index 0000000000000000000000000000000000000000..9563f048da251e72982052fc714c149edaad8bbc --- /dev/null +++ b/thirdparty/oneDNN/oneDNN_oh_pkg.patch @@ -0,0 +1,31 @@ +diff -Naur oneDNN-3.2_old/cmake/OpenMP.cmake oneDNN-3.2/cmake/OpenMP.cmake +--- oneDNN-3.2_old/cmake/OpenMP.cmake 2023-06-23 09:17:29.000000000 +0800 ++++ oneDNN-3.2/cmake/OpenMP.cmake 2023-07-04 16:49:15.533832674 +0800 +@@ -97,7 +97,7 @@ + append(CMAKE_SHARED_LINKER_FLAGS "-fopenmp=libgomp") + append(CMAKE_EXE_LINKER_FLAGS "-fopenmp=libgomp") + elseif(OpenMP_CXX_FOUND) +- if(MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") ++ if((MSVC OR OHOS) AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + list(APPEND EXTRA_SHARED_LIBS ${OpenMP_CXX_LIBRARIES}) + endif() + else() +diff -Naur oneDNN-3.2_old/src/cpu/aarch64/xbyak_aarch64/src/util_impl_linux.h oneDNN-3.2/src/cpu/aarch64/xbyak_aarch64/src/util_impl_linux.h +--- oneDNN-3.2_old/src/cpu/aarch64/xbyak_aarch64/src/util_impl_linux.h 2023-06-23 09:17:29.000000000 +0800 ++++ oneDNN-3.2/src/cpu/aarch64/xbyak_aarch64/src/util_impl_linux.h 2023-07-04 16:49:15.545832824 +0800 +@@ -374,11 +374,14 @@ + * for the case thd dictionary is unavailable. + */ + lastDataCacheLevel_ = 2; // It is assumed L1 and L2 cache exist. +- ++#ifndef __OHOS__ + cacheInfo_.levelCache[0].size[0] = sysconf(_SC_LEVEL1_ICACHE_SIZE); // L1, ICache + cacheInfo_.levelCache[0].size[1] = sysconf(_SC_LEVEL1_DCACHE_SIZE); // L1, DCache + cacheInfo_.levelCache[1].size[2] = sysconf(_SC_LEVEL2_CACHE_SIZE); // L2, UCache + cacheInfo_.levelCache[2].size[2] = sysconf(_SC_LEVEL3_CACHE_SIZE); // L3, UCache ++#else ++ printf("not support\n"); ++#endif + } + } + diff --git a/thirdparty/openjpeg/README_zh.md b/thirdparty/openjpeg/README_zh.md index 9aa0c5b62d223e3a53849b608daf6fca293db6fd..1eccdb7220d549d749e4c73789747be27e29813e 100755 --- a/thirdparty/openjpeg/README_zh.md +++ b/thirdparty/openjpeg/README_zh.md @@ -9,7 +9,6 @@ OpenJPEG 是用 C 语言编写的开源 JPEG 2000 编解码器。 - ROM版本:OpenHarmony3.2 beta1 - 三方库版本:v2.5.0 - 当前适配的功能:[JPEG 2000](https://jpeg.org/jpeg2000/) 图像编解码 -- License:[The 2-Clause BSD License](https://github.com/uclouvain/openjpeg/blob/v2.5.0/LICENSE) ## 集成方式 diff --git a/thirdparty/openssl/README_zh.md b/thirdparty/openssl/README_zh.md index 56b040ece4463d6f8ef6f533d3551f3dd76bac03..84f4f32c384bf7cb7c9773ced4514dda28299698 100755 --- a/thirdparty/openssl/README_zh.md +++ b/thirdparty/openssl/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 OpenSSL是一个强大的、商业级的、功能齐全的用于传输层安全(TLS)协议的开源工具包,以前称为安全套接字层(SSL)协议,应用程序可以使用这个包来进行安全通信,避免窃听,同时确认另一端连接者的身份。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:OpenSSL_1_1_1t - 当前适配的功能:支持openssl加密传输功能 -- [Apache License 2.0](https://github.com/openssl/openssl) #### Legalities A number of nations restrict the use or export of cryptography. If you are potentially subject to such restrictions, you should seek legal advice before attempting to develop or distribute cryptographic code. diff --git a/thirdparty/openssl/docs/hap_integrate.md b/thirdparty/openssl/docs/hap_integrate.md index cd1390d5e7c02e00bba4d65ad5504cdeba428f30..9e875032616fb3decb3377a61a538e7e456a2d16 100644 --- a/thirdparty/openssl/docs/hap_integrate.md +++ b/thirdparty/openssl/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/openssl #三方库openssl的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将openssl拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/openssl tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh openssl ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` openssl/arm64-v8a openssl/armeabi-v7a @@ -46,7 +43,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 -![thirdparty_install_dir](pic/openssl_install_dir.png) + ![thirdparty_install_dir](pic/openssl_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 @@ -56,13 +53,12 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/include) ``` - ![tinyxpath_usage](pic/openssl_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行make test 运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) -![tinyxpath_test](pic/openssl_test.png) + ![tinyxpath_test](pic/openssl_test.png) 32个用例是错误判定为误判,不同系统错误描述不同,实际为正常 diff --git a/thirdparty/openssl_quic/README_zh.md b/thirdparty/openssl_quic/README_zh.md index 03720bc7b7e23d57d70b3019848b416e43d01d31..b0c751d4d0c8a9b3e92fd5d15d267ae83352b275 100644 --- a/thirdparty/openssl_quic/README_zh.md +++ b/thirdparty/openssl_quic/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 openssl_quic是openssl加密库的一个分支用于启用quic。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:OpenSSL_1_1_1t-quic1 - 当前适配的功能:支持启动openssl quic -- [Apache License 2.0](https://github.com/quictls/openssl) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/openssl_quic/docs/hap_integrate.md b/thirdparty/openssl_quic/docs/hap_integrate.md index 9ff8c8cf0060c686dc5ef21142f5cc397461455f..26d8ea98d23b5373cad19cc37f45084dc7a92199 100644 --- a/thirdparty/openssl_quic/docs/hap_integrate.md +++ b/thirdparty/openssl_quic/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/openssl_quic #三方库openssl_quic的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将openssl_quic拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/openssl_quic tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh openssl_quic ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` openssl_quic/arm64-v8a openssl_quic/armeabi-v7a ``` @@ -54,7 +51,6 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl_quic/${OHOS_ARCH}/include) ``` - ![openssl_quic_usage](pic/openssl_quic_usage.jpg) ## 参考资料 - [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) diff --git a/thirdparty/opus/HPKBUILD b/thirdparty/opus/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..c5579bc081a3ae2cbb55760e3077b8c86246ec09 --- /dev/null +++ b/thirdparty/opus/HPKBUILD @@ -0,0 +1,69 @@ +# Contributor: shann +# Maintainer: shann +pkgname=opus +pkgver=v1.4 +pkgrel=0 +pkgdesc="OPUS is an open, royalty-free audio codec designed to provide high-fidelity audio transmission across various network environments." +url="https://opus-codec.org/" +archs=("armeabi-v7a" "arm64-v8a") +license=("BSD-licensed") +depends=() +makedepends=() + +source="https://downloads.xiph.org/releases/$pkgname/$pkgname-${pkgver:1}.tar.gz" + +autounpack=true +downloadpackage=true +buildtools="configure" + +builddir=$pkgname-${pkgver:1} +packagename=$builddir.tar.gz + +source envset.sh +host= +prepare() { + mkdir -p $builddir/$ARCH-build + if [ $ARCH == "armeabi-v7a" ]; then + setarm32ENV + host=arm-linux + elif [ $ARCH == "arm64-v8a" ]; then + setarm64ENV + host=aarch64-linux + else + echo "${ARCH} not support" + return -1 + fi +} + +build() { + cd $builddir/$ARCH-build + ../configure "$@" --host=$host --enable-test > `pwd`/build.log 2>&1 + make -j4 VERBOSE=1 >> `pwd`/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir + make -C $ARCH-build install >> `pwd`/$ARCH-build/build.log 2>&1 + cd $OLDPWD + if [ $ARCH == "armeabi-v7a" ]; then + unsetarm32ENV + elif [ $ARCH == "arm64-v8a" ]; then + unsetarm64ENV + else + echo "${ARCH} not support" + return -1 + fi +} + +check() { + echo "The test must be on an OpenHarmony device!" + #编译生成目录$ARCH-build下执行make check +} + +# 清理环境 +cleanbuild() { + rm -rf ${PWD}/$builddir #${PWD}/$packagename +} diff --git a/thirdparty/opus/SHA512SUM b/thirdparty/opus/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..e4d39328caf028042fd1d26b57d637b27af17386 --- /dev/null +++ b/thirdparty/opus/SHA512SUM @@ -0,0 +1 @@ +1ecd39e0add24de12823bf7c936bb67441228721e2cdae0edbfcf3cee0894bcc6edf2a1d0ca5cdfdad1565803bf39cc4c985ad32710c2a9582f850adeb5ca631 opus-1.4.tar.gz diff --git a/thirdparty/osip2/README_zh.md b/thirdparty/osip2/README_zh.md index 9910ce1bc50e01838276dffd9ab45f95be82e40c..a2e3286f8f0a96fb8170c5d6fa72bb7dc24db088 100644 --- a/thirdparty/osip2/README_zh.md +++ b/thirdparty/osip2/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 Osip2是一个开放源代码的sip协议栈,是开源代码中不多使用C语言写的协议栈之一,它具有短小简洁的特点,专注于sip底层解析使得它的效率比较高. ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:5.3.1 - 当前适配的功能:支持sip消息的解析和生成、头处理和会话管理等功能 -- [LGPL](http://www.gnu.org) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/osip2/docs/hap_integrate.md b/thirdparty/osip2/docs/hap_integrate.md index 28f48d2b5dd02cc20dcd24c16dfadc3b9db5ad9c..d997889f57e77c58800da19bc9859d573e3e4a1f 100644 --- a/thirdparty/osip2/docs/hap_integrate.md +++ b/thirdparty/osip2/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` wget https://ftp.gnu.org/gnu/osip/libosip2-5.3.1.tar.gz ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/osip2 #三方库osip2的目录结构如下 @@ -22,20 +23,16 @@ ├── README_zh.md ``` -- 将osip2拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/osip2 tools/main -rf - ``` -- 在tools目录下编译三方库 +- 在lycium目录下编译三方库 osip2库不需要依赖其它库,所以在build时只需要编译osip2库即可 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh osip2 ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` osip2/arm64-v8a osip2/armeabi-v7a ``` @@ -46,6 +43,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 +  ![thirdparty_install_dir](pic/osip2_install_dir.jpg) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -53,17 +51,15 @@ #将三方库加入工程中 target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libosip2/${OHOS_ARCH}/lib/libosip2.a ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libosip2/${OHOS_ARCH}/lib/libosipparser2.a) - + #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libosip2/${OHOS_ARCH}/include/osip2/ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libosip2/${OHOS_ARCH}/include/osipparser2/ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libosip2/${OHOS_ARCH}/include/osipparser2/headers) ``` - ![osip2_usage](pic/osip2_usage.jpg) - ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的可执行文件及生成的动态库准备好 diff --git a/thirdparty/p7zip/README_zh.md b/thirdparty/p7zip/README_zh.md index 889173175b857cfce73c4083525eba095879d26a..2d6e678902a2a0cba65f6bd53b30c08db5bfe5e4 100644 --- a/thirdparty/p7zip/README_zh.md +++ b/thirdparty/p7zip/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 p7zip 是一个功能齐全的压缩打包应用。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v17.05 - 当前适配的功能:文件压缩,解压,打包,解包 -- [ LGPL license](https://github.com/p7zip-project/p7zip) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/p7zip/docs/hap_integrate.md b/thirdparty/p7zip/docs/hap_integrate.md index b6575e4edfadeb2674ea3654d19fe6e440943822..daf359d4ffad1b0db00bf213d9c73250e37324e8 100755 --- a/thirdparty/p7zip/docs/hap_integrate.md +++ b/thirdparty/p7zip/docs/hap_integrate.md @@ -5,13 +5,14 @@ - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) - [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) - [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/p7zip #三方库p7zip的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将p7zip拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/p7zip tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh p7zip ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` p7zip/arm64-v8a p7zip/armeabi-v7a @@ -52,9 +49,7 @@ # p7zip原生比提供头文件,使用者需要自己声明头文件或者以动态加载的方式调用, 将三方库加入工程中 target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/7z.so) - ``` - ![p7zip_usage](pic/p7zip_usage.png) ## 参考资料 - [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) diff --git a/thirdparty/phf/README_zh.md b/thirdparty/phf/README_zh.md index 02c39d1aae6d5d326c37ba1005afc7a429e40ded..db14ce5921d34e361d385579f24188409d5ad87f 100644 --- a/thirdparty/phf/README_zh.md +++ b/thirdparty/phf/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 phf是实现完美hash算法的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:rel-20190215 - 当前适配的功能:支持完美hash算法 -- [MIT license](https://github.com/wahern/phf/blob/master/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/phf/docs/hap_integrate.md b/thirdparty/phf/docs/hap_integrate.md index 7b792b816eec4a6cdaa64eb9aa084142f60a53a3..16890d13e2c38d94a92bc21ab7fdce1e96cd17a3 100644 --- a/thirdparty/phf/docs/hap_integrate.md +++ b/thirdparty/phf/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将phf拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ``` - cd tpc_c_cplusplus - cp thirdparty/phf tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh phf ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` phf/arm64-v8a phf/armeabi-v7a @@ -58,10 +51,6 @@ ## 应用中使用三方库 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示: - -  ![thirdparty_install_dir](pic/phf_install_dir.png) - - 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录: @@ -72,11 +61,10 @@ ``` #将三方库加入工程中,phf是对应的三方库名 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/phf/${OHOS_ARCH}/lib/libphf.so) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libphf.so) #将三方库的头文件加入工程中,phf是对应的三方库名 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/phf/${OHOS_ARCH}/include) ``` - ![phf_usage](pic/phf_usage.png) ## 测试三方库 diff --git a/thirdparty/pixman/README_zh.md b/thirdparty/pixman/README_zh.md index 2b2d927baff7f920b8ce8631f714527e86d14a5d..c9f69ddd3cece5baa9b367dc87b06854c93603bf 100644 --- a/thirdparty/pixman/README_zh.md +++ b/thirdparty/pixman/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 Pixman是一个用于像素操作的低级软件库,提供图像合成和梯形光栅化等功能。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:0.42.2 - 当前适配的功能:像素操作,图像合成,光栅化 -- [ MIT license](http://www.pixman.org/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/pixman/docs/hap_integrate.md b/thirdparty/pixman/docs/hap_integrate.md index c17ea670711812c44297168ee2289c0a032574c3..1060a9d769f4f19e84ba03c286b74ca7826af23a 100755 --- a/thirdparty/pixman/docs/hap_integrate.md +++ b/thirdparty/pixman/docs/hap_integrate.md @@ -5,13 +5,14 @@ - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) - [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) - [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/pixman #三方库pixman的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将pixman拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/pixman tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh pixman ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` pixman/arm64-v8a pixman/armeabi-v7a @@ -51,14 +48,12 @@ ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libpixman-1.so.0) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libpixman-1.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/include/pixman/${OHOS_ARCH}) - ``` - ![pixman_usage](pic/pixman_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/pjsip/HPKBUILD b/thirdparty/pjsip/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..0c720e72f7845c40eadd30634755717521730b61 --- /dev/null +++ b/thirdparty/pjsip/HPKBUILD @@ -0,0 +1,86 @@ +# Contributor: shann +# Maintainer: shann +pkgname=pjsip +pkgver=2.13.1 +pkgrel=0 +pkgdesc="PJSIP is a free and open-source multimedia communication library that implements standards-based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. It integrates the signaling protocol SIP-based multimedia framework and NAT traversal capabilities into a high-level abstracted multimedia communication API." +url="https://www.pjsip.org/" +archs=("armeabi-v7a" "arm64-v8a") +license=("GPL" "OSS") +depends=("opus") +makedepends=() + +source="https://github.com/$pkgname/pjproject/archive/refs/tags/$pkgver.tar.gz" + +autounpack=true +downloadpackage=true +buildtools="configure" + +builddir=$pkgname-${pkgver} +packagename=$builddir.tar.gz +unpkgname=pjproject-2.13.1 +source envset.sh +host= + +patchflag=true + +prepare() { + if $patchflag + then + cd ${unpkgname} + # 修复pjmedia-test死循环问题,patch来自官网https://github.com/pjsip/pjproject/pull/3641/files + patch -p1 < ../pjsip_oh_pkg.patch + cd $OLDPWD + # patch只需要打一次,关闭打patch + patchflag=false + fi + + cp ${unpkgname} $pkgname-$ARCH-build -r + if [ $ARCH == "armeabi-v7a" ]; then + setarm32ENV + host=arm-linux + elif [ $ARCH == "arm64-v8a" ]; then + setarm64ENV + host=aarch64-linux + else + echo "${ARCH} not support" + return -1 + fi +} + +build() { + cd $pkgname-$ARCH-build + ./configure "$@" --host=$host LDFLAGS="${LDFLAGS} -L$LYCIUM_ROOT/usr/opus/$ARCH/lib" CFLAGS="${CFLAGS} -I$LYCIUM_ROOT/usr/opus/$ARCH/include" LD=$CXX --disable-libwebrtc > `pwd`/build.log 2>&1 + make dep >> `pwd`/build.log 2>&1 + make -j4 VERBOSE=1 >> `pwd`/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $pkgname-$ARCH-build + make install >> `pwd`/build.log 2>&1 + cd $OLDPWD +} + +check() { + if [ $ARCH == "armeabi-v7a" ]; then + unsetarm32ENV + elif [ $ARCH == "arm64-v8a" ]; then + unsetarm64ENV + else + echo "${ARCH} not support" + return -1 + fi + + # 屏蔽python相关测试项 + sed -i '104 s/pjsua-test/#pjsua-test/g' ./$pkgname-$ARCH-build/Makefile + echo "The test must be on an OpenHarmony device!" + # 编译生成目录$pkgname-$ARCH-build下执行make selftest +} + +# 清理环境 +cleanbuild() { + rm -rf ${PWD}/$pkgname-$ARCH-build ${PWD}/${unpkgname} +} diff --git a/thirdparty/pjsip/HPKCHECK b/thirdparty/pjsip/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..bf75fc8dc030614856fe43c0db102f3399482210 --- /dev/null +++ b/thirdparty/pjsip/HPKCHECK @@ -0,0 +1,15 @@ +# Contributor: shann +# Maintainer: shann + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $pkgname-$ARCH-build + make selftest > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} \ No newline at end of file diff --git a/thirdparty/pjsip/OAT.xml b/thirdparty/pjsip/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..46978c1c41f0eb625f821c0d7b8259e51cd30fdc --- /dev/null +++ b/thirdparty/pjsip/OAT.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/pjsip/README.OpenSource b/thirdparty/pjsip/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..e6eba0c6a78da50661faf98d364775ecdc33edc9 --- /dev/null +++ b/thirdparty/pjsip/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "pjsip", + "License": "GPL" "OSS", + "License File": "https://www.pjsip.org/licensing.htm", + "Version Number": "2.13.1", + "Owner": "swkec@isoftstone.com", + "Upstream URL": "https://github.com/pjsip/pjproject/archive/refs/tags/2.13.1.tar.gz", + "Description": "pjsip is a free and open-source multimedia communication library that implements standards-based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. It integrates the signaling protocol SIP-based multimedia framework and NAT traversal capabilities into a high-level abstracted multimedia communication API." + } +] diff --git a/thirdparty/pjsip/README_zh.md b/thirdparty/pjsip/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..10269b65ca6cb16d4140bfe51980fea0874d21e0 --- /dev/null +++ b/thirdparty/pjsip/README_zh.md @@ -0,0 +1,11 @@ +# pjsip三方库说明 +## 功能简介 +pjsip是一个免费的开源多媒体通信库,以C语言编写,实现了基于标准的协议,如SIP、SDP、RTP、STUN、TURN和ICE。它将信令协议(SIP)与丰富的多媒体框架和NAT穿透功能相结合,形成高级API. +## 使用约束 +- IDE版本:DevEco Studio 3.1 Beta2 +- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- 三方库版本:2.13.1 +- 当前适配的功能:实现了基于标准的协议,如SIP、SDP、RTP、STUN、TURN和ICE. + +## 集成方式 ++ [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/pjsip/SHA512SUM b/thirdparty/pjsip/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..7d54dcb21c6162de5b08b47dc7b88d772104df3a --- /dev/null +++ b/thirdparty/pjsip/SHA512SUM @@ -0,0 +1 @@ +1cdfaedafa2f42b306eef38174530163db19952c6842d5c96324c7439e2437a17cd96670ac58ae04da221b06d7eb91d612f4347cd421e036be62b27cb9501cda pjsip-2.13.1.tar.gz diff --git a/thirdparty/pjsip/docs/hap_integrate.md b/thirdparty/pjsip/docs/hap_integrate.md new file mode 100644 index 0000000000000000000000000000000000000000..7454c12a2fd7cff2c84b8e2e9df306082bcafc74 --- /dev/null +++ b/thirdparty/pjsip/docs/hap_integrate.md @@ -0,0 +1,131 @@ +# pjsip集成到应用hap +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 +## 开发环境 +- ubuntu20.04 +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) +- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) +- [准备三方库构建环境](../../../lycium/README.md#编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#ci环境准备) +## 编译三方库 +- 下载本仓库 + ``` + wget https://github.com/pjsip/pjproject/archive/refs/tags/2.13.1.tar.gz + ``` +- 三方库目录结构 + ``` + tpc_c_cplusplus/thirdparty/pjsip #三方库pjsip的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── SHA512SUM #三方库校验文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md + ``` + +- 进入lycium目录下 + ``` + cd tpc_c_cplusplus/lycium + ``` +- 在lycium目录下编译三方库 + pjsip库需要依赖opus库,所以在build时需要编译pjsip库和opus库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#编译环境准备) + ``` + ./build.sh pjsip (默认编译依赖库) + ``` +- 三方库头文件及生成的库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + ``` + pjsip/arm64-v8a pjsip/armeabi-v7a + opus/arm64-v8a opus/armeabi-v7a + ``` + +- [测试三方库](#测试三方库) + +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 + + ![thirdparty_install_dir](pic/pjsip_install_dir.jpg) + +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + ``` + #将三方库加入工程中 + if(${OHOS_ARCH} STREQUAL "arm64-v8a") + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/opus/${OHOS_ARCH}/lib/libopus.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libg7221codec-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libgsmcodec-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libilbccodec-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpj-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjlib-util-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjmedia-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjmedia-audiodev-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjmedia-codec-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjmedia-videodev-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjnath-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjsip-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjsip-simple-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjsip-ua-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjsua-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjsua2-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libresample-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libspeex-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libsrtp-aarch64-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libyuv-aarch64-unknown-linux-gnu.a) + else() + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/opus/${OHOS_ARCH}/lib/libopus.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libg7221codec-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libgsmcodec-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libilbccodec-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpj-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjlib-util-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjmedia-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjmedia-audiodev-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjmedia-codec-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjmedia-videodev-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjnath-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjsip-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjsip-simple-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjsip-ua-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjsua-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libpjsua2-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libresample-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libspeex-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libsrtp-arm-unknown-linux-gnu.a + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/lib/libyuv-arm-unknown-linux-gnu.a) + endif() + + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/opus/${OHOS_ARCH}/include/opus/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pj/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pj/compat/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pj++/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pjlib-util/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pjmedia/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pjmedia-audiodev/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pjmedia-codec/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pjmedia-videodev/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pjnath/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pjsip/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pjsip-simple/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pjsip-ua/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pjsua2/ + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pjsip/${OHOS_ARCH}/include/pjsua-lib/) + ``` + + ![pjsip_usage](pic/pjsip_usage.jpg) + +## 测试三方库 +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#ci环境准备) + +- 将编译生成的可执行文件及生成的动态库准备好 + +- 将准备好的文件推送到开发板,进入到构建的目录pjsip-arm64-v8a-build(32位在pjsip-armeabi-v7a-build)下执行make selftest + + ![pjsip_test](pic/pjsip_test.jpg) + +## 参考资料 +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md) diff --git a/thirdparty/pjsip/docs/pic/pjsip_install_dir.jpg b/thirdparty/pjsip/docs/pic/pjsip_install_dir.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0e556ce29c28a18431c037df21398b9ba7c6cc30 Binary files /dev/null and b/thirdparty/pjsip/docs/pic/pjsip_install_dir.jpg differ diff --git a/thirdparty/pjsip/docs/pic/pjsip_test.jpg b/thirdparty/pjsip/docs/pic/pjsip_test.jpg new file mode 100644 index 0000000000000000000000000000000000000000..026bfce59c9b5a2f2ea32295558f2effda372b1a Binary files /dev/null and b/thirdparty/pjsip/docs/pic/pjsip_test.jpg differ diff --git a/thirdparty/pjsip/docs/pic/pjsip_usage.jpg b/thirdparty/pjsip/docs/pic/pjsip_usage.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d9573acda1dba37fb489376fc3fe7ba92e61248c Binary files /dev/null and b/thirdparty/pjsip/docs/pic/pjsip_usage.jpg differ diff --git a/thirdparty/pjsip/pjsip_oh_pkg.patch b/thirdparty/pjsip/pjsip_oh_pkg.patch new file mode 100644 index 0000000000000000000000000000000000000000..9c130ecf2540d83cb2f7914de6f5070134150cf8 --- /dev/null +++ b/thirdparty/pjsip/pjsip_oh_pkg.patch @@ -0,0 +1,27 @@ +*** pjproject-2.13.1_old/pjmedia/src/pjmedia/wsola.c +--- pjproject-2.13.1/pjmedia/src/pjmedia/wsola.c +*************** +*** 634,639 +- +- start = find_pitch(templ, +- templ - wsola->expand_sr_max_dist, +- templ - wsola->expand_sr_min_dist, +- wsola->templ_size, +- 1); +--- 634,642 ----- ++ if ((wsola->options & PJMEDIA_WSOLA_NO_PLC) == 0) { ++ start = find_pitch(templ, ++ templ - wsola->expand_sr_max_dist, ++ templ - wsola->expand_sr_min_dist, ++ wsola->templ_size, ++ 1); ++ } else { ++ start = PJ_MAX(templ - needed + generated, reg1); ++ } +*** pjproject-2.13.1_old/pjmedia/src/test/mips_test.c +--- pjproject-2.13.1/pjmedia/src/test/mips_test.c +*************** +*** 1025 +- if ((pj_rand() % 100) > wp->loss_pct) { +--- 1025 ----- ++ if ((pj_rand() % 100) >= wp->loss_pct) { diff --git a/thirdparty/protobuf/README_zh.md b/thirdparty/protobuf/README_zh.md index e8653e6d2280248bb17e27b3688bb9b9015a4822..881333453c7c174bb6183ae60b6f11c553d90136 100644 --- a/thirdparty/protobuf/README_zh.md +++ b/thirdparty/protobuf/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 protobuf是Google提供的一套数据的序列化框架。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v4.23.2 - 当前适配的功能:提供数据的序列化框架 -- [BSD-3-Clause license](https://github.com/protocolbuffers/protobuf/blob/main/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) \ No newline at end of file diff --git a/thirdparty/protobuf/docs/hap_integrate.md b/thirdparty/protobuf/docs/hap_integrate.md index d0df96f9055a6dca94c15e432370287daa055e1b..9363faedadb5c3f76dad2f1f84b2690c00d6617e 100644 --- a/thirdparty/protobuf/docs/hap_integrate.md +++ b/thirdparty/protobuf/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,29 +30,23 @@ ├── README_zh.md ``` -- 将protobuf拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/protobuf tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh protobuf ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell protobuf/arm64-v8a protobuf/armeabi-v7a ``` + - [测试三方库](#测试三方库) ## 应用中使用三方库 @@ -60,7 +54,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示   - ![thirdparty_install_dir](pic/protobuf_install_dir.png) +  ![thirdparty_install_dir](pic/protobuf_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -75,11 +69,10 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/protobuf/${OHOS_ARCH}/include) ``` - ![protobuf_usage](pic/protobuf_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行如下命令ctest(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/protobuf_v3.6.1/HPKBUILD b/thirdparty/protobuf_v3.6.1/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..dcac41e1897507dfda061048cd277d4c3d4d2eee --- /dev/null +++ b/thirdparty/protobuf_v3.6.1/HPKBUILD @@ -0,0 +1,98 @@ +# Contributor: Chen Xu +# Maintainer: Chen Xu +pkgname=protobuf_v3.6.1 +pkgver=v3.6.1 +pkgrel=0 +pkgdesc="Protocol Buffers (a.k.a., protobuf) are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data." +url="https://github.com/protocolbuffers/protobuf" +archs=("armeabi-v7a" "arm64-v8a") +license=("Copyright 2008 Google Inc") +depends=("abseil-cpp" "zlib" "googletest") +makedepends=() +source="https://github.com/protocolbuffers/${pkgname:0:8}/archive/refs/tags/$pkgver.tar.gz" + +autounpack=true +downloadpackage=true +buildhostprotoc=true +patchflag=true + +builddir=${pkgname:0:8}-${pkgver:1} +packagename=$builddir.tar.gz +PATH_BAK= + +prepare() { + if $patchflag + then + cd $builddir + # 支持c++14宏定义 + patch -p1 < `pwd`/../protobuf-v3.6.1_oh_pkg.patch + # patch只需要打一次,关闭打patch + patchflag=false + cd $OLDPWD + fi + if $buildhostprotoc + then + mkdir -p $builddir/third_party/abseil-cpp/ + tar -zxf $LYCIUM_ROOT/main/abseil-cpp/abseil-cpp*.tar.gz -C $builddir/third_party/abseil-cpp + mv $builddir/third_party/abseil-cpp/abseil-cpp-*/* $builddir/third_party/abseil-cpp/ + + mkdir -p $builddir/third_party/googletest/ + tar -zxf $LYCIUM_ROOT/main/googletest/googletest*.tar.gz -C $builddir/third_party/googletest + mv $builddir/third_party/googletest/googletest-*/* $builddir/third_party/googletest/ + + cp -rf $builddir $builddir-host-build + cd $builddir-host-build/cmake + cmake . -L -Dprotobuf_BUILD_TESTS=OFF > `pwd`/build.log 2>&1 + make VERBOSE=1 -j4 >> `pwd`/build.log 2>&1 + buildhostprotoc=false + cd ../.. + fi + cp -rf $builddir $builddir-$ARCH-build + PATH_BAK=$PATH +} + + +build() { + cd $builddir-$ARCH-build/cmake + ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -Dprotobuf_WITH_ZLIB=ON -Dprotobuf_BUILD_TESTS=ON \ + -DOHOS_ARCH=$ARCH -B./ -S./ -L -DCMAKE_CXX_FLAGS="-munaligned-access" >> `pwd`/build.log 2>&1 + export PATH=`pwd`/../../$builddir-host-build/cmake/:$PATH + make VERBOSE=1 -j4 >> `pwd`/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir-$ARCH-build/cmake + make install VERBOSE=1 >> `pwd`/build.log 2>&1 + cd $OLDPWD +} + +check() { + echo "The test must be on an OpenHarmony device!" + if [ $ARCH == "armeabi-v7a" ] + then + cp ${OHOS_SDK}/native/llvm/lib/arm-linux-ohos/libc++_shared.so $builddir-$ARCH-build/cmake/ + elif [ $ARCH == "arm64-v8a" ] + then + cp ${OHOS_SDK}/native/llvm/lib/aarch64-linux-ohos/libc++_shared.so $builddir-$ARCH-build/cmake/ + else + echo "The platform is not supported" + fi + + export PATH=$PATH_BAK + unset PATH_BAK + # 需要拷贝libz.so.1 libc++_shared.so + # mount -o remount,rw / + # cd /data/local/tmp/lycium/main/protobuf_v3.6.1/protobuf-3.6.1-arm64-v8a-build/cmake + # export LD_LIBRARY_PATH=/data/local/tmp/lycium/usr/zlib/arm64-v8a/lib:$LD_LIBRARY_PATH + # ./lite-arena-test + # ./lite-test + # ./tests +} + +# 清理环境 +cleanbuild() { + rm -rf ${PWD}/$builddir ${PWD}/$builddir-host-build ${PWD}/$builddir-armeabi-v7a-build ${PWD}/$builddir-arm64-v8a-build #${PWD}/$packagename +} diff --git a/thirdparty/protobuf_v3.6.1/HPKCHECK b/thirdparty/protobuf_v3.6.1/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..cf93b1bf2477f34cb3858ce759668f4330e328a0 --- /dev/null +++ b/thirdparty/protobuf_v3.6.1/HPKCHECK @@ -0,0 +1,32 @@ +# Contributor: Chen Xu +# Maintainer: Chen Xu + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log +OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH + +checkprepare() { + export LD_LIBRARY_PATH=`pwd`/$builddir-$ARCH-build/cmake:$LD_LIBRARY_PATH +} + +openharmonycheck() { + res=0 + cd $builddir-$ARCH-build/cmake + ./lite-arena-test > ${logfile} 2>&1 + res=$? + if [ $res -eq 0 ] + then + ./lite-test >> ${logfile} 2>&1 + res=$? + fi + if [ $res -eq 0 ] + then + ./tests >> ${logfile} 2>&1 + res=$? + fi + + export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH + unset OLD_LD_LIBRARY_PATH + cd $OLDPWD + return $res +} diff --git a/thirdparty/protobuf_v3.6.1/OAT.xml b/thirdparty/protobuf_v3.6.1/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..59b89c6535b6c4ce513410a7645a51ddf2d48abd --- /dev/null +++ b/thirdparty/protobuf_v3.6.1/OAT.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/thirdparty/protobuf_v3.6.1/README.OpenSource b/thirdparty/protobuf_v3.6.1/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..4ed5d012db6ba9e13ceba65235649f0589e4770f --- /dev/null +++ b/thirdparty/protobuf_v3.6.1/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "protobuf_v3.6.1", + "License": "MIT License", + "License File": "LICENSE", + "Version Number": "v3.6.1", + "Owner": "chenxu.unix@gmail.com", + "Upstream URL": "https://github.com/protocolbuffers/protobuf.git", + "Description": "Protocol Buffers (a.k.a., protobuf) are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data." + } +] diff --git a/thirdparty/protobuf_v3.6.1/README_zh.md b/thirdparty/protobuf_v3.6.1/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..8c1bc937aaeb34d199dcb1289cb0e5062332c337 --- /dev/null +++ b/thirdparty/protobuf_v3.6.1/README_zh.md @@ -0,0 +1,11 @@ +# protobuf_v3.6.1三方库说明 +## 功能简介 +protobuf_v3.6.1为lua提供AMF二进制格式数据编解码功能。 +## 使用约束 +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) +- 三方库版本:v3.6.1 +- 当前适配的功能:Protocol Buffers(又名protobuf)是Google的多语言兼容, 用于序列化结构化数据且与平台无关的可扩展机制。 + +## 集成方式 ++ [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/protobuf_v3.6.1/SHA512SUM b/thirdparty/protobuf_v3.6.1/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..a5b4cf1c7399053f375332d15ecdd555e898c318 --- /dev/null +++ b/thirdparty/protobuf_v3.6.1/SHA512SUM @@ -0,0 +1 @@ +1bc175d24b49de1b1e41eaf39598194e583afffb924c86c8d2e569d935af21874be76b2cbd4d9655a1d38bac3d4cd811de88bc2c72d81bad79115e69e5b0d839 protobuf_v3.6.1-3.6.1.tar.gz diff --git a/thirdparty/protobuf_v3.6.1/docs/hap_integrate.md b/thirdparty/protobuf_v3.6.1/docs/hap_integrate.md new file mode 100644 index 0000000000000000000000000000000000000000..041887b693fb99bb9d3a13e21ef89667d3aa12f7 --- /dev/null +++ b/thirdparty/protobuf_v3.6.1/docs/hap_integrate.md @@ -0,0 +1,81 @@ +# protobuf_v3.6.1集成到应用hap +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 +## 开发环境 +- ubuntu20.04 +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) +- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../tools/README.md#编译环境准备) +- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +## 编译三方库 +- 下载本仓库 + ``` + git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 + ``` +- 三方库目录结构 + ``` + tpc_c_cplusplus/thirdparty/protobuf_v3.6.1 #三方库protobuf_v3.6.1的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── SHA512SUM #三方库校验文件 + ├── OAT.xml #OAT文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md + ``` + +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#编译环境准备) + + ``` + cd lycium + ./build.sh protobuf_v3.6.1 + ``` +- 三方库头文件及生成的库 + 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + ``` + protobuf_v3.6.1/armeabi-v7a protobuf_v3.6.1/arm64-v8a + ``` + +- [测试三方库](#测试三方库) + +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库头文件拷贝到该目录下, 如下图所示 + ![thirdparty_install_dir](pic/screen_cut.jpg) + +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + ``` + #将三方库加入工程中 + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libz.so) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libprotobuf.a) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libprotoc.a) + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/protobuf_v3.6.1/${OHOS_ARCH}/include + ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/${OHOS_ARCH}/include) + ``` + +## 测试三方库 +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) + +- 进入到构建目录,执行如下命令(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) +注意:以下为64位命令,如需测试32位,请将arm64-v8a替换为armeabi-v7a。 +``` +mount -o remount,rw / +export LD_LIBRARY_PATH=${BUILD_PATH}/usr/zlib/arm64-v8a/lib:$LD_LIBRARY_PATH +cd ${BUILD_PATH}/main/protobuf_v3.6.1/protobuf-3.6.1-arm64-v8a-build/cmake +./lite-arena-test +./lite-test +./tests +``` +注意:上述BUILD_PATH变量为编译路径,需自行修改为正确的路径 + +测试用例运行结果如下: + + ![protobuf_v3.6.1_test](pic/run_screen_cut.jpg) + +## 参考资料 +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md) diff --git a/thirdparty/protobuf_v3.6.1/docs/pic/run_screen_cut.jpg b/thirdparty/protobuf_v3.6.1/docs/pic/run_screen_cut.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b3d6017f4e4e07bcff69db1470699f0d3f34259c Binary files /dev/null and b/thirdparty/protobuf_v3.6.1/docs/pic/run_screen_cut.jpg differ diff --git a/thirdparty/protobuf_v3.6.1/docs/pic/screen_cut.jpg b/thirdparty/protobuf_v3.6.1/docs/pic/screen_cut.jpg new file mode 100755 index 0000000000000000000000000000000000000000..64025ccc083efd1d970b730c30a5f385b3364c7e Binary files /dev/null and b/thirdparty/protobuf_v3.6.1/docs/pic/screen_cut.jpg differ diff --git a/thirdparty/protobuf_v3.6.1/protobuf-v3.6.1_oh_pkg.patch b/thirdparty/protobuf_v3.6.1/protobuf-v3.6.1_oh_pkg.patch new file mode 100644 index 0000000000000000000000000000000000000000..6393cca75ecc0bf0d0711fb607ce99b5a7d73b96 --- /dev/null +++ b/thirdparty/protobuf_v3.6.1/protobuf-v3.6.1_oh_pkg.patch @@ -0,0 +1,17 @@ +diff -Nur protobuf-3.6.1/cmake/CMakeLists.txt protobuf-3.6.1_patch/cmake/CMakeLists.txt +--- protobuf-3.6.1/cmake/CMakeLists.txt 2018-07-28 04:30:28.000000000 +0800 ++++ protobuf-3.6.1_patch/cmake/CMakeLists.txt 2023-07-14 10:11:53.661304913 +0800 +@@ -15,11 +15,11 @@ + # Project + project(protobuf C CXX) + +-# Add c++11 flags ++# Add c++14 flags + if (CYGWIN) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") + else() +- set(CMAKE_CXX_STANDARD 11) ++ set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + endif() diff --git a/thirdparty/pugixml/README_zh.md b/thirdparty/pugixml/README_zh.md index 8edca4005eb068f65c126a18a3fc4a674a262f5e..6aa0aabff1509233b10ad5e5aac08262ef41a48a 100755 --- a/thirdparty/pugixml/README_zh.md +++ b/thirdparty/pugixml/README_zh.md @@ -6,11 +6,10 @@ pugixml是一个C++XML处理库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.13 - 当前适配的功能:支持xml文件解析 -- [MIT License](https://github.com/zeux/pugixml/blob/master/LICENSE.md) ## 集成方式 diff --git a/thirdparty/pugixml/docs/hap_integrate.md b/thirdparty/pugixml/docs/hap_integrate.md index 33037deed55ff33e3f59e51eebb4c3b56f0780ff..368822c3a3c27f8eac416739faa2f4af68b1c79a 100755 --- a/thirdparty/pugixml/docs/hap_integrate.md +++ b/thirdparty/pugixml/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将pugixml拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/pugixml tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh pugixml ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell pugixml/arm64-v8a pugixml/armeabi-v7a @@ -73,11 +66,10 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pugixml/${OHOS_ARCH}/include) ``` - ![pugixml_usage](../../thirdparty_template/docs/pic/xxx_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/pupnp/README_zh.md b/thirdparty/pupnp/README_zh.md index 9df3c8eb42274b31f7254a65d2e4a096e136c125..11d9d59a9de6f7b8223a5be97980decd8b14e7a5 100644 --- a/thirdparty/pupnp/README_zh.md +++ b/thirdparty/pupnp/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 pupnp是提供UPnP协议能力的三方库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.0.12 - 当前适配的功能:支持Upnp协议能力 -- [LGPL-2.1 license](https://github.com/pupnp/pupnp/blob/branch-1.14.x/COPYING) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/pupnp/docs/hap_integrate.md b/thirdparty/pupnp/docs/hap_integrate.md index 568eb0b3dc08f3b9721b4444a99bc9c8dfafea67..ccc42e909b30c11b78947cf8765e5a197bc52b66 100644 --- a/thirdparty/pupnp/docs/hap_integrate.md +++ b/thirdparty/pupnp/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将pupnp拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ``` - cd tpc_c_cplusplus - cp thirdparty/pupnp tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh pupnp ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` pupnp/arm64-v8a pupnp/armeabi-v7a @@ -58,30 +51,22 @@ ## 应用中使用三方库 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示: +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示:  ![thirdparty_install_dir](pic/pupnp_install_dir.png) -- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: - - 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录: - -  ![thirdparty_install_dir](pic/pupnp_install_dir2.png) - - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句: ``` #将三方库加入工程中,libupnp.so.17是对应的三方库名,libupnp.so.17依赖ibixml.so.11,所以也要添加 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pupnp/${OHOS_ARCH}/lib/libixml.so.11) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pupnp/${OHOS_ARCH}/lib/libupnp.so.17) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pupnp/${OHOS_ARCH}/lib/libupnp.so) #将三方库的头文件加入工程中,pupnp是对应的三方库名 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pupnp/${OHOS_ARCH}/include) ``` - ![pupnp_usage](pic/pupnp_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/pupnp/docs/pic/pupnp_install_dir.png b/thirdparty/pupnp/docs/pic/pupnp_install_dir.png index ffecdd54a3e3d8f51c1e681e3bb4351b01358ba2..5dfbcb7d1f6999b79f6bbef8eb56ccc805e56639 100644 Binary files a/thirdparty/pupnp/docs/pic/pupnp_install_dir.png and b/thirdparty/pupnp/docs/pic/pupnp_install_dir.png differ diff --git a/thirdparty/rapidjson/README_zh.md b/thirdparty/rapidjson/README_zh.md index 8d1ca9cd34338c7f493916b46f6f304777da7320..901a9a72764e4c14b1df766a24e283cf8bb47110 100644 --- a/thirdparty/rapidjson/README_zh.md +++ b/thirdparty/rapidjson/README_zh.md @@ -5,6 +5,5 @@ RapidJson是一个跨平台的c++的json的解析器和生成器。 - ROM版本:OpenHarmony-v3.2-Beta1 - 三方库版本:v1.1.0 - 当前适配的功能:支持json数据的解析和生成。 -- [MIT license](https://github.com/Tencent/rapidjson/blob/master/license.txt) ## 集成方式 + [系统Rom包集成](docs/rom_integrate.md) diff --git a/thirdparty/snappy/HPKBUILD b/thirdparty/snappy/HPKBUILD index e67538495db32c69d851a3c75ff8fddf5c9dfc6b..2f7a19f9220364131ba46af3196bf3c9b6aa52cd 100644 --- a/thirdparty/snappy/HPKBUILD +++ b/thirdparty/snappy/HPKBUILD @@ -9,41 +9,64 @@ archs=("armeabi-v7a" "arm64-v8a") license=("snappy license") depends=() makedepends=() -source="https://github.com/google/$pkgname/archive/refs/tags/$pkgver.tar.gz" +source="https://github.com/google/snappy.git" downloadpackage=false autounpack=false builddir=$pkgname-$pkgver -packagename=$builddir.tar.gz +cloneflag=true # 第一次下载成功标记为true,防止第二次下载 prepare() { - git clone https://github.com/google/snappy.git $builddir - cd $builddir - git checkout $pkgver - git submodule update --init + if $cloneflag + then + git clone $source $builddir + ret=$? + if [ $ret -ne 0 ]; then + echo "fail: git clone $source $builddir $ret" + return $ret + fi + + cd $builddir + git checkout -b $pkgver $pkgver + ret=$? + if [ $ret -ne 0 ]; then + echo "fail: git checkout $pkgver $ret" + return $ret + fi + + git submodule update --init + ret=$? + if [ $ret -ne 0 ]; then + echo "fail: git submodule update --init $ret" + return $ret + fi + cd $OLDPWD + cloneflag=false + fi + mkdir -p $builddir/$ARCH-build } build() { - cd $builddir - mkdir -p $ARCH-build - ${OHOS_SDK}/native/build-tools/cmake/bin/cmake -DCMAKE_CXX_FLAGS="-w" "$@" ./ -B$ARCH-build -DOHOS_ARCH=$ARCH > $ARCH-build/build.log 2>&1 - make -j4 -C $ARCH-build >> $ARCH-build/build.log 2>&1 + cd $builddir + ${OHOS_SDK}/native/build-tools/cmake/bin/cmake -DCMAKE_CXX_FLAGS="-w" "$@" -S./ \ + -B$ARCH-build -DOHOS_ARCH=$ARCH > $ARCH-build/build.log 2>&1 + make VERBOSE=1 -j4 -C $ARCH-build >> $ARCH-build/build.log 2>&1 ret=$? cd $OLDPWD return $ret } package() { - cd "$builddir" + cd $builddir make -C $ARCH-build install >> `pwd`/$ARCH-build/build.log 2>&1 cd $OLDPWD } check() { echo "The test must be on an OpenHarmony device!" - #cd $ARCH-build - #ctest + # 进入编译目录 + # ctest } cleanbuild() { diff --git a/thirdparty/snappy/HPKCHECK b/thirdparty/snappy/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..d557b6fffbf59baa301a19b6f5a646e1a45c748f --- /dev/null +++ b/thirdparty/snappy/HPKCHECK @@ -0,0 +1,21 @@ +#Contributor: liucheng <1596268623@qq.com> +#Maintainer: liucheng <1596268623@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + + +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + ctest > ${logfile} 2>&1 + res=$? + if [ $res -ne 0 ] + then + mkdir ${LYCIUM_FAULT_PATH}/${pkgname} + cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/ + fi + cd $OLDPWD + + return $res +} diff --git a/thirdparty/snappy/docs/hap_integrate.md b/thirdparty/snappy/docs/hap_integrate.md index 1b7fc212a356c1d62728d3cec9171241b2b4927c..f7121c45b3b8b9e4ec24fe49375419578989ae30 100644 --- a/thirdparty/snappy/docs/hap_integrate.md +++ b/thirdparty/snappy/docs/hap_integrate.md @@ -24,20 +24,14 @@ ├── README_zh.md ``` -- 将三方库拷贝至tools/main目录下 - ```shell - cd tpc_c_cplusplus - mkdir tools/main - cp thirdparty/snappy tools/main -rf - ``` -- 在tools目录下编译三方库 +- 在lycium目录下编译三方库 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) ``` - cd tools - bash ./build.sh snappy + cd lycium + ./build.sh snappy ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库和头文件 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库和头文件 ``` snappy/arm64-v8a snappy/armeabi-v7a diff --git a/thirdparty/sonic/README_zh.md b/thirdparty/sonic/README_zh.md index bebd90b6e3249d8e58fd454d18313f91ed2d5285..4e570ad1f41b4220d6e3e5369be6b91a99bcbe89 100644 --- a/thirdparty/sonic/README_zh.md +++ b/thirdparty/sonic/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 sonic是一种用于加速或减慢音频算法的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:release-0.2.0 - 当前适配的功能:支持音频变速 -- [Apache License 2.0](https://github.com/waywardgeek/sonic) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/sonic/docs/hap_integrate.md b/thirdparty/sonic/docs/hap_integrate.md index 32122943b852e451c1732b41430936769e6be33c..eb786bc2635210489eb3ea827eb89a2a68328aa9 100644 --- a/thirdparty/sonic/docs/hap_integrate.md +++ b/thirdparty/sonic/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/sonic #三方库sonic的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将sonic拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/sonic tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh sonic ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` sonic/arm64-v8a sonic/armeabi-v7a ``` @@ -49,13 +46,12 @@ - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libsonic.so.0) + target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libsonic.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/sonic/${OHOS_ARCH}/include) ``` - ![sonic_usage](pic/sonic_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的sonic可执行文件及音频素材sonic.wav准备好,备注:sonic.wav素材在source目录下,输出结果在out目录下 diff --git a/thirdparty/sonic/docs/pic/sonic_install_dir.jpg b/thirdparty/sonic/docs/pic/sonic_install_dir.jpg index ed9c781c76d123861d35d4a188a84666d755f2c0..d89a5dd70fe5c801aca1ca1e69d329721c149581 100644 Binary files a/thirdparty/sonic/docs/pic/sonic_install_dir.jpg and b/thirdparty/sonic/docs/pic/sonic_install_dir.jpg differ diff --git a/thirdparty/soundtouch/README_zh.md b/thirdparty/soundtouch/README_zh.md index c9411a4181da88cc7d9efb4a1078d19e02cf28ad..cc3494a1e43a9055b6c09268d5b0ffc10c04680c 100644 --- a/thirdparty/soundtouch/README_zh.md +++ b/thirdparty/soundtouch/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 soundtouch是一个提供音频变速变调能力的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:2.3.2 - 当前适配的功能:音频变速变调能力 -- [LGPLv2.1](https://www.surina.net/soundtouch/download.html) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/soundtouch/docs/hap_integrate.md b/thirdparty/soundtouch/docs/hap_integrate.md index 5011a7dc40b5c60ab47b827a62e2abbc24efed32..d84a684084de2e76ba88ad89f2cde3142220bc18 100644 --- a/thirdparty/soundtouch/docs/hap_integrate.md +++ b/thirdparty/soundtouch/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/soundtouch #三方库soundtouch的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将soundtouch拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/soundtouch tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh soundtouch ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` soundtouch/arm64-v8a soundtouch/armeabi-v7a ``` @@ -52,9 +49,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/soundtouch/${OHOS_ARCH}/include) ``` - ![soundtouch_usage](pic/soundtouch_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的soundstretch可执行文件及音频测试文件soundtouch.wav准备好,备注:音频素材放在source目录下,最终结果放在out目录下 diff --git a/thirdparty/soxr/HPKCHECK b/thirdparty/soxr/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..ab7a22d316f72f532b63f52842f4d012a64ad2d9 --- /dev/null +++ b/thirdparty/soxr/HPKCHECK @@ -0,0 +1,118 @@ +# Contributor: tangshaoteng +# Maintainer: tangshaoteng + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir/$ARCH-build/examples + mkdir ${LYCIUM__MANUAL_CONFIRM_PATH}/${pkgname} + + # 测试项1 + ./1-single-block 44100 48000 > ${logfile} 2>&1 + res=$? + if [ $res -ne 0 ] + then + echo "1-single-block test failed" >> ${logfile} 2>&1 + cd $OLDPWD + return $res + fi + + # 测试项2 + ./1a-lsr 44100 48000 >> ${logfile} 2>&1 + res=$? + if [ $res -ne 0 ] + then + echo "1a-lsr test failed" >> ${logfile} 2>&1 + cd $OLDPWD + return $res + fi + + # 测试项3 + test_file="../../../bootsound_1ch.raw" + if [ ! -f $test_file ] + then + echo "the file $test_file does not exist" >> ${logfile} 2>&1 + cd $OLDPWD + return -1; + fi + cat $test_file | ./2-stream 44100 48000 1> test2_dst.raw 2>> ${logfile} + return_codes=(${PIPESTATUS[*]}) + if [ "${return_codes[0]}" -ne 0 ]; then + echo "read or write file filed in 2-stream test" >> ${logfile} 2>&1 + res=${return_codes[0]} + cd $OLDPWD + return $res + fi + if [ "${return_codes[1]}" -ne 0 ]; then + echo "2-stream test filed" >> ${logfile} 2>&1 + res=${return_codes[1]} + cd $OLDPWD + return $res + fi + cp test2_dst.raw ${LYCIUM__MANUAL_CONFIRM_PATH}/${pkgname}/ + + # 测试项4 + test_file="../../../bootsound_2ch.raw" + if [ ! -f $test_file ] + then + echo "the file $test_file does not exist" >> ${logfile} 2>&1 + cd $OLDPWD + return -1; + fi + cat $test_file | ./3-options-input-fn 44100 48000 2 1>> test3_dst.raw 2>> ${logfile} + return_codes=(${PIPESTATUS[*]}) + if [ "${return_codes[0]}" -ne 0 ]; then + echo "read or write file filed in 3-options-input-fn test" >> ${logfile} 2>&1 + res=${return_codes[0]} + cd $OLDPWD + return $res + fi + if [ "${return_codes[1]}" -ne 0 ]; then + echo "3-options-input-fn test filed" >> ${logfile} 2>&1 + res=${return_codes[1]} + cd $OLDPWD + return $res + fi + cp test3_dst.raw ${LYCIUM__MANUAL_CONFIRM_PATH}/${pkgname}/ + + # 测试项5 + test_file="../../../bootsound_2ch.raw" + if [ ! -f $test_file ] + then + echo "the file $test_file does not exist" >> ${logfile} 2>&1 + cd $OLDPWD + return -1; + fi + cat $test_file | ./4-split-channels 44100 48000 2 0 4 1> test4_dst.raw 2>> ${logfile} + return_codes=(${PIPESTATUS[*]}) + if [ "${return_codes[0]}" -ne 0 ]; then + echo "read or write file filed in 4-split-channels test" >> ${logfile} 2>&1 + res=${return_codes[0]} + cd $OLDPWD + return $res + fi + if [ "${return_codes[1]}" -ne 0 ]; then + echo "4-split-channels test filed" >> ${logfile} 2>&1 + res=${return_codes[1]} + cd $OLDPWD + return $res + fi + cp test4_dst.raw ${LYCIUM__MANUAL_CONFIRM_PATH}/${pkgname}/ + + # 测试项6 + ./5-variable-rate 0 1> test5_dst.raw 2>> ${logfile} + res=$? + if [ $res -ne 0 ] + then + echo "5-variable-rate test failed" >> ${logfile} 2>&1 + cd $OLDPWD + return $res + fi + cp test5_dst.raw ${LYCIUM__MANUAL_CONFIRM_PATH}/${pkgname}/ + + cd $OLDPWD + + return $res +} diff --git a/thirdparty/soxr/README_zh.md b/thirdparty/soxr/README_zh.md index 5f01d904813b7d5858b0a7eb9d191c6a88494cd8..05dc19b02011b692cd77b50177172b91669a756b 100644 --- a/thirdparty/soxr/README_zh.md +++ b/thirdparty/soxr/README_zh.md @@ -6,7 +6,6 @@ soxr是一个重采样库,执行一维采样率转换,例如,可用于对 - SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:0.1.3 - 当前适配的功能:soxr是一个重采样库,执行一维采样率转换。 -- [LGPLv2 license](https://sourceforge.net/p/soxr/code/ci/0.1.3/tree/LICENCE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/soxr/docs/hap_integrate.md b/thirdparty/soxr/docs/hap_integrate.md index 0866deb93080f510e26d74aeef0d7c9c8d81284d..a5fe2f8f4842b870dc70d56ef2874beca2fe9cf2 100644 --- a/thirdparty/soxr/docs/hap_integrate.md +++ b/thirdparty/soxr/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) -- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,29 +30,23 @@ ├── README_zh.md ``` -- 将soxr拷贝至tools/main目录下 +- 在lycium目录下编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/soxr tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh soxr ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库和头文件 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库和头文件 ```shell soxr/arm64-v8a soxr/armeabi-v7a ``` + - [测试三方库](#测试三方库) ## 应用中使用三方库 @@ -60,7 +54,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库全部(动态库名字带版本号和不带版本号的都需要)拷贝到该目录下,如下图所示   - ![thirdparty_install_dir](pic/soxr_install_dir.png) +  ![thirdparty_install_dir](pic/soxr_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -74,11 +68,10 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/soxr/${OHOS_ARCH}/include) ``` - ![soxr_usage](pic/soxr_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录下面的examples目录,执行其示例程序如下(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) - 首先将编译生成的so路径(根据实际编译路径填写)添加到环境变量: diff --git a/thirdparty/spine-runtimes/HPKBUILD b/thirdparty/spine-runtimes/HPKBUILD new file mode 100755 index 0000000000000000000000000000000000000000..b08d80d4f38b3c97f79c8be3e921650bbb3e8828 --- /dev/null +++ b/thirdparty/spine-runtimes/HPKBUILD @@ -0,0 +1,61 @@ +# Contributor: liucheng <1596268623@qq.com> +# Maintainer: liucheng <1596268623@qq.com> + +pkgname=spine-runtimes +pkgver=4.1.00 +pkgrel=0 +pkgdesc="This GitHub project hosts the Spine Runtimes which are needed to use Spine 2D skeletal animation data with various game toolkits." +url="http://zh.esotericsoftware.com//" +archs=("armeabi-v7a" "arm64-v8a") +license=("BSD") +depends=() +makedepends=() +source="https://github.com/EsotericSoftware/${pkgname}/archive/refs/tags/${pkgver}.tar.gz" + +downloadpackage=true +autounpack=true +buildtools="cmake" + +builddir=${pkgname}-${pkgver} +packagename=$builddir.tar.gz + +sed_ok_flag=false +prepare() { + mkdir -p $builddir/$ARCH-build + if [ $sed_ok_flag == "false" ] ; then + sed_ok_flag="true" + cd $builddir + patch < ../spine-runtimes_oh_pkg.patch + cd $OLDPWD + fi +} + +build() { + cd $builddir + #cmake 要求3.17以上版本,所以需要使用系统的cmake + cmake "$@" -DOHOS_ARCH=$ARCH -B$ARCH-build -S./ -L -DCMAKE_CXX_FLAGS=-w -DCMAKE_C_FLAGS=-w > `pwd`/$ARCH-build/build.log 2>&1 + make VERBOSE=1 -j4 -C $ARCH-build >> `pwd`/$ARCH-build/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +# 打包安装 +package() { + cd $builddir + make -C $ARCH-build install >> `pwd`/$ARCH-build/build.log 2>&1 + cd $OLDPWD +} + +# 进行测试的准备和说明 +check() { + echo "The test must be on an OpenHarmony device!" + # 测试方式 + # 进入构建目录 + # 执行: ./spine_cpp_unit_test +} + +# 清理环境fmt +cleanbuild() { + rm -rf ${PWD}/$builddir #${PWD}/$packagename +} diff --git a/thirdparty/spine-runtimes/HPKCHECK b/thirdparty/spine-runtimes/HPKCHECK new file mode 100755 index 0000000000000000000000000000000000000000..a4ed6f471f4cb830cae1aef3e9728944638fd7e9 --- /dev/null +++ b/thirdparty/spine-runtimes/HPKCHECK @@ -0,0 +1,19 @@ +# Contributor: liucheng <1596268623@qq.com> +# Maintainer: liucheng <1596268623@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build/spine-cpp/spine-cpp-unit-tests + ./spine_cpp_unit_test > ${logfile} 2>&1 + res=$? + if [ $res -ne 0 ] + then + res=-1 + fi + cd $OLDPWD + + return $res +} diff --git a/thirdparty/spine-runtimes/OAT.xml b/thirdparty/spine-runtimes/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..59bfaa37935f10e40e862ab0f657aa7f0bbc2823 --- /dev/null +++ b/thirdparty/spine-runtimes/OAT.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/thirdparty/spine-runtimes/README.OpenSource b/thirdparty/spine-runtimes/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..d4f2bb3c1ad781c365d71d9c78634ff427c79d1d --- /dev/null +++ b/thirdparty/spine-runtimes/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "spine-runtimes", + "License": "BSD-3-Clause", + "License File": "https://github.com/EsotericSoftware/spine-runtimes/blob/4.1/LICENSE", + "Version Number": "4.1", + "Owner": "1596268623@qq.com", + "Upstream URL": "https://github.com/EsotericSoftware/spine-runtimes/archive/refs/tags/4.1.00.tar.gz", + "Description": "This GitHub project hosts the Spine Runtimes which are needed to use Spine 2D skeletal animation data with various game toolkits." + } +] diff --git a/thirdparty/spine-runtimes/README_zh.md b/thirdparty/spine-runtimes/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..c1df2fd049e7b3af35d44ce4c0fe373b1d16ca18 --- /dev/null +++ b/thirdparty/spine-runtimes/README_zh.md @@ -0,0 +1,12 @@ +# spine-runtimes 三方库说明 +## 功能简介 +这个GitHub项目托管了Spine运行时,这是将Spine 2D骨骼动画数据与各种游戏工具包一起使用所必需的。 +## 使用约束 +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 9 Release) +- 三方库版本:4.1 +- 这个GitHub项目托管了Spine运行时,这是将Spine 2D骨骼动画数据与各种游戏工具包一起使用所必需的。 +- [GNU Library General Public License](https://github.com/EsotericSoftware/spine-runtimes/blob/4.1/LICENSE) + +## 集成方式 ++ [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/spine-runtimes/SHA512SUM b/thirdparty/spine-runtimes/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..7dba34ca5fd63079576bf385dee320e2e818fe93 --- /dev/null +++ b/thirdparty/spine-runtimes/SHA512SUM @@ -0,0 +1 @@ +40a352a1f5e9939802667f330c9de2f0b03bf63834d1c20514a6cecb35c1a9915fb13588ee92cbaba9effbd2205c25851cca58d2ec7f90ce9b974252bd168425 spine-runtimes-4.1.00.tar.gz diff --git a/thirdparty/spine-runtimes/docs/hap_integrate.md b/thirdparty/spine-runtimes/docs/hap_integrate.md new file mode 100644 index 0000000000000000000000000000000000000000..6179b944a6ae3a0c836f1d7823d8292c7e80a04f --- /dev/null +++ b/thirdparty/spine-runtimes/docs/hap_integrate.md @@ -0,0 +1,67 @@ +# spine-runtimes集成到应用hap +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 + +## 开发环境 + +- ubuntu20.04 +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz) +- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#ci环境准备) +## 编译三方库 +- 下载本仓库 + ``` + git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 + ``` +- 三方库目录结构 + ``` + tpc_c_cplusplus/thirdparty/spine-runtimes #三方库的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── SHA512SUM #三方库校验文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md + ``` + +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#编译环境准备) + ``` + cd lycium + ./build.sh spine-runtimes + ``` +- 三方库头文件及生成的库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库和头文件 + ``` + spine-runtimes/arm64-v8a + spine-runtimes/armeabi-v7a + ``` + +- [测试三方库](#测试三方库) + +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示 + ![thirdparty_install_dir](pic/install_dir.png) +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + +``` +#将三方库加入工程中 +target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libspine-c.a) +target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libspine-cpp.a) +#将三方库的头文件加入工程中 +target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/spine_runtimes/${OHOS_ARCH}/include) +``` + ![thirdparty_usage](pic/usage.png) +## 测试三方库 +三方库的测试使用原库自带的测试用例来做测试 + +进入到构建目录获取,执行ctest,运行测试用例(spine-runtimes-arm64-v8a-build为构建64位的目录,spine-runtimes-armeabi-v7a-build为构建32位的目录) + ![thirdparty_test_result](pic/test_result.png) + + +## 参考资料 +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md) diff --git a/thirdparty/spine-runtimes/docs/pic/install_dir.png b/thirdparty/spine-runtimes/docs/pic/install_dir.png new file mode 100755 index 0000000000000000000000000000000000000000..49a22dc0a419271a422ad9515748d034827fee02 Binary files /dev/null and b/thirdparty/spine-runtimes/docs/pic/install_dir.png differ diff --git a/thirdparty/spine-runtimes/docs/pic/test_result.png b/thirdparty/spine-runtimes/docs/pic/test_result.png new file mode 100755 index 0000000000000000000000000000000000000000..e853eae73211eb3b6711a97cf72bfa31a59132f8 Binary files /dev/null and b/thirdparty/spine-runtimes/docs/pic/test_result.png differ diff --git a/thirdparty/spine-runtimes/docs/pic/usage.png b/thirdparty/spine-runtimes/docs/pic/usage.png new file mode 100755 index 0000000000000000000000000000000000000000..8ecb182450a8b376e57720e15147807c07ab4b31 Binary files /dev/null and b/thirdparty/spine-runtimes/docs/pic/usage.png differ diff --git a/thirdparty/spine-runtimes/spine-runtimes_oh_pkg.patch b/thirdparty/spine-runtimes/spine-runtimes_oh_pkg.patch new file mode 100755 index 0000000000000000000000000000000000000000..1ec4a059e960bf5e746b9f05845ff1e2f8ff2a37 --- /dev/null +++ b/thirdparty/spine-runtimes/spine-runtimes_oh_pkg.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f77ff7f..03636b8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,6 @@ + cmake_minimum_required(VERSION 3.17) + project(spine) + +-set(CMAKE_INSTALL_PREFIX "./") + set(CMAKE_VERBOSE_MAKEFILE ON) + set(SPINE_SFML FALSE CACHE BOOL FALSE) + set(SPINE_SANITIZE FALSE CACHE BOOL FALSE) +@@ -26,6 +25,8 @@ if((${SPINE_SFML}) OR (${CMAKE_CURRENT_BINARY_DIR} MATCHES "spine-sfml")) + add_subdirectory(spine-cpp) + add_subdirectory(spine-sfml/cpp) + endif() ++add_subdirectory(spine-c) ++add_subdirectory(spine-cpp) + + # add_subdirectory(spine-c/spine-c-unit-tests) + add_subdirectory(spine-cpp/spine-cpp-unit-tests) diff --git a/thirdparty/sqlite/README_zh.md b/thirdparty/sqlite/README_zh.md index e42ba4cb272e589d1cf10ec1e69fb7905a599214..382bca5ffa506dbca2d964043799ec55ca70f2ed 100644 --- a/thirdparty/sqlite/README_zh.md +++ b/thirdparty/sqlite/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 sqlite是一个提供数据库操作能力的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:version-3.42.0 - 当前适配的功能:支持数据库操作能力 -- [Public Domain](https://github.com/sqlite/sqlite) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/sqlite/docs/hap_integrate.md b/thirdparty/sqlite/docs/hap_integrate.md index 0de478a6e673be4e9f76c2e2d9e67b4f6c39facf..a45f693740e798cee02da7cb0d76783125d53ad4 100644 --- a/thirdparty/sqlite/docs/hap_integrate.md +++ b/thirdparty/sqlite/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/sqlite #三方库sqlite的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将sqlite拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/sqlite tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh sqlite ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` sqlite/arm64-v8a sqlite/armeabi-v7a ``` @@ -43,23 +40,20 @@ ## 应用中使用三方库 -- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: - 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录 - -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示: +  ![thirdparty_install_dir](pic/sqlite_install_dir.jpg) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libsqlite.so.0) + target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libsqlite.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/sqlite/${OHOS_ARCH}/include) ``` - ![sqlite_usage](pic/sqlite_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行make fuzztest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/sqlite/docs/pic/sqlite_install_dir.jpg b/thirdparty/sqlite/docs/pic/sqlite_install_dir.jpg index 789d2e53580839b6969326ef91ab7f1c465ac721..b27e3d9c44b2c87c22bd6725d2c09adcbb1b23c2 100644 Binary files a/thirdparty/sqlite/docs/pic/sqlite_install_dir.jpg and b/thirdparty/sqlite/docs/pic/sqlite_install_dir.jpg differ diff --git a/thirdparty/sqliteodbc/HPKCHECK b/thirdparty/sqliteodbc/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..834e85715558860b91ebaff7f6434794efdc24c0 --- /dev/null +++ b/thirdparty/sqliteodbc/HPKCHECK @@ -0,0 +1,20 @@ +# Contributor: tangshaoteng +# Maintainer: tangshaoteng + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir-$ARCH-build + driver_config=`${LYCIUM_ROOT}/usr/unixODBC/${ARCH}/bin/odbcinst -j | grep DRIVERS | awk '{print $2}'` + data_source_config=`${LYCIUM_ROOT}/usr/unixODBC/${ARCH}/bin/odbcinst -j | grep SYSTEM | awk '{print $4}'` + driver_lib=${LYCIUM_ROOT}/usr/sqliteodbc/${ARCH}/lib/libsqlite3odbc.so + echo -e "[SQL3]\nDescription = unixODBC for sqlite3\nDriver = $driver_lib\nSetup = $driver_lib\nFileUsage=1" > $driver_config + echo -e "[myDB]\nDriver = SQL3" > $data_source_config + echo -e "quit" | ${LYCIUM_ROOT}/usr/unixODBC/${ARCH}/bin/isql -v myDB > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} diff --git a/thirdparty/sqliteodbc/README_zh.md b/thirdparty/sqliteodbc/README_zh.md index 591b25f8e003d375526fb102de1825bb39f4a0c2..3642137018334b527f13f1d9dee68484e82bf9a5 100644 --- a/thirdparty/sqliteodbc/README_zh.md +++ b/thirdparty/sqliteodbc/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 sqliteodbc是基于SQLite数据库的ODBC驱动程序 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:0.9998 - 当前适配的功能:基于SQLite3数据库的ODBC驱动程序。 -- [BSD](http://www.ch-werner.de/sqliteodbc/license.terms) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/sqliteodbc/docs/hap_integrate.md b/thirdparty/sqliteodbc/docs/hap_integrate.md index 7ed2be1d7fce566176ad624b0a3c42a5074729ec..361f849409783c7d2a280a5b93d3335da9df4494 100644 --- a/thirdparty/sqliteodbc/docs/hap_integrate.md +++ b/thirdparty/sqliteodbc/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/sqliteodbc #三方库sqliteodbc的目录结构如下 @@ -22,20 +23,16 @@ ├── README_zh.md ``` -- 将sqliteodbc拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/sqliteodbc tools/main -rf - ``` -- 在tools目录下编译三方库 +- 在lycium目录下编译三方库 sqliteodbc库依赖sqlite、unixODBC、libxml2、tcl、xz、zlib这6个库,所以在build时需要将依赖库一起编译进来。 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - cd tools + cd lycium ./build.sh sqliteodbc sqlite unixODBC libxml2 tcl xz zlib ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` sqliteodbc/arm64-v8a sqliteodbc/armeabi-v7a sqlite/arm64-v8a sqlite/armeabi-v7a @@ -55,44 +52,10 @@ - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/sqliteodbc/${OHOS_ARCH}/lib/libsqlite3_mod_blobtoxy-0.9998.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/sqliteodbc/${OHOS_ARCH}/lib/libsqlite3_mod_csvtable-0.9998.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/sqliteodbc/${OHOS_ARCH}/lib/libsqlite3_mod_impexp-0.9998.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/sqliteodbc/${OHOS_ARCH}/lib/libsqlite3_mod_xpath-0.9998.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/sqliteodbc/${OHOS_ARCH}/lib/libsqlite3_mod_zipfile-0.9998.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/sqliteodbc/${OHOS_ARCH}/lib/libsqlite3odbc-0.9998.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/unixODBC/${OHOS_ARCH}/lib/libodbc.a - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/unixODBC/${OHOS_ARCH}/lib/libodbccr.a - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/unixODBC/${OHOS_ARCH}/lib/libodbcinst.a - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/sqlite/${OHOS_ARCH}/lib/libsqlite3.so.0.8.6 - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libxml2/${OHOS_ARCH}/lib/libxml2.so.2.11.3 - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/lib/libtclsqlite3.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/lib/tdbc1.1.5/libtdbc1.1.5.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/lib/thread2.8.8/libthread2.8.8.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/lib/sqlite3.40.0/libsqlite3.40.0.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/lib/itcl4.2.3/libitcl4.2.3.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/lib/tdbcodbc1.1.5/libtdbcodbc1.1.5.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/lib/tdbcmysql1.1.5/libtdbcmysql1.1.5.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/lib/libtcl8.6.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/lib/tdbcpostgres1.1.5/libtdbcpostgres1.1.5.so - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/lib/tdbc1.1.5/libtdbcstub1.1.5.a - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/lib/libtclstub8.6.a - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/lib/itcl4.2.3/libitclstub4.2.3.a - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/xz/${OHOS_ARCH}/lib/liblzma.so.5.4.1 - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/${OHOS_ARCH}/lib/libz.so.1.2.13 - ) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/sqliteodbc/${OHOS_ARCH}/lib/libsqlite3odbc-0.9998.so) #将三方库的头文件加入工程中 - target_include_directories(entry PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/unixODBC/${OHOS_ARCH}/include - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/sqlite/${OHOS_ARCH}/include - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libxml2/${OHOS_ARCH}/include - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/include - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/xz/${OHOS_ARCH}/include - ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/${OHOS_ARCH}/include - ) + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/unixODBC/${OHOS_ARCH}/include) ``` - ![sqliteodbc_usage](pic/sqliteodbc_usage.png) ## 测试三方库 sqliteodbc三方库的测试使用unixODBC库中的isql命令来做测试,步骤如下: diff --git a/thirdparty/sqliteodbc/docs/pic/sqliteodbc_install_dir.png b/thirdparty/sqliteodbc/docs/pic/sqliteodbc_install_dir.png index ecec4ad4c020fd2b687a87e528472f55e09be63d..75c20c5e23846ca81fab1f85c323a9716716c15d 100644 Binary files a/thirdparty/sqliteodbc/docs/pic/sqliteodbc_install_dir.png and b/thirdparty/sqliteodbc/docs/pic/sqliteodbc_install_dir.png differ diff --git a/thirdparty/stb/HPKBUILD b/thirdparty/stb/HPKBUILD old mode 100755 new mode 100644 diff --git a/thirdparty/stb/HPKCHECK b/thirdparty/stb/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..9c4488131ab49d5cbbe9c5d244a411c2f5939696 --- /dev/null +++ b/thirdparty/stb/HPKCHECK @@ -0,0 +1,25 @@ +# Contributor: Chen Xu +# Maintainer: Chen Xu + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir-$ARCH-build + ./tests/image_write_test > ${logfile} 2>&1 + res=$? + if [ $res -eq 0 ] + then + # 与x86平台输出文件对比 + res=`diff output ../output | wc -l` + fi + # 将输出文件copy到指定目录 + if [ $res -eq 0 ] + then + mkdir ${LYCIUM__MANUAL_CONFIRM_PATH}/${pkgname} + cp -rf output/* ${LYCIUM__MANUAL_CONFIRM_PATH}/${pkgname}/ + fi + cd $OLDPWD + return $res +} diff --git a/thirdparty/stb/OAT.xml b/thirdparty/stb/OAT.xml old mode 100755 new mode 100644 diff --git a/thirdparty/stb/README.OpenSource b/thirdparty/stb/README.OpenSource old mode 100755 new mode 100644 diff --git a/thirdparty/stb/README_zh.md b/thirdparty/stb/README_zh.md old mode 100755 new mode 100644 index 692683837e516dd20bc8da143a86dd98d99bdc9f..2f14a9843c88958a84b604ed708bee61fd935992 --- a/thirdparty/stb/README_zh.md +++ b/thirdparty/stb/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 stb是一个图像读写库 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:master - 当前适配的功能:图像加载、写出、缩放等功能 -- [MIT License](https://github.com/nothings/stb/blob/master/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) \ No newline at end of file diff --git a/thirdparty/stb/SHA512SUM b/thirdparty/stb/SHA512SUM old mode 100755 new mode 100644 diff --git a/thirdparty/stb/docs/hap_integrate.md b/thirdparty/stb/docs/hap_integrate.md old mode 100755 new mode 100644 index 6fa6fdf8e82267849661f4a39e7404c81ed0e128..c0da653ed618aa5edeefedf29610e1672d46b1dc --- a/thirdparty/stb/docs/hap_integrate.md +++ b/thirdparty/stb/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -24,34 +24,22 @@ ```shell tpc_c_cplusplus/thirdparty/stb #三方库stb的目录结构如下 ├── docs #三方库相关文档的文件夹 - - - ├── HPKBUILD #构建脚本 ├── SHA512SUM #三方库校验文件 ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 ├── README_zh.md - ``` - -- 将stb拷贝至tools/main目录下 - ```shell - cd tpc_c_cplusplus - cp thirdparty/stb tools/main -rf - ``` - -- 在tools目录下编译三方库 +- 编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools - ./build.sh stb + ./lycium/build.sh stb ``` - + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell stb/arm64-v8a stb/armeabi-v7a @@ -63,7 +51,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示   - ![thirdparty_install_dir](pic/stb_install_dir.png) +  ![thirdparty_install_dir](pic/stb_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -72,11 +60,10 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/stb/${OHOS_ARCH}/include) ``` - ![stb_usage](pic/stb_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行如下命令ctest(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/stb/docs/pic/stb_install_dir.png b/thirdparty/stb/docs/pic/stb_install_dir.png old mode 100755 new mode 100644 diff --git a/thirdparty/stb/docs/pic/stb_test.png b/thirdparty/stb/docs/pic/stb_test.png old mode 100755 new mode 100644 diff --git a/thirdparty/stb/docs/pic/stb_usage.png b/thirdparty/stb/docs/pic/stb_usage.png old mode 100755 new mode 100644 diff --git a/thirdparty/stb/output/wr6x5_flip.bmp b/thirdparty/stb/output/wr6x5_flip.bmp new file mode 100644 index 0000000000000000000000000000000000000000..9643b2d3e15f46ccb1d46dd724fa8fd2de4cae16 Binary files /dev/null and b/thirdparty/stb/output/wr6x5_flip.bmp differ diff --git a/thirdparty/stb/output/wr6x5_flip.hdr b/thirdparty/stb/output/wr6x5_flip.hdr new file mode 100644 index 0000000000000000000000000000000000000000..bf659debf7cb3ca507337b9470fb1a1af190fc33 Binary files /dev/null and b/thirdparty/stb/output/wr6x5_flip.hdr differ diff --git a/thirdparty/stb/output/wr6x5_flip.jpg b/thirdparty/stb/output/wr6x5_flip.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f97481c37ec7f6b7c19811bad69a5bc0dcc2b9ab Binary files /dev/null and b/thirdparty/stb/output/wr6x5_flip.jpg differ diff --git a/thirdparty/stb/output/wr6x5_flip.png b/thirdparty/stb/output/wr6x5_flip.png new file mode 100644 index 0000000000000000000000000000000000000000..4ed53f004ea39e00eddca5eda557032a3379c4ee Binary files /dev/null and b/thirdparty/stb/output/wr6x5_flip.png differ diff --git a/thirdparty/stb/output/wr6x5_flip.tga b/thirdparty/stb/output/wr6x5_flip.tga new file mode 100644 index 0000000000000000000000000000000000000000..6ccb265bc456a5df937b559d1daf504dcf2fc9ca Binary files /dev/null and b/thirdparty/stb/output/wr6x5_flip.tga differ diff --git a/thirdparty/stb/output/wr6x5_regular.bmp b/thirdparty/stb/output/wr6x5_regular.bmp new file mode 100644 index 0000000000000000000000000000000000000000..80456d801fd9995a5cf922b95d9057de01a1fb9a Binary files /dev/null and b/thirdparty/stb/output/wr6x5_regular.bmp differ diff --git a/thirdparty/stb/output/wr6x5_regular.hdr b/thirdparty/stb/output/wr6x5_regular.hdr new file mode 100644 index 0000000000000000000000000000000000000000..11cafd1aa341e52e2a405ba2d1a8e13ad6b0be9e Binary files /dev/null and b/thirdparty/stb/output/wr6x5_regular.hdr differ diff --git a/thirdparty/stb/output/wr6x5_regular.jpg b/thirdparty/stb/output/wr6x5_regular.jpg new file mode 100644 index 0000000000000000000000000000000000000000..071b7c7c34fd5ead53e1d4607635eb2202a1ea78 Binary files /dev/null and b/thirdparty/stb/output/wr6x5_regular.jpg differ diff --git a/thirdparty/stb/output/wr6x5_regular.png b/thirdparty/stb/output/wr6x5_regular.png new file mode 100644 index 0000000000000000000000000000000000000000..f8cf1519a4376d43220d8bcf420aa28eb3eea4df Binary files /dev/null and b/thirdparty/stb/output/wr6x5_regular.png differ diff --git a/thirdparty/stb/output/wr6x5_regular.tga b/thirdparty/stb/output/wr6x5_regular.tga new file mode 100644 index 0000000000000000000000000000000000000000..eb67688eba537931f28896dd7aa3ff965a8a41b6 Binary files /dev/null and b/thirdparty/stb/output/wr6x5_regular.tga differ diff --git a/thirdparty/tcl/README_zh.md b/thirdparty/tcl/README_zh.md index 16c7f36b01e23b1b268a9f281d119ff3937ecd95..f018e259105f56c68e30a4ef2d3e1ba387a54d6c 100644 --- a/thirdparty/tcl/README_zh.md +++ b/thirdparty/tcl/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 tcl是一种解释语言,也是该语言的一种非常便携的解释器。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:8.6.13 - 当前适配的功能:支持tcl解释器 -- [BSD](https://sourceforge.net/projects/tcl/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/tcl/docs/hap_integrate.md b/thirdparty/tcl/docs/hap_integrate.md index 4645deeed3038f632f2f268074a3000f9d481c3f..f6199aacf41d4d4b886ea796907978c58907aaac 100644 --- a/thirdparty/tcl/docs/hap_integrate.md +++ b/thirdparty/tcl/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/tcl #三方库tcl的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将tcl拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/tcl tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools - ./build.sh tcl + ./lycium/build.sh tcl ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` tcl/arm64-v8a tcl/armeabi-v7a ``` @@ -66,9 +63,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tcl/${OHOS_ARCH}/include) ``` - ![tcl_usage](pic/tcl_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行make test-tcl运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录)(备注:需要联网测试,其中unixInit.test和thread.test没过,unixInit.test是因为用例需要匹配查找iso8859-15|utf-8编码,而ohos中查找到的是ascii编码因此没有通过。thread.test是因为pthread_join()接口在多次调用后,threadId在用例中会有重复的现象,ohos的多线程pthread_join()没有做校验处理,导致失败) diff --git a/thirdparty/thirdparty_template/docs/hap_integrate_template.md b/thirdparty/thirdparty_template/docs/hap_integrate_template.md index 8312c2a3c86e05d6ad0c2c310ceaa3c954d0003e..53f1894b60d4c80e6b758a2634b2e15e7f0c71a0 100755 --- a/thirdparty/thirdparty_template/docs/hap_integrate_template.md +++ b/thirdparty/thirdparty_template/docs/hap_integrate_template.md @@ -10,8 +10,8 @@ - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) - [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) - [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -32,25 +32,25 @@ ├── README_zh.md ``` -- 将xxx拷贝至tools/main目录下 +- 将xxx拷贝至lycium/main目录下 ```shell cd tpc_c_cplusplus - cp thirdparty/xxx tools/main -rf + cp thirdparty/xxx lycium/main -rf ``` -- 在tools目录下编译三方库 +- 在lycium目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh xxx ### xxx是对应的三方库名 ``` - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell xxx/arm64-v8a xxx/armeabi-v7a ### xxx是对应的三方库名 @@ -110,7 +110,7 @@ ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行 对应的测试命令(在[HPKBUILD](../HPKBUILD)文件中的check()函数中有说明) 运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录), 如`tinyxpath`三方库的测试结果: diff --git a/thirdparty/thrift/README_zh.md b/thirdparty/thrift/README_zh.md index 363ac57415ec12000a03047c1ec5075ee4d9c53e..acbabb3d8d74b706e1f509ffb94c17863f4b4c32 100644 --- a/thirdparty/thrift/README_zh.md +++ b/thirdparty/thrift/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 Thrift是一种接口描述语言和二进制通讯协议,它被用来定义和创建跨语言的服务。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v0.18.1 - 当前适配的功能:支持跨语言服务创建、数据传输和远程过程调用的高性能二进制协议 -- [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/thrift/docs/hap_integrate.md b/thirdparty/thrift/docs/hap_integrate.md index b56ac4478472e4c80563eb3e68de0e9e5633f5d9..a85a826a96252d6a3d47244383d1b197a39c7c9c 100644 --- a/thirdparty/thrift/docs/hap_integrate.md +++ b/thirdparty/thrift/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/thrift #三方库thrift的目录结构如下 @@ -22,20 +23,17 @@ ├── README_zh.md ``` -- 将thrift拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/thrift tools/main -rf - ``` -- 在tools目录下编译三方库 - thrift库需要依赖boost openssl zlib这三个库,所以在build时需要将依赖库一起编译进来 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + thrift库需要依赖boost openssl zlib这三个库,所以在build时需要会自动将依赖库一起编译进来 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools - ./build.sh boost openssl zlib thrift + cd lycium + ./build.sh thrift ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` thrift/arm64-v8a thrift/armeabi-v7a boost/arm64-v8a boost/armeabi-v7a @@ -49,6 +47,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 +  ![thirdparty_install_dir](pic/thrift_install_dir.jpg) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -88,18 +87,18 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/boost/${OHOS_ARCH}/lib/libboost_unit_test_framework.so.1.81.0 ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/boost/${OHOS_ARCH}/lib/libboost_wave.so.1.81.0 ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/boost/${OHOS_ARCH}/lib/libboost_wserialization.so.1.81.0) - + target_link_libraries(entry PRIVATE -L${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/lib/engines-1.1/afalg.so -L${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/lib/engines-1.1/capi.so -L${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/lib/engines-1.1/padlock.so ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/lib/libcrypto.so.1.1 ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/lib/libssl.so.1.1) - + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/${OHOS_ARCH}/lib/libz.so.1.2.13) - + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/thrift/${OHOS_ARCH}/lib/libthrift.a ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/thrift/${OHOS_ARCH}/lib/libthriftz.a) - + #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/boost/${OHOS_ARCH}/lib/include) target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/openssl/${OHOS_ARCH}/lib/include) @@ -110,7 +109,7 @@  ![thrift_usage](pic/thrift_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的可执行文件及生成的动态库准备好 diff --git a/thirdparty/tiff/HPKCHECK b/thirdparty/tiff/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..fea0f02e4f2deb2a6e567fd434938b6e69c46e2c --- /dev/null +++ b/thirdparty/tiff/HPKCHECK @@ -0,0 +1,21 @@ +# Contributor: chengkan +# Maintainer: chengkan + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + ctest > $logfile 2>&1 + res=$? + + if [ $res -ne 0 ] + then + mkdir ${LYCIUM_FAULT_PATH}/${pkgname} + cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/ + fi + cd $OLDPWD + + return $res +} diff --git a/thirdparty/tiff/README_zh.md b/thirdparty/tiff/README_zh.md index 1d449436bd3c5ab0c1f24ee7c2b88e570265ddd0..ce7fb0852089b99da8ec3b8e1304d6659d3135fe 100644 --- a/thirdparty/tiff/README_zh.md +++ b/thirdparty/tiff/README_zh.md @@ -2,11 +2,9 @@ ## 功能简介 tiff是一个用来读写标签图片(tiff)的库。该库还支持如下文件格式的转化。 ## 使用约束 -- ROM版本:OpenHarmony-v3.2-Beta1 +- IDE版本:DevEco Studio 3.1 Release -- IDE版本:DevEco Studio 3.1 Release(3.1.0.500) - -- SDK:API9 Release(3.2.12.2) +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v4.5.0 @@ -22,6 +20,5 @@ tiff是一个用来读写标签图片(tiff)的库。该库还支持如下文件 | tiff | pdf | | tiff | ps | -- [1991-1997 Silicon Graphics, Inc](https://gitlab.com/libtiff/libtiff/-/blob/v4.5.0/) ## 集成方式 + [系统hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/tiff/docs/hap_integrate.md b/thirdparty/tiff/docs/hap_integrate.md index ca81253fb5d13e8eab3ffc61bb89e97b4fb7b052..bad736f13bf83b8f5c27a21d82804d0c50c1a5e4 100644 --- a/thirdparty/tiff/docs/hap_integrate.md +++ b/thirdparty/tiff/docs/hap_integrate.md @@ -2,17 +2,18 @@ 本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 ## 开发环境 - ubuntu20.04 -- [OpenHarmony3.2.1Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2.1%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.12.5](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2.1%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/16/v3/YO_7mAQNTbS8jekrvez5IA/devecostudio-windows-3.1.0.500.zip?HW-CC-KV=V1&HW-CC-Date=20230512T073650Z&HW-CC-Expire=315360000&HW-CC-Sign=90814E421B9A6D8DB4757FAFC21A965CF890A387DF9A2633B4AB797AD77E6485) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/tiff #三方库tiff的目录结构如下 @@ -26,29 +27,17 @@ ├── README_zh.md ``` -- 将tiff拷贝和依赖的库拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/tiff tools/main -rf - cp thirdparty/libpng tools/main -rf - cp thirdparty/libjpeg-turbo tools/main -rf - cp thirdparty/libwebp tools/main -rf - cp thirdparty/xz tools/main -rf - cp thirdparty/zstd tools/main -rf - cp thirdparty/libdeflate tools/main -rf - cp thirdparty/jbigkit tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ``` - (tiff库所需要的依赖库有 libpng giflib zstd libjpeg-turbo xz libdeflate jbigkit libwebp, 所以编译时需要一起编译) - - cd tools - ./build.sh libpng giflib zstd libjpeg-turbo xz libdeflate jbigkit libwebp tiff + (tiff库所需要的依赖库有 libpng giflib zstd libjpeg-turbo xz libdeflate jbigkit libwebp, 所以编译时会自动一起编译) + cd lycium + ./build.sh tiff ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` tiff/arm64-v8a tiff/armeabi-v7a libpng/arm64-v8a libpng/armeabi-v7a @@ -65,33 +54,19 @@  ![tiff_install](pic/tiff_install.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` - #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libdeflate.so.0) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libjpeg.so.62) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/liblzma.so.5) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libtiff.so.6) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libzstd.so.1) - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libwebp.so.7) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libtiff.so) #将三方库的头文件加入工程中 - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libjpeg-turbo/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libwebp/${OHOS_ARCH}/include) target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tiff/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zstd/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/xz/${OHOS_ARCH}/include) - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libdeflate/${OHOS_ARCH}/include) - ``` - ![tiff_usage](pic/tiff_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 设置MAKE执行程序路径 ``` - mkdir -p /data/local/tmp/ohos-sdk/linux/native/build-tools/cmake - ln -s /usr/bin /data/local/tmp/ohos-sdk/linux/native/build-tools/cmake/bin + mkdir -p /data/local/tmp/ohos-sdk/linux/native/build-lycium/cmake + ln -s /usr/bin /data/local/tmp/ohos-sdk/linux/native/build-lycium/cmake/bin ``` - 拷贝CMAKE安装路径到单板 ``` @@ -106,16 +81,12 @@ ``` 32位系统 export LD_LIBRARY_PATH=/data/local/tmp/lycium/usr/libjpeg-turbo/armeabi-v7a/lib:/data/local/tmp/lycium/usr/libdeflate/armeabi-v7a/lib:/data/local/tmp/lycium/usr/xz/armeabi-v7a/lib:/data/local/tmp/lycium/usr/zstd/armeabi-v7a/lib:/data/local/tmp/lycium/usr/libpng/armeabi-v7a/lib:/data/local/tmp/lycium/usr/tiff/armeabi-v7a/lib:/data/local/tmp/lycium/usr/libwebp/armeabi-v7a/lib:/data/local/tmp/lycium/usr/jbigkit/armeabi-v7a/lib - ##64位系统 export LD_LIBRARY_PATH=/data/local/tmp/lycium/usr/libjpeg-turbo/arm64-v8a/lib:/data/local/tmp/lycium/usr/libdeflate/arm64-v8a/lib:/data/local/tmp/lycium/usr/xz/arm64-v8a/lib:/data/local/tmp/lycium/usr/zstd/arm64-v8a/lib:/data/local/tmp/lycium/usr/libpng/arm64-v8a/lib:/data/local/tmp/lycium/usr/tiff/arm64-v8a/lib:/data/local/tmp/lycium/usr/libwebp/arm64-v8a/lib:/data/local/tmp/lycium/usr/jbigkit/arm64-v8a/lib - -``` +``` - 进入到构建目录执行 ctest 运行测试用例,如下截图(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) - - -![tiff_test](pic/tiff_ohos_test2.png) + ![tiff_test](pic/tiff_ohos_test2.png) ## 参考资料 - [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) diff --git a/thirdparty/tiff/docs/pic/tiff_install.png b/thirdparty/tiff/docs/pic/tiff_install.png index d294cbdec62514a435cd37c7363116f013b5e233..bb1211653122292f1fe65056103b7b95c8b71552 100644 Binary files a/thirdparty/tiff/docs/pic/tiff_install.png and b/thirdparty/tiff/docs/pic/tiff_install.png differ diff --git a/thirdparty/tinyexr/README_zh.md b/thirdparty/tinyexr/README_zh.md index 05cd9bcc183d80a386c12d85d519ffc2152115af..36847d0b90823fa81cd5cd644c9c746d91021f90 100644 --- a/thirdparty/tinyexr/README_zh.md +++ b/thirdparty/tinyexr/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 tinyexr是加载和保存OpenEXR(.exr) 映像的小型库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.0.2 - 当前适配的功能:支持加载和保存OpenEXR的能力 -- [3-clause BSD/public domain](https://github.com/syoyo/tinyexr#readme) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/tinyexr/docs/hap_integrate.md b/thirdparty/tinyexr/docs/hap_integrate.md index ba2116f8d253a15ddc4e601026fb9e3e4d54e7d7..f580b41ddc2709b56475cf21b8dba3055f3f53a1 100644 --- a/thirdparty/tinyexr/docs/hap_integrate.md +++ b/thirdparty/tinyexr/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/tinyexr #三方库tinyexr的目录结构如下 @@ -23,19 +24,16 @@ ├── tinyexr_oh_pkg.patch ``` -- 将tinyexr拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/tinyexr tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh tinyexr ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` tinyexr/arm64-v8a tinyexr/armeabi-v7a ``` @@ -45,7 +43,7 @@ ## 应用中使用三方库 - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 -  +   ![thirdparty_install_dir](pic/tinyexr_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -56,7 +54,6 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tinyexr-${OHOS_ARCH}-install/include) ``` - ![tinyexr_usage](pic/tinyexr_usage.png) ## 测试三方库 三方库的测试使用原库自带的测试用例来做测试 diff --git a/thirdparty/tinyexr/docs/pic/tinyexr_install_dir.png b/thirdparty/tinyexr/docs/pic/tinyexr_install_dir.png index 92a91e1e3e60e882b4a7fedb3264c893993da1e1..7d49a19e5edf0cbb335e71cb974433fdfcdfead7 100644 Binary files a/thirdparty/tinyexr/docs/pic/tinyexr_install_dir.png and b/thirdparty/tinyexr/docs/pic/tinyexr_install_dir.png differ diff --git a/thirdparty/tinyxml2/README_zh.md b/thirdparty/tinyxml2/README_zh.md index b6823f9c3e7c67208d9a1a51e3bc1a48270f9932..b62cd54c439dfed0ae0ffd1453a93da9b41d804f 100644 --- a/thirdparty/tinyxml2/README_zh.md +++ b/thirdparty/tinyxml2/README_zh.md @@ -2,14 +2,11 @@ ## 功能简介 TinyXML2 是 simple、small、efficient 的开源 C++ XML 文件解析库,可以很方便地应用到现有的项目中。 ## 使用约束 -- ROM版本:OpenHarmony-v3.2-Beta1 -- IDE版本:DevEco Studio 3.1 Beta1(3.1.0.200) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - SDK:API9 Release(3.2.10.6) - 三方库版本:v9.0.0 - - 当前适配的功能:xml解析 - -- [zlib License](https://github.com/leethomason/tinyxml2/blob/9.0.0/LICENSE.txt) ## 集成方式 + [系统Rom包集成](docs/rom_integrate.md) + [应用Hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/tinyxpath/README_zh.md b/thirdparty/tinyxpath/README_zh.md index a2b836ef88113212bd81dc77dea819690ddc1f1f..74d1b8adb3192564096809d06d5162a0dc1261c7 100644 --- a/thirdparty/tinyxpath/README_zh.md +++ b/thirdparty/tinyxpath/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 tinyxpath用于从 XML 树中提取 XPath 1.0 表达式。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:1.3.1 - 当前适配的功能:支持xpath语法解析 -- [zlib/libpng License](https://sourceforge.net/projects/tinyxpath/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/tinyxpath/docs/hap_integrate.md b/thirdparty/tinyxpath/docs/hap_integrate.md index f64c129265480495a60a5381ee928b55c8443e78..bb7478747af7d30a14e76392c8ee2eb12a32eed5 100644 --- a/thirdparty/tinyxpath/docs/hap_integrate.md +++ b/thirdparty/tinyxpath/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将tinyxpath拷贝至tools/main目录下 +- 编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/tinyxpath tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh tinyxpath ``` - + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell tinyxpath/arm64-v8a tinyxpath/armeabi-v7a @@ -60,9 +53,7 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 -  ![thirdparty_install_dir](../../thirdparty_template/docs/pic/xxx_install_dir.png) - - 其中`xxx`代表三方库名,即为`tinyxpath` +  ![thirdparty_install_dir](pic/tinyxpath_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 @@ -73,11 +64,10 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/tinyxpath/${OHOS_ARCH}/include) ``` - ![tinyxpath_usage](../../thirdparty_template/docs/pic/xxx_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/tinyxpath/docs/pic/tinyxpath_install_dir.png b/thirdparty/tinyxpath/docs/pic/tinyxpath_install_dir.png new file mode 100755 index 0000000000000000000000000000000000000000..e7bd939552acec0e9b67d4ebde169fd71ba2ba70 Binary files /dev/null and b/thirdparty/tinyxpath/docs/pic/tinyxpath_install_dir.png differ diff --git a/thirdparty/uchardet/HPKCHECK b/thirdparty/uchardet/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..108449d46843e3e10c3621766333d436b29a2190 --- /dev/null +++ b/thirdparty/uchardet/HPKCHECK @@ -0,0 +1,15 @@ +# Contributor: lpzhong <278527840@qq.com> +# Maintainer: lpzhong <278527840@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + ctest > $logfile 2>&1 + res=$? + cd $OLDPWD + + return $res +} diff --git a/thirdparty/uchardet/README_zh.md b/thirdparty/uchardet/README_zh.md index fce8fb10a9bfaeba2053dd66b464aa76788fd026..f8eba81c9cec91878f6fef73de5dd8d70d7b5548 100644 --- a/thirdparty/uchardet/README_zh.md +++ b/thirdparty/uchardet/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 uchardet is an encoding detector library, which takes a sequence of bytes in an unknown character encoding without any additional information, and attempts to determine the encoding of the text. Returned encoding names are iconv-compatible. ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v0.0.8 - 当前适配的功能:encoding detector -- [ "MOZILLA PUBLIC LICENSE" "GPLV2" "LGPLV2" ](https://www.freedesktop.org/wiki/Software/uchardet/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/uchardet/docs/hap_integrate.md b/thirdparty/uchardet/docs/hap_integrate.md old mode 100755 new mode 100644 index 1806dca03395f09b7d2f0b6a9d251af7402a33cc..23bd1f457626e5bb435c87d809c0933469ff6c56 --- a/thirdparty/uchardet/docs/hap_integrate.md +++ b/thirdparty/uchardet/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/uchardet #三方库 uchardet 的目录结构如下 @@ -22,19 +23,15 @@ ├── README_zh.md ``` -- 将 uchardet 拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/uchardet tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools - ./build.sh uchardet + ./lycium/build.sh uchardet ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` uchardet/arm64-v8a uchardet/armeabi-v7a @@ -43,22 +40,19 @@ - [测试三方库](#测试三方库) ## 应用中使用三方库 -- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: - 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 - ![thirdparty_install_dir](pic/uchardet_install_dir.png) +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示: +  ![thirdparty_install_dir](pic/uchardet_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libuchardet.so.0) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libuchardet.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/include/uchardet/${OHOS_ARCH}) - + ``` - ![uchardet usage](pic/uchardet_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/uchardet/docs/pic/uchardet_install_dir.png b/thirdparty/uchardet/docs/pic/uchardet_install_dir.png index bfc1a711784e17f23039f95f47025e70d773728a..aec1994b9bb68c51f3d13b1d2127f9f4620eb479 100644 Binary files a/thirdparty/uchardet/docs/pic/uchardet_install_dir.png and b/thirdparty/uchardet/docs/pic/uchardet_install_dir.png differ diff --git a/thirdparty/unixODBC/HPKCHECK b/thirdparty/unixODBC/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..f425ecc7e9f04f41bc6b217f75916e53335cf3ed --- /dev/null +++ b/thirdparty/unixODBC/HPKCHECK @@ -0,0 +1,15 @@ +# Contributor: tangshaoteng +# Maintainer: tangshaoteng + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir/$ARCH-build + make check > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} diff --git a/thirdparty/unixODBC/README_zh.md b/thirdparty/unixODBC/README_zh.md index 11f913a5a09594560911ef65d075d5be0049b591..cc6a85a7afa1e15f13f45a9744514c6f63868656 100644 --- a/thirdparty/unixODBC/README_zh.md +++ b/thirdparty/unixODBC/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 unixODBC项目的目标是开发和推广unixODBC,使其成为非MS Windows平台上ODBC的最终标准。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:2.3.11 - 当前适配的功能:unixODBC项目的目标是开发和推广unixODBC,使其成为非MS Windows平台上ODBC的最终标准。 -- [GNU Lesser General Public License v2.1](https://github.com/lurcher/unixODBC/blob/master/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/unixODBC/docs/hap_integrate.md b/thirdparty/unixODBC/docs/hap_integrate.md index 28605a95906a2b865b6b10473e5f620e0c9d2543..3178fd2cc6f826460375915acf3d38c1d0ff6273 100644 --- a/thirdparty/unixODBC/docs/hap_integrate.md +++ b/thirdparty/unixODBC/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/unixODBC #三方库unixODBC的目录结构如下 @@ -22,19 +23,16 @@ ├── README_zh.md ``` -- 将unixODBC拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/unixODBC tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh unixODBC ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` unixODBC/arm64-v8a unixODBC/armeabi-v7a ``` diff --git a/thirdparty/unixODBC/docs/pic/unixODBC_install_dir.png b/thirdparty/unixODBC/docs/pic/unixODBC_install_dir.png index ea56d5dc8e058762110ac6ab91916397251624d3..7ddeb3c7a9a046ba00050c655f1872e32b6dbebd 100644 Binary files a/thirdparty/unixODBC/docs/pic/unixODBC_install_dir.png and b/thirdparty/unixODBC/docs/pic/unixODBC_install_dir.png differ diff --git a/thirdparty/unrar/README_zh.md b/thirdparty/unrar/README_zh.md index ef729ce116e481f95e9d92edd823520fe8a2c821..30d4313ae3ae9662bac52d04f92e4a4ba4459f4a 100644 --- a/thirdparty/unrar/README_zh.md +++ b/thirdparty/unrar/README_zh.md @@ -2,10 +2,10 @@ ## 功能简介 unrar是一个解压rar文件的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta1版本 -- OpenHarmony SDK版本:API version 9版本 +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.0.0 - 当前适配的功能:支持解压rar格式的文件 -- [Apache License 2.0](https://github.com/maoabc/unrar-android/blob/master/LICENSE) + ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/unzip/HPKCHECK b/thirdparty/unzip/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..2e31ab650cfafda3ccbdab4d00429d6daaf6210a --- /dev/null +++ b/thirdparty/unzip/HPKCHECK @@ -0,0 +1,16 @@ +# Contributor: lpzhong <278527840@qq.com> +# Maintainer: lpzhong <278527840@qq.com> + +source HPKBUILD > /dev/null 2>&1 + +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir-$ARCH-build + make check -f unix/Makefile > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} diff --git a/thirdparty/unzip/README_zh.md b/thirdparty/unzip/README_zh.md index e153078be672eb9b270a5a2dbd20ba2984073acd..97185603d88f2a2dfc7697bd1cb0a9cc50d90282 100644 --- a/thirdparty/unzip/README_zh.md +++ b/thirdparty/unzip/README_zh.md @@ -2,10 +2,9 @@ ## 功能简介 unzip为zip压缩文件的解压缩程序。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Release(3.1.0.500) -- SDK:API9 Release(3.2.12.2) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:60 - 当前适配的功能:解压缩zip文件 -- [Info-ZIP license](https://sourceforge.net/projects/infozip/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/unzip/docs/hap_integrate.md b/thirdparty/unzip/docs/hap_integrate.md index 9152f296d43af2164584f4c14312c1adb7cb1ad1..55fae7c17a879d480a772148dfb88c293d7c1e93 100644 --- a/thirdparty/unzip/docs/hap_integrate.md +++ b/thirdparty/unzip/docs/hap_integrate.md @@ -2,17 +2,18 @@ 本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 ## 开发环境 - ubuntu20.04 -- [OpenHarmony3.2.1Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2.1%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.12.5](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2.1%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/16/v3/YO_7mAQNTbS8jekrvez5IA/devecostudio-windows-3.1.0.500.zip?HW-CC-KV=V1&HW-CC-Date=20230512T073650Z&HW-CC-Expire=315360000&HW-CC-Sign=90814E421B9A6D8DB4757FAFC21A965CF890A387DF9A2633B4AB797AD77E6485) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/unzip #三方库unzip的目录结构如下 @@ -23,20 +24,15 @@ ├── README_zh.md ``` -- 将unzip和依赖的bzip2拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/unzip tools/main -rf - cp thirdparty/bzip2 tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools - ./build.sh unzip bzip2 + ./lycium/build.sh unzip bzip2 ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` unzip/arm64-v8a unzip/armeabi-v7a bzip2/arm64-v8a bzip2/armeabi-v7a @@ -56,14 +52,13 @@ ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libunzip.so.0) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libunzip.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/unzip/${OHOS_ARCH}/include) ``` - ![unzip_usage](pic/unzip_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行make test -f ./unix/Makefile 运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/websocketpp/README_zh.md b/thirdparty/websocketpp/README_zh.md index c98834292e05e704b64ba04b8582cabfb2d31698..423f6587c6ccf7bfb17ceb2c7d6433b76bd04d49 100644 --- a/thirdparty/websocketpp/README_zh.md +++ b/thirdparty/websocketpp/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 websocketpp C++ websocket client/server library。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:0.8.2 - 当前适配的功能:websocket 客户端,服务端 -- [ Peter Thorson. All rights reserved ](https://github.com/zaphoyd/websocketpp/blob/master/COPYING) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/websocketpp/docs/hap_integrate.md b/thirdparty/websocketpp/docs/hap_integrate.md index fe479576cd1ccdaabe42e130c57bd735a00b1cb7..104837c70afc2f43b987605d8d789ed48c66cf40 100755 --- a/thirdparty/websocketpp/docs/hap_integrate.md +++ b/thirdparty/websocketpp/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/websocketpp #三方库websocketpp的目录结构如下 @@ -22,19 +23,16 @@ ├── README_zh.md ``` -- 将websocketpp拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/websocketpp tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh websocketpp ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` websocketpp/arm64-v8a websocketpp/armeabi-v7a @@ -49,15 +47,11 @@  ![thirdparty_install_dir](pic/websocketpp_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` - - # websocketpp 是一个纯头文件库,将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/include/websocketpp/${OHOS_ARCH}) - ``` - ![websocketpp_usage](pic/websocketpp_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/xerces-c/README_zh.md b/thirdparty/xerces-c/README_zh.md index 2fb4e456a5df31aeb608c73fb0ad9a0c154955ab..bd936eb0a4c911dcf858db72bfe02064e7668230 100644 --- a/thirdparty/xerces-c/README_zh.md +++ b/thirdparty/xerces-c/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 xerces是一个开放源代码的XML语法分析器,它提供了SAX和DOM API。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Release(3.1.0.500) -- SDK:API9 Release(3.2.12.2) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v3.2.4 - 当前适配的功能:支持sax解析和dom解析 -- [Apache License 2.0](https://github.com/apache/xerces-c/blob/master/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) + [系统Rom包集成](docs/rom_integrate.md) diff --git a/thirdparty/xerces-c/docs/hap_integrate.md b/thirdparty/xerces-c/docs/hap_integrate.md index e12b24f308be5696ad44dfa13b9dfb3b690e7908..37132f5e9f178b1367694fc0374804720247f8e0 100644 --- a/thirdparty/xerces-c/docs/hap_integrate.md +++ b/thirdparty/xerces-c/docs/hap_integrate.md @@ -2,17 +2,18 @@ 本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 ## 开发环境 - ubuntu20.04 -- [OpenHarmony3.2.1Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2.1%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.12.5](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2.1%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/16/v3/YO_7mAQNTbS8jekrvez5IA/devecostudio-windows-3.1.0.500.zip?HW-CC-KV=V1&HW-CC-Date=20230512T073650Z&HW-CC-Expire=315360000&HW-CC-Sign=90814E421B9A6D8DB4757FAFC21A965CF890A387DF9A2633B4AB797AD77E6485) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/xerces-c #三方库xerces-c的目录结构如下 @@ -27,19 +28,16 @@ ├── README_zh.md ``` -- 将xerces拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/xerces-c tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh xerces-c ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` xerces-c/arm64-v8a xerces-c/armeabi-v7a @@ -54,24 +52,19 @@  ![xerces-c_install](pic/xerces-c_install.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` - #将三方库加入工程中 target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libxerces-c-3.2.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/xerces-c/${OHOS_ARCH}/include/xercesc) - ``` - ![xerces-c_usage](pic/xerces-c_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例,共80个用例如下截图(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) -![jbigkit_test](pic/xerces-c_ohos_test1.png) - - + ![jbigkit_test](pic/xerces-c_ohos_test1.png) -![jbigkit_test](pic/xerces-c_ohos_test2.png) + ![jbigkit_test](pic/xerces-c_ohos_test2.png) ## 参考资料 - [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) diff --git a/thirdparty/xmlrpc-c/HPKCHECK b/thirdparty/xmlrpc-c/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..37befc49e0342da78eabba52d3015dca56a8219e --- /dev/null +++ b/thirdparty/xmlrpc-c/HPKCHECK @@ -0,0 +1,25 @@ +# Contributor: lpzhong <278527840@qq.com> +# Maintainer: lpzhong <278527840@qq.com> + +source HPKBUILD > /dev/null 2>&1 + +logfile=${LYCIUM_THIRDPARTY_ROOT}/$pkgname/$builddir-$ARCH-build/${pkgname}_${pkgver}_${OHOS_SDK_VER}_test.log + +openharmonycheck() { + res=0 + cd $builddir-$ARCH-build + old_pwd=$OLDPWD + + cd test + ./test > $logfile 2>&1 + res=$? + if [ $res -eq 0 ] + then + cd cpp + ./test >> $logfile 2>&1 + res=$? + fi + cd $old_pwd + + return $res +} diff --git a/thirdparty/xmlrpc-c/README_zh.md b/thirdparty/xmlrpc-c/README_zh.md index cc3403603b7a07612207af76b760143ef49341ec..09b38180318ba598ccc10274d536e1be09885f88 100644 --- a/thirdparty/xmlrpc-c/README_zh.md +++ b/thirdparty/xmlrpc-c/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 XML-RPC is a quick-and-easy way to make procedure calls over the Internet. It converts the procedure call into an XML document, sends it to a remote server using HTTP, and gets back the response as XML. ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:1.54.06 - 当前适配的功能:通过xml格式进行,RPC通信 -- [ BSD license](https://xmlrpc-c.sourceforge.net/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/xmlrpc-c/docs/hap_integrate.md b/thirdparty/xmlrpc-c/docs/hap_integrate.md old mode 100755 new mode 100644 index f8dcee25a12e68fe7aa733df73f64736f39413f0..c8fc92a92f852d6b1f216a272fa6886775116ee9 --- a/thirdparty/xmlrpc-c/docs/hap_integrate.md +++ b/thirdparty/xmlrpc-c/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/xmlrpc-c #三方库xmlrpc-c的目录结构如下 @@ -23,19 +24,16 @@ ├── README_zh.md ``` -- 将xmlrpc-c拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/xmlrpc-c tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools - ./build.sh xmlrpc-c + cd lycium + ./build.sh xmlrpc-c ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` xmlrpc-c/arm64-v8a xmlrpc-c/armeabi-v7a @@ -44,22 +42,17 @@ - [测试三方库](#测试三方库) ## 应用中使用三方库 -- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: - 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 - ![thirdparty_install_dir](pic/xmlrpc-c_install_dir.png) +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示: +  ![thirdparty_install_dir](pic/xmlrpc-c_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` - #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libxmlrpc.so.3) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libxmlrpc.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/include/xmlrpc-c/${OHOS_ARCH}) - ``` - ![xmlrpc-c_usage](pic/xmlrpc-c_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行ctest运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/xmlrpc-c/docs/pic/xmlrpc-c_install_dir.png b/thirdparty/xmlrpc-c/docs/pic/xmlrpc-c_install_dir.png index baf1b2b6961af0c55da6b5456c4fa2bc509168d0..6cad2dfc41687c6ae836aafdb1ae0386df6f84d2 100644 Binary files a/thirdparty/xmlrpc-c/docs/pic/xmlrpc-c_install_dir.png and b/thirdparty/xmlrpc-c/docs/pic/xmlrpc-c_install_dir.png differ diff --git a/thirdparty/xxHash/HPKCHECK b/thirdparty/xxHash/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..bbf7631426601577732c2a4c957f2b6e0a69d457 --- /dev/null +++ b/thirdparty/xxHash/HPKCHECK @@ -0,0 +1,16 @@ +#Contributor: liucheng <1596268623@qq.com> +#Maintainer: liucheng <1596268623@qq.com> + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + + +openharmonycheck() { + res=0 + cd xxHash-${ARCH}-build/${builddir}/ + /bin/bash tests/unicode_lint.sh > ${logfile} 2>&1 + res=$? + cd $OLDPWD + + return $res +} diff --git a/thirdparty/xxHash/docs/hap_integrate.md b/thirdparty/xxHash/docs/hap_integrate.md index 92a7bc4ec400fdfb5e762a8616a77e7721567fa9..803b76e6064e38379f4147e6d516eaaabbc05656 100644 --- a/thirdparty/xxHash/docs/hap_integrate.md +++ b/thirdparty/xxHash/docs/hap_integrate.md @@ -24,15 +24,10 @@ ├── README_zh.md ``` -- 将三方库拷贝至tools/main目录下 - ```shell - cd tpc_c_cplusplus - cp thirdparty/xxHash tools/main -rf +- 在lycium目录下编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#编译环境准备) ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) - ``` - cd tools + cd lycium ./build.sh xxHash ``` - 三方库头文件及生成的库 diff --git a/thirdparty/xz/README_zh.md b/thirdparty/xz/README_zh.md index 99509dd9edff205522b40c21f07234f0d8dae817..41400764a8555c5bff1ffb52f044fdca2ce07c2e 100644 --- a/thirdparty/xz/README_zh.md +++ b/thirdparty/xz/README_zh.md @@ -7,9 +7,10 @@ XZ 是免费的通用数据压缩软件,具有较高的压缩比。 ## 使用约束 - ROM版本:OpenHarmony3.2 Beta1 +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:5.2.6 - 当前适配的功能:完成了 .lzma 格式文件的压缩、解压缩 -- [License : GPLv2](https://git.tukaani.org/?p=xz.git;a=blob;f=COPYING.GPLv2;h=d159169d1050894d3ea3b98e1c965c4058208fe1;hb=8dfed05bdaa4873833ba24279f02ad2db25effea) ## 集成方式 diff --git a/thirdparty/xz/docs/hap_integrate.md b/thirdparty/xz/docs/hap_integrate.md index b5e12691247a2b709d4992b2cefb047c9f12c63e..0b8ca60673c5a235cf57791786eb2f4bab61b017 100644 --- a/thirdparty/xz/docs/hap_integrate.md +++ b/thirdparty/xz/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/xz #三方库xz的目录结构如下 @@ -24,19 +25,16 @@ ├── README_zh.md ``` -- 将openssl拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/xz tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh xz ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` xz/arm64-v8a xz/armeabi-v7a @@ -46,24 +44,21 @@ ## 应用中使用三方库 -- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录: - 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将对应的so文件拷贝到对应CPU架构的目录 -- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示 - ![xz_install_dir](pic/xz_install_dir.png) +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示: +  ![xz_install_dir](pic/xz_install_dir.png) - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/liblzma.so.5.4.1) + target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/liblzma.so) #将三方库的头文件加入工程中 - target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/xz/${OHOS_ARCH}/include) ``` + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/xz/${OHOS_ARCH}/include) ``` - ![xz_usage](pic/xz_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行 ctest 运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) -![xz_test](pic/xz_test.png) + ![xz_test](pic/xz_test.png) ## 参考资料 diff --git a/thirdparty/xz/docs/pic/xz_install_dir.png b/thirdparty/xz/docs/pic/xz_install_dir.png index a6836746a62471a77e55fc221b42f22a82811dcf..42d915bbc25ef5daec97393184fc64688149e4d0 100644 Binary files a/thirdparty/xz/docs/pic/xz_install_dir.png and b/thirdparty/xz/docs/pic/xz_install_dir.png differ diff --git a/thirdparty/zbar/README_zh.md b/thirdparty/zbar/README_zh.md index b0fa86f9ed68165231433845c9338275a8f33abb..68210c30f93a117518b95a96b8690a0890612523 100644 --- a/thirdparty/zbar/README_zh.md +++ b/thirdparty/zbar/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 zbar是一个条形码和二维码解析的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:0.10 - 当前适配的功能:支持条形码和二维码解析 -- [LGPL2.1](https://zbar.sourceforge.net/) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/zbar/docs/hap_integrate.md b/thirdparty/zbar/docs/hap_integrate.md index 95e80075ba23e380e617966a93fb86efc0340004..2900321a40e3a05682ab7e87f225abef76c5918c 100644 --- a/thirdparty/zbar/docs/hap_integrate.md +++ b/thirdparty/zbar/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/zbar #三方库zbar的目录结构如下 @@ -23,20 +24,16 @@ ├── README_zh.md ``` -- 将zbar、libpng拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/zbar tools/main -rf - cp thirdparty/libpng tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh libpng zbar ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` zbar/arm64-v8a zbar/armeabi-v7a libpng/arm64-v8a libpng/armeabi-v7a @@ -51,13 +48,12 @@ - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ``` #将三方库加入工程中 - target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libzbar.so.0) + target_link_libraries(entry PRIVATE ${CMAKE_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libzbar.so) #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zbar/${OHOS_ARCH}/include) ``` - ![zbar_usage](pic/zbar_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的scan_image可执行文件及条形码barcode.png、二维码qrcode.png准备好 diff --git a/thirdparty/zbar/docs/pic/zbar_install_dir.jpg b/thirdparty/zbar/docs/pic/zbar_install_dir.jpg index fd69c551c49a9b82068868a9a77aa8d352121489..3be8f73c8ab14b4221ead28a18af21404842071a 100644 Binary files a/thirdparty/zbar/docs/pic/zbar_install_dir.jpg and b/thirdparty/zbar/docs/pic/zbar_install_dir.jpg differ diff --git a/thirdparty/zlib/README_zh.md b/thirdparty/zlib/README_zh.md index 673d37ef4b2d5a67ddf3ec5c1ad35eec3d593de3..f272761f073c53e8b949abedc9720963b418e2e4 100644 --- a/thirdparty/zlib/README_zh.md +++ b/thirdparty/zlib/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 zlib是提供数据压缩用的函式库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.2.13 - 当前适配的功能:支持数据压缩能力 -- [zlib License](https://github.com/madler/zlib/blob/master/LICENSE) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/zlib/docs/hap_integrate.md b/thirdparty/zlib/docs/hap_integrate.md index f96d953e513b32325d702902575ab835028ce96a..61b2092a819c394e566e4693db2626275000fd66 100644 --- a/thirdparty/zlib/docs/hap_integrate.md +++ b/thirdparty/zlib/docs/hap_integrate.md @@ -6,10 +6,10 @@ - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 @@ -30,25 +30,18 @@ ├── README_zh.md ``` -- 将zlib拷贝至tools/main目录下 +- 编译三方库 - ```shell - cd tpc_c_cplusplus - cp thirdparty/zlib tools/main -rf - ``` - -- 在tools目录下编译三方库 - - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) ```shell - cd tools + cd lycium ./build.sh zlib ``` - + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ```shell zlib/arm64-v8a zlib/armeabi-v7a @@ -61,8 +54,10 @@ - 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示   - ![thirdparty_install_dir](pic/zlib_install_dir.png) +  ![thirdparty_install_dir](pic/zlib_install_dir.png) + + - 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 ```shell @@ -72,11 +67,10 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/${OHOS_ARCH}/include) ``` - ![zlib_usage](pic/zlib_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录,执行make check (arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/zlib/docs/pic/zlib_install_dir.png b/thirdparty/zlib/docs/pic/zlib_install_dir.png index bbcbc66bcba3c7262e334b75d15e80fea171c684..66d263521701d509d01e5f8bb6743ffc6210d9fc 100644 Binary files a/thirdparty/zlib/docs/pic/zlib_install_dir.png and b/thirdparty/zlib/docs/pic/zlib_install_dir.png differ diff --git a/thirdparty/zstd/README_zh.md b/thirdparty/zstd/README_zh.md index 5aeeb5cd9fe1086f4c8559dc0c9b7c8686881d21..7a886fa1aa6dc8e78f693985bff7368066812054 100644 --- a/thirdparty/zstd/README_zh.md +++ b/thirdparty/zstd/README_zh.md @@ -3,9 +3,10 @@ zstd 是一种快速的无损压缩算法,是针对 zlib 级别的实时压缩方案,以及更好的压缩比。 ## 使用约束 - ROM版本:OpenHarmony3.2 Beta1 +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v1.5.2 - 当前适配的功能:完成了生成和解码 .zst 格式以及字典压缩、解压缩 -- [License : BSD and GPLv2](https://github.com/facebook/zstd/tree/zstd-0.4.2) ## 集成方式 + [系统Rom包集成](docs/rom_integrate.md) + [应用hap包集成](docs/hap_integrate.md) \ No newline at end of file diff --git a/thirdparty/zstd/docs/hap_integrate.md b/thirdparty/zstd/docs/hap_integrate.md index 69d8f7d82cc7b04526f716f7bb07b982ffaab3fb..d64c928c0400f910d68e930835502a809036264d 100644 --- a/thirdparty/zstd/docs/hap_integrate.md +++ b/thirdparty/zstd/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/zstd #三方库zstd的目录结构如下 @@ -24,19 +25,16 @@ ├── README_zh.md ``` -- 将openssl拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/zstd tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 在编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh zstd ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` zstd/arm64-v8a zstd/armeabi-v7a @@ -55,9 +53,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zstd/${OHOS_ARCH}/include) ``` - ![zstd_usage](pic/zstd_usage.png) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) 进入到构建目录执行 ctest 运行测试用例(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录) diff --git a/thirdparty/zxing-cpp/README_zh.md b/thirdparty/zxing-cpp/README_zh.md index 8475493fc3644372e97027ddda63b99a26707f44..7e877c03323864b65a9b616dd77f1b126ffdd4b4 100644 --- a/thirdparty/zxing-cpp/README_zh.md +++ b/thirdparty/zxing-cpp/README_zh.md @@ -2,11 +2,10 @@ ## 功能简介 zxing-cpp是一个二维码生成和解析的库。 ## 使用约束 -- IDE版本:DevEco Studio 3.1 Beta2 -- SDK版本:ohos_sdk_public 3.2.11.9 (API Version 9 Release) +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) - 三方库版本:v2.0.0 - 当前适配的功能:二维码生成和解析 -- [Apache License 2.0](https://github.com/zxing-cpp/zxing-cpp) ## 集成方式 + [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/zxing-cpp/docs/hap_integrate.md b/thirdparty/zxing-cpp/docs/hap_integrate.md index 8931c53224faacb7902e239e6fdf31498e9e68f4..8cf846c25b0e6c92fee13af07c742c8c7e79b385 100644 --- a/thirdparty/zxing-cpp/docs/hap_integrate.md +++ b/thirdparty/zxing-cpp/docs/hap_integrate.md @@ -3,15 +3,16 @@ ## 开发环境 - ubuntu20.04 - [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz) -- [ohos_sdk_public 3.2.11.9 (API Version 9 Release)](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fohos-sdk-windows_linux-public.tar.gz) -- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70) -- [准备三方库构建环境](../../../tools/README.md#编译环境准备) -- [准备三方库测试环境](../../../tools/README.md#ci环境准备) +- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz) +- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2) +- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备) +- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备) ## 编译三方库 - 下载本仓库 ``` git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 ``` + - 三方库目录结构 ``` tpc_c_cplusplus/thirdparty/zxing-cpp #三方库zxing-cpp的目录结构如下 @@ -22,19 +23,16 @@ ├── README_zh.md ``` -- 将zxing-cpp拷贝至tools/main目录下 - ``` - cd tpc_c_cplusplus - cp thirdparty/zxing-cpp tools/main -rf - ``` -- 在tools目录下编译三方库 - 编译环境的搭建参考[准备三方库构建环境](../../../tools/README.md#编译环境准备) +- 编译三方库 + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + ``` - cd tools + cd lycium ./build.sh zxing-cpp ``` + - 三方库头文件及生成的库 - 在tools目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 ``` zxing-cpp/arm64-v8a zxing-cpp/armeabi-v7a ``` @@ -52,9 +50,8 @@ #将三方库的头文件加入工程中 target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zxing-cpp/${OHOS_ARCH}/include) ``` - ![zxing-cpp_usage](pic/zxing-cpp_usage.jpg) ## 测试三方库 -三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../tools/README.md#ci环境准备) +三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) - 将编译生成的ZXingReader、ZXingWriter可执行文件及测试文件二维码qrcode.png准备好