From a2888b8517796e64aa91f9c96bdbdc7ddae2a931 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Jul 2025 16:33:18 +0800 Subject: [PATCH 1/3] fix compile codex Signed-off-by: unknown --- services/ui/BUILD.gn | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/services/ui/BUILD.gn b/services/ui/BUILD.gn index 5eb07f06..ece23db0 100644 --- a/services/ui/BUILD.gn +++ b/services/ui/BUILD.gn @@ -38,6 +38,19 @@ config("updater_ui_support_cfg") { } } +if (defined(updater_ui_extend_cfg)) { + action("copy_ui_extend_cfg") { + script = "copy_ui_extend_cfg.py" + updater_ui_extend_cfg_target_path = "${target_gen_dir}/" + updater_ui_extend_cfg_name + sources = [ updater_ui_extend_cfg ] + outputs = [ "${target_gen_dir}/test.txt" ] + args = [ + rebase_path(updater_ui_extend_cfg, "."), + rebase_path(updater_ui_extend_cfg_target_path, "."), + ] + } +} + ohos_static_library("libui") { public_configs = [ ":updater_ui_support_cfg" ] @@ -97,6 +110,11 @@ ohos_static_library("libui") { "${updater_path}/utils:libutils", ] + if (defined(updater_ui_extend_cfg)) { + deps += [ "${updater_path}/services/ui:copy_ui_extend_cfg" ] + include_dirs += [ updater_ui_extend_cfg_target_path ] + } + external_deps = [ "bounds_checking_function:libsec_static", "cJSON:cjson", @@ -118,10 +136,6 @@ ohos_static_library("libui") { external_deps += updater_ui_custom_deps } - if (defined(updater_ui_custom_cfg)) { - public_configs += updater_ui_custom_cfg - } - subsystem_name = "updater" part_name = "updater" } -- Gitee From 270fc47f1df0c8a31386e3c839b4d93ce995ee84 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Jul 2025 16:53:29 +0800 Subject: [PATCH 2/3] fix compile err Signed-off-by: unknown --- services/ui/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/services/ui/BUILD.gn b/services/ui/BUILD.gn index ece23db0..e465e142 100644 --- a/services/ui/BUILD.gn +++ b/services/ui/BUILD.gn @@ -112,6 +112,7 @@ ohos_static_library("libui") { if (defined(updater_ui_extend_cfg)) { deps += [ "${updater_path}/services/ui:copy_ui_extend_cfg" ] + updater_ui_extend_cfg_target_path = "${target_gen_dir}/" + updater_ui_extend_cfg_name include_dirs += [ updater_ui_extend_cfg_target_path ] } -- Gitee From b380535915ff36c264e8b8e079b1d80c183feb4a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Jul 2025 17:00:20 +0800 Subject: [PATCH 3/3] add copy.py Signed-off-by: unknown --- services/ui/copy_ui_extend_cfg.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 services/ui/copy_ui_extend_cfg.py diff --git a/services/ui/copy_ui_extend_cfg.py b/services/ui/copy_ui_extend_cfg.py new file mode 100644 index 00000000..f109ea6e --- /dev/null +++ b/services/ui/copy_ui_extend_cfg.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# 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. + +import os +import shutil +import sys + +os.chdir(os.path.dirname(__file__)) + +if __name__ == '__main__': + src_path = sys.argv[1] + tgt_path = sys.argv[2] + shutil.copy(src_path, tgt_path) \ No newline at end of file -- Gitee