From ae99b2f10b07da5fe7c7780c670cc3de0a81c6cb Mon Sep 17 00:00:00 2001 From: lixingchi1 Date: Tue, 19 Aug 2025 23:55:56 +0800 Subject: [PATCH] process the arkui interop by copy Signed-off-by: lixingchi1 --- BUILD.gn | 20 +++++++++++++++++--- arkui_interop_copy_dynamic.sh | 25 +++++++++++++++++++++++++ interface_config.gni | 2 ++ process_label_noninterop.py | 6 +++--- 4 files changed, 47 insertions(+), 6 deletions(-) create mode 100755 arkui_interop_copy_dynamic.sh diff --git a/BUILD.gn b/BUILD.gn index c06527ca05..ed18434d0e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -442,7 +442,7 @@ action("build_sdk_interop1") { "--current-os-dir", current_os, "--output-interface-sdk", - rebase_path(ohos_ets_dynamic_path, root_build_dir), + rebase_path(ohos_ets_dynamic_two_path, root_build_dir), "--tool-dir", rebase_path( "${root_out_dir}/obj/arkcompiler/runtime_core/static_core/plugins/ets/tools/declgen_ts2sts/panda-declgen-1.0.0.tgz"), @@ -637,10 +637,24 @@ action("ohos_ets_process_interop") { outputs = ["${interface_sdk_path}/arkui_dummy_interop"] } +action("arkui_interop_copy_dynamic") { + deps = [ ":ohos_ets_dynamic" ] + + script = "arkui_interop_copy_dynamic.sh" + + args = [ + rebase_path(ohos_ets_dynamic_path, root_build_dir), + rebase_path(ohos_ets_dynamic_two_path, root_build_dir) + ] + + outputs = [ ohos_ets_dynamic_two_path ] +} + action("build_sdk_interop1_arkui") { - deps = [ + deps = [ ":ohos_base_split", - ":ohos_ets_dynamic" ] + ":arkui_interop_copy_dynamic" + ] script = "process_label_noninterop.py" args = [ diff --git a/arkui_interop_copy_dynamic.sh b/arkui_interop_copy_dynamic.sh new file mode 100755 index 0000000000..a5c4578b0e --- /dev/null +++ b/arkui_interop_copy_dynamic.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +set -e + +source_dir=$1 +dest_dir=$2 + +if [ ! -d "$source_dir" ]; then + exit 1 +fi + +mkdir -p "$dest_dir" + +cp -r "$source_dir"/* "$dest_dir/" diff --git a/interface_config.gni b/interface_config.gni index 00cba7c4ab..e7c5fc1122 100644 --- a/interface_config.gni +++ b/interface_config.gni @@ -33,6 +33,8 @@ ohos_ets_dynamic_arkts_path = "$ohos_ets_dynamic_path/arkts" ohos_ets_dynamic_component_path = "$ohos_ets_dynamic_path/component" ohos_ets_dynamic_kits_path = "$ohos_ets_dynamic_path/kits" +ohos_ets_dynamic_two_path = "$root_build_dir/ohos_dynamic_two" + ohos_ets_static_path = "$root_build_dir/ohos_static" ohos_ets_static_api_path = "$ohos_ets_static_path/api" ohos_ets_static_arkts_path = "$ohos_ets_static_path/arkts" diff --git a/process_label_noninterop.py b/process_label_noninterop.py index 832694a537..f676401914 100755 --- a/process_label_noninterop.py +++ b/process_label_noninterop.py @@ -87,9 +87,9 @@ def main(): options = parser.parse_args() if options.is_pre == "true": - process_interop(options, "/ohos_dynamic/api", "/ohos_dynamic/api", "false") - process_interop(options, "/ohos_dynamic/component", "/ohos_dynamic/component", "true") - process_global_import(options, "/ohos_dynamic/api", "/ohos_dynamic/api", "false") + process_interop(options, "/ohos_dynamic_two/api", "/ohos_dynamic_two/api", "false") + process_interop(options, "/ohos_dynamic_two/component", "/ohos_dynamic_two/component", "true") + process_global_import(options, "/ohos_dynamic_two/api", "/ohos_dynamic_two/api", "false") else: process_interop(options, "/ets1.2interop/declaration/api", "/ets1.2interop/declaration/api", "false") delete_path = os.path.join(os.path.abspath(options.intermediates_output), "ets1.1interop", "component") -- Gitee