diff --git a/README.md b/README.md index 4c377360b828fc99f3caaa8eca2f2c72a64df44d..440ec7b762e4aedade0bc975906bdf12a32969be 100755 --- a/README.md +++ b/README.md @@ -2,21 +2,17 @@ SysCap(SystemCapability) encoder and decoder tools common usage scenarios as follow: -1.APP development: IDE collect APP required SysCap and API verssion as in RPCID encoder input. And IDE will decode PCID to device SysCap list when it imported. +APP development: IDE collect APP required SysCap and API verssion as in RPCID encoder input. And IDE will decode PCID to device SysCap list when it imported. This tool is only for use by the IDE, developers will not be used directly. -2.APP distribution: RPCID/PCID decoder used for APP distribution procedure, APP store will check whether device's SysCap satisfy APP required SysCap. +Main function: -## Architecture +1. PCID Encode: Encode SysCap list to PCID. -SysCap codec tools has two components: +2. PCID Decode: Decode PCID to get system SysCap list. -1.PCID Encode: Encode SysCap list to PCID. +3. RPCID Encode: Encode APP required SysCap list to RPCID. -2.PCID Decode: Decode PCID to get system SysCap list. - -3.RPCID Encode: Encode APP required SysCap list to RPCID. - -4.RPCID Decode: Decode RPCID to get APP required SysCap list. +4. RPCID Decode: Decode RPCID to get APP required SysCap list. ## File Structure @@ -44,15 +40,17 @@ syscap_tool binary building steps as follow: 1. Build commands:SysCap tools binary building and installation will be tiggered by SDK compiling procedure. How to build SDK please refer to https://gitee.com/openharmony/build/blob/master/README_zh.md. -2. Building cmd should be adjust for host platform as same as SDK compiling, the archive will in corresponding platform directoty. Note: Ubuntu host only avaiable for windows/linux building, MacOs binary should building on MacOs host. +2. Building cmd should be adjust for host platform as same as SDK compiling, the archive will in corresponding platform directoty. + +Note: Ubuntu host only avaiable for windows/linux building, MacOs binary should building on MacOs host. ### Downloading Binary -[1.Downlaod SDK(recommonded))] +1. Downlaod SDK(recommonded) Download daily builds(http://ci.openharmony.cn/dailybuilds) which included SDK. -[3.Supported Host] +2. Supported Host Windows x86_64/Linux x86_64/Darwin x86_64 @@ -62,6 +60,8 @@ SysCap tools usually integrate to IDE, APP store and bundle tools. Follow instru ./syscap_tool -h or ./syscap_tool --help: ``` +./syscap_tool --help + ./syscap_tool -R/P -e/d -i filepath [-o outpath] -h, --help : how to use diff --git a/README_ZH.md b/README_ZH.md index 8ed0ac6398961c5ba1e196a7f1e46f77d1900076..6b336e36d1c9e18cea738220a3599fde64f5d6fd 100755 --- a/README_ZH.md +++ b/README_ZH.md @@ -1,23 +1,18 @@ # 系统能力编解码工具 -系统能力(SystemCapability, 本文中使用SysCap缩写)编解码工具的应用场景: +系统能力(SystemCapability, 本文中使用SysCap缩写)编解码工具应用场景如下: -1.应用开发时,IDE会根据应用配置的Syscap和API版本生成描述RPCID的json文件,并调用编解码工具syscap_tool将该json文件编码成RPCID。另一方面,IDE拿到开发者导入PCID,使用该工具解码出设备的Syscap集合。该工具仅供IDE使用,对用户不可见。 +应用开发时,IDE会根据应用配置的SysCap和API版本生成描述RPCID(Required Product Compatibility ID)的json文件,并调用编解码工具syscap_tool将该json文件编码成RPCID。另一方面,IDE拿到开发者导入PCID(Product Compatibility ID),使用该工具解码出设备的SysCap集合。该工具仅供IDE使用,对用户不可见。 -2.应用分发时,应用市场调用该编解码工具syscap_tool,对应用的RPCID解码获得应用所需的Syscap集合。另一方面,对设备的PCID进行解码,获取系统的Syscap集合。 +提供的主要功能: +1. PCID编码:对描述SysCap集合的文件编码生成PCID。 -## 架构 +2. PCID解码:对编码后的PCID文件解码获取SysCap集合。 -SysCap编解码工具提供的主要功能: +3. RPCID编码:对描述应用所需的SysCap集合的文件编码生成RPCID。 -1.PCID编码:对描述系统能力集合的文件编码生成PCID。 - -2.PCID解码:对编码后的PCID文件解码获取系统能力集合。 - -3.RPCID编码:对描述应用所需的系统能力集合的文件编码生成RPCID。 - -4.RPCID解码:对编码后的RPCID文件解码获取应用所需的系统能力集合。 +4. RPCID解码:对编码后的RPCID文件解码获取应用所需的SysCap集合。 ## 目录 @@ -26,7 +21,7 @@ SysCap编解码工具提供的主要功能: ├── syscap_codec # syscap codec代码目录 │ ├── include │ │ └── syscap_tool.h # syscap_tool_shared对外接口定义 -│ └── src +│ ├── src │ │ ├── endian_internel.h # 内部实现的大小端转换接口定义(便于win、mac、linux平台通用) │ │ ├── endian_internel.c # 大小端转换实现 │ │ ├── main.c # syscap_tool命令行工具代码实现 @@ -39,27 +34,23 @@ SysCap编解码工具提供的主要功能: PC端工具,不对外提供API。 -### pc端编译说明 - +### PC端编译说明 -syscap_tool pc端可执行文件编译步骤: +syscap_tool PC端可执行文件编译步骤: -1. 编译命令:编译sdk命令 请参考https://gitee.com/openharmony/build/blob/master/README_zh.md 仓编译sdk说明, 执行其指定的sdk编译命令来编译整个sdk, syscap_tool会被编译打包到里面。 +1. 编译命令:参考https://gitee.com/openharmony/build/blob/master/README_zh.md ,执行其指定的sdk编译命令来编译整个sdk, syscap_tool会被编译打包到里面。 -2. 编译:在目标开发机上运行上面调整好的sdk编译命令, 正常编译syscap_tool会输出到sdk平台相关目录下; 注意: ubuntu环境下只能编译windows/linux版本工具,mac版需要在macos开发机上编译。 +2. 编译:在目标开发机上运行上面调整好的sdk编译命令, 正常编译syscap_tool会输出到sdk平台相关目录下。 -### pc端获取说明 +注意: ubuntu环境下只能编译windows/linux版本工具,mac版需要在macos开发机上编译。 -[1.下载sdk获取(建议)](#section161941989591) +### PC端获取说明 -通过访问本社区网站下载dailybuilds或正式发布的sdk压缩包,从中根据自己平台到相应的目录toolchain下解压提取。 +1. 下载sdk获取(建议) +通过访问本社区网站http://ci.openharmony.cn/dailybuilds ,下载sdk压缩包,从中根据自己平台到相应的目录toolchain下解压提取。 -[2.自行编译](#section161941989592) - -编译请参考上面单独小节,本项目仓prebuilt目录下不再提供预制。 - -[3.支持运行环境](#section161941989593) +2. 支持运行环境 Windows x86_64/Linux x86_64/Darwin x86_64 @@ -69,6 +60,8 @@ Windows x86_64/Linux x86_64/Darwin x86_64 使用./syscap_tool -h或者./syscap_tool --help查看: ``` +./syscap_tool --help + ./syscap_tool -R/P -e/d -i filepath [-o outpath] -h, --help : how to use