1# Copyright (C) 2024 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. 13import("//base/update/updater/updater_default_cfg.gni") 14import("//build/ohos.gni") 15 16updater_path = rebase_path("${updater_absolutely_path}", ".") 17 18config("updater_config") { 19 visibility = [ ":*" ] 20 include_dirs = [ 21 "${updater_path}/interfaces/kits/include", 22 "${updater_path}/services", 23 "${updater_path}/services/common", 24 "${updater_path}/services/flow_update", 25 "${updater_path}/services/include/package", 26 "${updater_path}/services/include/script", 27 "${updater_path}/services/include/log", 28 "${updater_path}/services/include", 29 "${updater_path}/utils/include", 30 "${updater_path}/utils/json", 31 "${updater_path}/services/include/applypatch", 32 ] 33} 34 35ohos_shared_library("libupdater_patch_shared") { 36 sources = [ 37 "${updater_path}/services/diffpatch/patch_shared/patch_shared.cpp", 38 "${updater_path}/services/updater_binary/update_image_block.cpp", 39 "${updater_path}/services/updater_binary/update_image_patch.cpp", 40 "${updater_path}/services/updater_binary/update_partitions.cpp", 41 "${updater_path}/services/updater_binary/update_processor.cpp", 42 ] 43 configs = [ ":updater_config" ] 44 45 ldflags = [ "-Wl -std=c++11" ] 46 deps = [ 47 "${updater_path}/interfaces/kits/misc_info:libmiscinfo", 48 "${updater_path}/interfaces/kits/slot_info:libslotinfo", 49 "${updater_path}/services/flow_update/update_bin:libBinFlowUpdate", 50 "${updater_path}/services/fs_manager:libfsmanager", 51 "${updater_path}/services/log:libupdaterlog", 52 "${updater_path}/services/package:libupdaterpackage", 53 "${updater_path}/services/script:libupdaterscript", 54 ] 55 56 external_deps = [ 57 "bounds_checking_function:libsec_shared", 58 "cJSON:cjson_static", 59 "hilog:libhilog", 60 "init:libbegetutil_static", 61 "init:libfsmanager_static_real", 62 "openssl:libssl_static", 63 ] 64 65 output_extension = "so" 66 install_enable = false 67 subsystem_name = "updater" 68 part_name = "updater" 69} 70