From 228d6767d8dea691e63e676a691f51ea4ced6e29 Mon Sep 17 00:00:00 2001 From: lwx1153805 Date: Thu, 14 Sep 2023 14:25:22 +0800 Subject: [PATCH] Title: migrate ohos_config.json to out directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: migrate ohos_config.json to out directory Issue: https://gitee.com/openharmony/build/issues/I817RU?from=project-issue Test:build Signed-off-by: lwx1153805 --- hb/resources/global_var.py | 2 +- hb/util/post_build/part_rom_statistics.py | 2 +- ohos/images/mkimage/mkcpioimage.py | 2 +- ohos/images/mkimage/mkimages.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hb/resources/global_var.py b/hb/resources/global_var.py index 8c4f10bf32..f21251da9e 100644 --- a/hb/resources/global_var.py +++ b/hb/resources/global_var.py @@ -52,7 +52,7 @@ CURRENT_TOOL_ARGS = os.path.join( BUILD_CONFIG_FILE = os.path.join( CURRENT_HB_DIR, 'resources/config/config.json') -ROOT_CONFIG_FILE = os.path.join(CURRENT_OHOS_ROOT, 'ohos_config.json') +ROOT_CONFIG_FILE = os.path.join(CURRENT_OHOS_ROOT, 'out/ohos_config.json') STATUS_FILE = os.path.join(CURRENT_HB_DIR, 'resources/status/status.json') ENV_SETUP_FILE = os.path.join( diff --git a/hb/util/post_build/part_rom_statistics.py b/hb/util/post_build/part_rom_statistics.py index fb076997f9..2a2e0c6825 100644 --- a/hb/util/post_build/part_rom_statistics.py +++ b/hb/util/post_build/part_rom_statistics.py @@ -207,7 +207,7 @@ def read_subsystem_config(root_path): def read_ohos_config(root_path): - file_path = os.path.join(root_path, "ohos_config.json") + file_path = os.path.join(root_path, "out/ohos_config.json") with open(file_path, 'r') as file: file_json = json.load(file) os_level = file_json["os_level"] diff --git a/ohos/images/mkimage/mkcpioimage.py b/ohos/images/mkimage/mkcpioimage.py index a4892d0da2..dd61dde1a1 100755 --- a/ohos/images/mkimage/mkcpioimage.py +++ b/ohos/images/mkimage/mkcpioimage.py @@ -133,7 +133,7 @@ def main(args): args = args_parse(args) print("Make cpio image!") config = {} - with open("../../ohos_config.json") as f: + with open("../../out/ohos_config.json") as f: config = json.load(f) build_run_cpio(args) build_run_chmod(args) diff --git a/ohos/images/mkimage/mkimages.py b/ohos/images/mkimage/mkimages.py index 9f14878954..f3db7591b9 100755 --- a/ohos/images/mkimage/mkimages.py +++ b/ohos/images/mkimage/mkimages.py @@ -120,7 +120,7 @@ def mk_images(args): print("mk_images need 4 args!!!") sys.exit(1) root_path = find_top() - config_json = os.path.join(root_path, "ohos_config.json") + config_json = os.path.join(root_path, "out/ohos_config.json") config = {} with open(config_json, 'rb') as f: config = json.load(f) -- Gitee