mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-27 01:11:35 +00:00
更新ohos-sdk文件比对工具规格
Signed-off-by: jwx1102601 <jiangqianjin@huawei.com>
This commit is contained in:
parent
4e0d9c39ad
commit
16afccb3b6
@ -1,7 +1,7 @@
|
||||
# ohos-sdk 两个版本文件比对工具
|
||||
|
||||
## 简介
|
||||
比对两个ohos-sdk版本,将两个版本共同文件以及缺失文件输出到Excel表格中
|
||||
比对两个ohos-sdk版本,将两个版本相同平台的共同文件以及缺失文件输出到Excel表格中
|
||||
|
||||
## 目录
|
||||
|
||||
@ -27,16 +27,16 @@
|
||||
在'dist'文件夹下进入终端,运行以下命令即可运行工具
|
||||
|
||||
```
|
||||
main.exe -N compare -P 旧版SDK路径 -M 新版SDK路径 -O 输出文件差异结果Excel表格地址
|
||||
main.exe -N compare -P 旧版SDK路径(确定到平台) -M 新版SDK路径(确定到平台) -O 输出文件差异结果Excel表格地址
|
||||
|
||||
例如:main.exe -N compare -P E:\unzip2\3.2.3.0\ohos-sdk -M E:\unzip2\3.2.6.3\ohos-sdk -O C:\Users\Administrator\Desktop\0325\diff.xlsx
|
||||
例如:main.exe -N compare -P E:\3.2.3.0\ohos-sdk\linux -M E:\3.2.6.3\ohos-sdk\linux -O E:\diff.xlsx
|
||||
```
|
||||
|
||||
> **说明:**
|
||||
>
|
||||
> 1、需保证参数按照规定顺序输入
|
||||
>
|
||||
> 2、旧版本SDK和新版本SDK路径必须确定在ohos-sdk目录下,且ohos-sdk目录下为linux、windows两个文件夹
|
||||
> 2、旧版本SDK和新版本SDK路径必须确定在ohos-sdk目录下的linux、windows或者mac文件夹,各平台内压缩包无需手动解压
|
||||
>
|
||||
> 3、输出地址如果只填写文件路径未指定具体的输出文件名,则会在指定文件目录下输出'diff.xlsx'文件,也可将文件名拼接至输出路径中
|
||||
>
|
||||
|
@ -134,18 +134,11 @@ def extract_file_path(file_path):
|
||||
|
||||
|
||||
def start_do_diff(old_file_path, new_file_path, output_file_path):
|
||||
# 处理linux
|
||||
old_linux = os.path.join(old_file_path, 'linux')
|
||||
new_linux = os.path.join(new_file_path, 'linux')
|
||||
unzip(old_linux)
|
||||
unzip(new_linux)
|
||||
do_diff(old_linux, new_linux, 'linux')
|
||||
# 处理windows
|
||||
old_windows = os.path.join(old_file_path, 'windows')
|
||||
new_windows = os.path.join(new_file_path, 'windows')
|
||||
unzip(old_windows)
|
||||
unzip(new_windows)
|
||||
do_diff(old_windows, new_windows, 'windows')
|
||||
old_platform = os.path.basename(old_file_path)
|
||||
system_type = old_platform
|
||||
unzip(old_file_path)
|
||||
unzip(new_file_path)
|
||||
do_diff(old_file_path, new_file_path, system_type)
|
||||
# 输出Excel
|
||||
if os.path.isdir(output_file_path):
|
||||
output_file_path = os.path.join(output_file_path, 'diff.xlsx')
|
||||
|
Loading…
Reference in New Issue
Block a user