188edb362Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd. 288edb362Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 388edb362Sopenharmony_ci# you may not use this file except in compliance with the License. 488edb362Sopenharmony_ci# You may obtain a copy of the License at 588edb362Sopenharmony_ci# 688edb362Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 788edb362Sopenharmony_ci# 888edb362Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 988edb362Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1088edb362Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1188edb362Sopenharmony_ci# See the License for the specific language governing permissions and 1288edb362Sopenharmony_ci# limitations under the License. 1388edb362Sopenharmony_ci 1488edb362Sopenharmony_ciimport("//base/update/sys_installer/sys_installer_default_cfg.gni") 1588edb362Sopenharmony_ciimport("//build/ohos.gni") 1688edb362Sopenharmony_ci 1788edb362Sopenharmony_cisys_installer_path = rebase_path("${sys_installer_absolutely_path}", ".") 1888edb362Sopenharmony_ciconfig("utils_exported_header") { 1988edb362Sopenharmony_ci visibility = [ ":*" ] 2088edb362Sopenharmony_ci 2188edb362Sopenharmony_ci include_dirs = [ 2288edb362Sopenharmony_ci "${sys_installer_path}/frameworks/installer_manager/include", 2388edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits", 2488edb362Sopenharmony_ci "${sys_installer_path}/interfaces/inner_api/include", 2588edb362Sopenharmony_ci "${sys_installer_path}/services/module_update/util/include", 2688edb362Sopenharmony_ci ] 2788edb362Sopenharmony_ci} 2888edb362Sopenharmony_ci 2988edb362Sopenharmony_ciohos_shared_library("module_update_utils") { 3088edb362Sopenharmony_ci sources = [ 3188edb362Sopenharmony_ci "${sys_installer_path}/services/module_update/util/src/module_file.cpp", 3288edb362Sopenharmony_ci "${sys_installer_path}/services/module_update/util/src/module_update_verify.cpp", 3388edb362Sopenharmony_ci "${sys_installer_path}/services/module_update/util/src/module_utils.cpp", 3488edb362Sopenharmony_ci "${sys_installer_path}/services/module_update/util/src/module_zip_helper.cpp", 3588edb362Sopenharmony_ci ] 3688edb362Sopenharmony_ci 3788edb362Sopenharmony_ci public_configs = [ ":utils_exported_header" ] 3888edb362Sopenharmony_ci 3988edb362Sopenharmony_ci public_external_deps = [ 4088edb362Sopenharmony_ci "cJSON:cjson", 4188edb362Sopenharmony_ci "zlib:shared_libz", 4288edb362Sopenharmony_ci ] 4388edb362Sopenharmony_ci 4488edb362Sopenharmony_ci deps = [] 4588edb362Sopenharmony_ci 4688edb362Sopenharmony_ci external_deps = [ 4788edb362Sopenharmony_ci "bounds_checking_function:libsec_shared", 4888edb362Sopenharmony_ci "cJSON:cjson", 4988edb362Sopenharmony_ci "c_utils:utils", 5088edb362Sopenharmony_ci "hilog:libhilog", 5188edb362Sopenharmony_ci "init:libbegetutil", 5288edb362Sopenharmony_ci "ipc:ipc_core", 5388edb362Sopenharmony_ci "openssl:libcrypto_shared", 5488edb362Sopenharmony_ci "safwk:system_ability_fwk", 5588edb362Sopenharmony_ci "samgr:samgr_proxy", 5688edb362Sopenharmony_ci "updater:libmiscinfo", 5788edb362Sopenharmony_ci "updater:libpackage_shared", 5888edb362Sopenharmony_ci "updater:libringbuffer", 5988edb362Sopenharmony_ci "updater:libupdaterlog_shared", 6088edb362Sopenharmony_ci "updater:libupdaterpackage_shared", 6188edb362Sopenharmony_ci "updater:libutils", 6288edb362Sopenharmony_ci ] 6388edb362Sopenharmony_ci 6488edb362Sopenharmony_ci if (defined(global_parts_info.startup_hvb)) { 6588edb362Sopenharmony_ci sources += [ "${sys_installer_path}/services/module_update/util/src/module_hvb_ops.cpp" ] 6688edb362Sopenharmony_ci 6788edb362Sopenharmony_ci defines = [ "SUPPORT_HVB" ] 6888edb362Sopenharmony_ci 6988edb362Sopenharmony_ci external_deps += [ 7088edb362Sopenharmony_ci "hvb:libhvb_static", 7188edb362Sopenharmony_ci "init:libfsmanager_static", 7288edb362Sopenharmony_ci ] 7388edb362Sopenharmony_ci } 7488edb362Sopenharmony_ci 7588edb362Sopenharmony_ci part_name = "sys_installer" 7688edb362Sopenharmony_ci subsystem_name = "updater" 7788edb362Sopenharmony_ci} 78