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.