• Home
Name Date Size #Lines LOC

..--

include/12-May-2024-4218

src/12-May-2024-978812

test/12-May-2024-126103

BUILD.gnD12-May-20242.4 KiB9876

LICENSED12-May-202410.1 KiB177150

OAT.xmlD12-May-20242.6 KiB5134

README.mdD12-May-20242.5 KiB8450

README_ZH.mdD12-May-20242.9 KiB8450

RELEASE-NOTE.txtD12-May-202421 11

bundle.jsonD12-May-2024741 3131

README.md

1# System Capability Encoder and Decoder Tools
2
3SysCap(SystemCapability) encoder and decoder tools common usage scenarios as follow:
4
5APP 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.
6
7Main function:
8
91. PCID Encode: Encode SysCap list to PCID.
10
112. PCID Decode: Decode PCID to get system SysCap list.
12
133. RPCID Encode: Encode APP required SysCap list to RPCID.
14
154. RPCID Decode: Decode RPCID to get APP required SysCap list.
16
17## File Structure
18
19```
20/developtools
21├── syscap_codec                 # root directory
22│   ├── include
23│   │   └── syscap_tool.h        # interfaces
24│   └── src
25│   │   ├── endian_internel.h    # internal big/little endian conversion headers(common for win、mac、linux)
26│   │   ├── endian_internel.c    # big/little endian conversion implement
27│   │   ├── main.c               # command line implement
28│   │   └── syscap_tool.c        # codec implement
29│   └── test
30│       └── syscap_tool_test.c   # syscap_tool test codec implement
31```
32
33### API
34
35PC tools, no API provided.
36
37### Building Manually
38
39syscap_tool binary building steps as follow:
40
411. 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.
42
432. Building cmd should be adjust for host platform as same as SDK compiling, the archive will in corresponding platform directoty.
44
45Note: Ubuntu host only avaiable for windows/linux building, MacOs binary should building on MacOs host.
46
47### Downloading Binary
48
491. Downlaod SDK(recommonded)
50
51Download daily builds(http://ci.openharmony.cn/dailybuilds) which included SDK.
52
532. Supported Host
54
55Windows x86_64/Linux x86_64/Darwin x86_64
56
57### Help
58
59SysCap tools usually integrate to IDE, APP store and bundle tools. Follow instructions for debugging manually:
60
61./syscap_tool -h or ./syscap_tool --help:
62```
63./syscap_tool --help
64
65./syscap_tool -R/P -e/d -i filepath [-o outpath]
66
67-h, --help : how to use
68
69-R, --RPCID : encode or decode RPCID
70
71-P, --PCID : encode or decode PCID
72
73-e, --encode : to encode
74
75-d, --encode : to decode
76
77-i filepath, --input filepath : input file
78
79-o outpath, --input outpath : output path
80```
81
82### Release Note
83
84v1.0.0 2022-3-8 first release, SysCap codec supported for Windows/Linux/Mac host.

README_ZH.md

1# 系统能力编解码工具
2
3系统能力(SystemCapability, 本文中使用SysCap缩写)编解码工具应用场景如下:
4
5应用开发时,IDE会根据应用配置的SysCap和API版本生成描述RPCID(Required Product Compatibility ID)的json文件,并调用编解码工具syscap_tool将该json文件编码成RPCID。另一方面,IDE拿到开发者导入PCID(Product Compatibility ID),使用该工具解码出设备的SysCap集合。该工具仅供IDE使用,对用户不可见。
6
7提供的主要功能:
8
91. PCID编码:对描述SysCap集合的文件编码生成PCID。
10
112. PCID解码:对编码后的PCID文件解码获取SysCap集合。
12
133. RPCID编码:对描述应用所需的SysCap集合的文件编码生成RPCID。
14
154. RPCID解码:对编码后的RPCID文件解码获取应用所需的SysCap集合。
16
17## 目录
18
19```
20/developtools
21├── syscap_codec                 # syscap codec代码目录
22│   ├── include
23│   │   └── syscap_tool.h        # syscap_tool_shared对外接口定义
24│   ├── src
25│   │   ├── endian_internel.h    # 内部实现的大小端转换接口定义(便于win、mac、linux平台通用)
26│   │   ├── endian_internel.c    # 大小端转换实现
27│   │   ├── main.c               # syscap_tool命令行工具代码实现
28│   │   └── syscap_tool.c        # syscap_tool编解码接口的实现
29│   └── test
30│       └── syscap_tool_test.c   # syscap_tool功能测试代码实现
31```
32
33### API
34
35PC端工具,不对外提供API。
36
37### PC端编译说明
38
39syscap_tool PC端可执行文件编译步骤:
40
411. 编译命令:参考https://gitee.com/openharmony/build/blob/master/README_zh.md ,执行其指定的sdk编译命令来编译整个sdk, syscap_tool会被编译打包到里面。
42
432. 编译:在目标开发机上运行上面调整好的sdk编译命令, 正常编译syscap_tool会输出到sdk平台相关目录下。
44
45注意: ubuntu环境下只能编译windows/linux版本工具,mac版需要在macos开发机上编译。
46
47### PC端获取说明
48
491. 下载sdk获取(建议)
50
51通过访问本社区网站http://ci.openharmony.cn/dailybuilds ,下载sdk压缩包,从中根据自己平台到相应的目录toolchain下解压提取。
52
532. 支持运行环境
54
55Windows x86_64/Linux x86_64/Darwin x86_64
56
57### 命令帮助
58
59本工具一般被IDE、应用市场和包管理器集成,手工调试时可参考以下说明。
60
61使用./syscap_tool -h或者./syscap_tool --help查看:
62```
63./syscap_tool --help
64
65./syscap_tool -R/P -e/d -i filepath [-o outpath]
66
67-h, --help : how to use
68
69-R, --RPCID : encode or decode RPCID
70
71-P, --PCID : encode or decode PCID
72
73-e, --encode : to encode
74
75-d, --encode : to decode
76
77-i filepath, --input filepath : input file
78
79-o outpath, --input outpath : output path
80```
81
82### Release Note
83
84v1.0.0 2022-3-8 首版本,提供Windows/Linux/Mac平台的系统能力编解码。