1# OpenHarmony资源编译工具 2 3## 介绍 4资源编译工具属于PC端工具,在OpenHarmony SDK中toolchain目录下,提供给IDE使用,支持Windows, Linux, MacOS平台。 5 6## 目录 7 8``` 9/developtools 10|----global_resource_tool 11| |----include #头文件 12| |----src #源代码文件 13| |----test #测试用例 14| |----build #依赖三方库编译脚本 15| |----BUILD.gn #编译脚本 16| |----CMakeLists.txt #CMake文件 17| |----win32.cmake #Windows交叉编译脚本 18``` 19 20## 使用说明 21 22### SDK编译命令 23 24[SDK编译命令参考](https://gitee.com/openharmony/build/blob/master/README_zh.md) 25 26### 测试用例 27 28PC 上运行 `python test.py ./restool ./out` 29 30### 命令帮助 31 32本工具由IDE和OpenHarmony编译系统集成调用。 33 34支持的命令行参数,例如: 35 36-v 显示工具版本号 37-i 资源输入目录 38-o 资源输出目录 39-r 资源ID头文件 40-p 应用包名 41-f 如果输出目录中已经存在结果,强制覆盖 42-m 编译多hap包,输入多个hap包的编译结果路径,例如:entry1,entry2,.. 43-j 编译多hap包+多har时,合并后config.json的文件路径 44-e Id的开始标记 45 46``` 47entry目录结构 48| |----resource 49| |----config.json 或者 module.json 都兼容 50``` 51`./restool -i entry1 -i entry2 -j xxx/module.json -p ohos.demo.xxx -o out -r out/ResourceTable.h ` 52 53## 相关仓 54 55**global_resource_tool** 56 57[third_party_libxml2](https://gitee.com/openharmony/third_party_libxml2/blob/master/README.md) 58 59[third_party_jsoncpp](https://gitee.com/openharmony/third_party_jsoncpp/blob/master/README.md) 60 61[third_party_sqlite](https://gitee.com/openharmony/third_party_sqlite/blob/master/README.md) 62 63[third_party_bounds_checking_function](https://gitee.com/openharmony/third_party_bounds_checking_function/blob/master/README.md ) 64