mirror of
https://gitee.com/openharmony/napi_generator
synced 2024-11-23 16:30:17 +00:00
修改错误
Signed-off-by: gou-jingjing <goujingjing@kaihong.com>
This commit is contained in:
parent
af8fd000f8
commit
bb44e0bf81
@ -20,7 +20,7 @@ h2dtscpp工具由C++语法解释器和代码生成器两部分组成。C++语法
|
||||
|
||||
npm i stdio
|
||||
|
||||
3.下载header_parser.exe文件:[header_parser.exe](https://gitee.com/openharmony/napi_generator/releases/tag/生成工具);选择 tool.rar下载并解压,将解压后的文件中的header_parser.exe拷贝到拷贝到node Js执行路径下(如C:\software\nodeJs)
|
||||
3.下载header_parser.exe文件:[header_parser.exe](https://gitee.com/openharmony/napi_generator/releases/tag/生成工具);选择 tool.rar下载并解压,将解压后的文件中的header_parser.exe拷贝到napi_generator/src/cli/h2dtscpp/src/src/tsGen目录下。
|
||||
|
||||
4.将待转换的.h文件拷贝到napi_generator/src/cli/h2dtscpp/src下,如 [cJSON测试三方库](https://gitee.com/openharmony/napi_generator/releases/tag/测试用资源) 的cJSON.h。
|
||||
|
||||
|
@ -38,6 +38,10 @@ function parseFileAll(hFilePath) {
|
||||
let execPath = path.dirname(process.execPath);
|
||||
let exeFile = sysInfo === 'win32' ? path.join(execPath, 'header_parser.exe') :
|
||||
path.join(execPath, 'header_parser');
|
||||
if(!fs.existsSync(exeFile)) {
|
||||
// 若是用node执行
|
||||
exeFile = path.join(__dirname, "header_parser.exe")
|
||||
}
|
||||
cmd = exeFile + ' ' + hFilePath;
|
||||
|
||||
let parseResult = null;
|
||||
|
Loading…
Reference in New Issue
Block a user