1# Copyright (c) 2021 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/updater/updater_default_cfg.gni") 15import("//build/ohos.gni") 16 17updater_path = rebase_path("${updater_absolutely_path}", ".") 18 19config("libapplypatch_exported_headers") { 20 visibility = [ ":*" ] 21 include_dirs = [ 22 "${updater_path}/interfaces/kits/include", 23 "${updater_path}/services/applypatch", 24 "${updater_path}/services/common", 25 "${updater_path}/services/include", 26 "${updater_path}/services/include/package", 27 "${updater_path}/services/include/script", 28 ] 29} 30 31ohos_static_library("libapplypatch") { 32 sources = [ 33 "block_set.cpp", 34 "block_writer.cpp", 35 "command.cpp", 36 "command_function.cpp", 37 "command_process.cpp", 38 "data_writer.cpp", 39 "partition_record.cpp", 40 "raw_writer.cpp", 41 "store.cpp", 42 "transfer_manager.cpp", 43 "update_progress.cpp", 44 ] 45 46 include_dirs = [ 47 "${updater_path}/services/include", 48 "${updater_path}/services/applypatch", 49 "${updater_path}/services/common", 50 "${updater_path}/services/script/script_manager", 51 "${updater_path}/services/script/threadpool", 52 "${updater_path}/utils/include", 53 "${updater_path}/interfaces/kits/include", 54 "${updater_path}/services/include/script", 55 "${updater_path}/services/include/package", 56 "${updater_path}/services/include/log", 57 ] 58 59 deps = [ 60 "${updater_path}/services/diffpatch/patch:libpatch", 61 "${updater_path}/services/fs_manager:libfsmanager", 62 "${updater_path}/services/script:libthreadpool", 63 ] 64 external_deps = [ 65 "bounds_checking_function:libsec_static", 66 "bzip2:libbz2", 67 "init:libbegetutil_static", 68 "init:libfsmanager_static_real", 69 "openssl:libcrypto_static", 70 "zlib:libz", 71 ] 72 public_configs = [ ":libapplypatch_exported_headers" ] 73 subsystem_name = "updater" 74 part_name = "updater" 75} 76