# Copyright (c) 2023 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("//base/update/sys_installer/sys_installer_default_cfg.gni") import("//build/ohos.gni") sys_installer_path = rebase_path("${sys_installer_absolutely_path}", ".") check_module_update_gen("check_module_update") { include_dirs = [ "./include" ] deps = [ "${sys_installer_path}/services/module_update/src:check_module_update_staic" ] external_deps = [ "bounds_checking_function:libsec_shared", "updater:libupdaterlog_shared", ] part_name = "sys_installer" subsystem_name = "updater" } ohos_static_library("check_module_update_staic") { sources = [ "${sys_installer_path}/services/module_update/src/main.cpp" ] include_dirs = [ "./include" ] deps = [ "${sys_installer_path}/services/module_update/src:module_update_static", ] external_deps = [ "bounds_checking_function:libsec_shared", "updater:libupdaterlog_shared", ] part_name = "sys_installer" subsystem_name = "updater" } config("module_update_exported_header") { visibility = [ ":*" ] include_dirs = [ "${sys_installer_path}/services/module_update/include" ] } ohos_static_library("module_update_static") { sources = [ "${sys_installer_path}/services/module_update/src/module_dm.cpp", "${sys_installer_path}/services/module_update/src/module_file_repository.cpp", "${sys_installer_path}/services/module_update/src/module_loop.cpp", "${sys_installer_path}/services/module_update/src/module_update.cpp", "${sys_installer_path}/services/module_update/src/module_update_task.cpp", ] public_configs = [ ":module_update_exported_header" ] public_deps = [ "${sys_installer_path}/services/module_update:module_update_utils" ] external_deps = [ "bounds_checking_function:libsec_shared", "samgr:samgr_common", "updater:libupdaterlog_shared", ] if (defined(global_parts_info.startup_hvb)) { defines = [ "SUPPORT_HVB" ] external_deps += [ "hilog:libhilog", "hvb:libhvb_static", "init:libfsmanager_static_real", ] } part_name = "sys_installer" subsystem_name = "updater" }