From 903abc97857ca090ab5088826cf065b597a19077 Mon Sep 17 00:00:00 2001 From: guodongqi Date: Wed, 1 Jun 2022 10:33:15 +0800 Subject: [PATCH] fix: support HDI of extended directory Signed-off-by: guodongqi --- uhdf2/hdi.gni | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/uhdf2/hdi.gni b/uhdf2/hdi.gni index 95b2a70..13132ba 100644 --- a/uhdf2/hdi.gni +++ b/uhdf2/hdi.gni @@ -22,14 +22,20 @@ template("hdi") { assert(defined(invoker.subsystem_name), "subsystem_name are must") assert(defined(invoker.part_name), "part_name are must") + root_package = "ohos.hdi" root_path = rebase_path("//drivers/interface") - root_package_mapping = "ohos.hdi:${root_path}" + if (defined(invoker.root)) { + package_path_map = string_split(invoker.root, ":") + root_package = package_path_map[0] + root_path = rebase_path(package_path_map[1]) + } + root_package_path = "${root_package}:${root_path}" get_info_args = [ "-i", invoker.language, rebase_path(target_gen_dir), - root_package_mapping, + root_package_path, ] get_info_args += rebase_path(invoker.sources) files_info = exec_script("$hdf_fwk_path/tools/hdi-gen/build_hdi_files.py", @@ -100,7 +106,7 @@ template("hdi") { } args += [ "-r", - root_package_mapping, + root_package_path, ] } -- Gitee