1# Copyright (c) 2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//base/update/sys_installer/sys_installer_default_cfg.gni") 15import("//build/ohos.gni") 16 17sys_installer_path = rebase_path("${sys_installer_absolutely_path}", ".") 18 19config("module_update_exported_header") { 20 visibility = [ ":*" ] 21 include_dirs = [ "${sys_installer_path}/services/module_update/include" ] 22} 23 24check_module_update_gen("check_module_update") { 25 include_dirs = [ "./include" ] 26 27 deps = [ "${sys_installer_path}/services/module_update/src:check_module_update_staic" ] 28 output_name = "check_module_update_init" 29 external_deps = [ 30 "bounds_checking_function:libsec_shared", 31 "updater:libupdaterlog_shared", 32 ] 33 34 part_name = "sys_installer" 35 subsystem_name = "updater" 36} 37 38ohos_static_library("check_module_update_staic") { 39 sources = [ "${sys_installer_path}/services/module_update/src/main.cpp" ] 40 41 include_dirs = [ "./include" ] 42 43 deps = [ 44 "${sys_installer_path}/services/module_update/src:module_update_static", 45 ] 46 47 public_configs = [ ":module_update_exported_header" ] 48 49 external_deps = [ 50 "bounds_checking_function:libsec_shared", 51 "updater:libupdaterlog_shared", 52 ] 53 54 part_name = "sys_installer" 55 subsystem_name = "updater" 56} 57 58ohos_static_library("module_update_static") { 59 sources = [ 60 "${sys_installer_path}/services/module_update/src/module_dm.cpp", 61 "${sys_installer_path}/services/module_update/src/module_file_repository.cpp", 62 "${sys_installer_path}/services/module_update/src/module_loop.cpp", 63 "${sys_installer_path}/services/module_update/src/module_update.cpp", 64 "${sys_installer_path}/services/module_update/src/module_update_task.cpp", 65 ] 66 67 public_configs = [ ":module_update_exported_header" ] 68 69 public_deps = 70 [ "${sys_installer_path}/services/module_update:module_update_utils" ] 71 72 external_deps = [ 73 "bounds_checking_function:libsec_shared", 74 "samgr:samgr_common", 75 "updater:libupdaterlog_shared", 76 ] 77 78 if (defined(global_parts_info.startup_hvb)) { 79 defines = [ "SUPPORT_HVB" ] 80 81 external_deps += [ 82 "hilog:libhilog", 83 "hvb:libhvb_static", 84 "init:libfsmanager_static_real", 85 ] 86 } 87 part_name = "sys_installer" 88 subsystem_name = "updater" 89} 90