# Copyright (c) 2021 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. if (!is_linux && !is_mingw && !is_mac) { import("//base/update/updater/updater_default_cfg.gni") } import("//build/ohos.gni") SUBSYSTEM_DIR = "//base/update/updater/services/diffpatch" config("patch_config") { visibility = [ ":*" ] include_dirs = [ "//base/update/updater/interfaces/kits/include/package", "//base/update/updater/interfaces/kits/include", "//base/update/updater/services/include/package", "//base/update/updater/services/include/patch", "//base/update/updater/services/include", "//base/update/updater/utils/include", "//base/update/updater/services/diffpatch/bzip2", "//base/update/updater/services/diffpatch/patch", "//base/update/updater/services/diffpatch", "//third_party/bounds_checking_function/include", "//third_party/bzip2", "//third_party/zlib", "//third_party/lz4/lib", "//third_party/openssl/include", ] } ohos_static_library("libpatch") { sources = [ "$SUBSYSTEM_DIR/bzip2/bzip2_adapter.cpp", "$SUBSYSTEM_DIR/bzip2/lz4_adapter.cpp", "$SUBSYSTEM_DIR/bzip2/zip_adapter.cpp", "$SUBSYSTEM_DIR/diffpatch.cpp", "$SUBSYSTEM_DIR/patch/blocks_patch.cpp", "$SUBSYSTEM_DIR/patch/image_patch.cpp", "$SUBSYSTEM_DIR/patch/update_patch.cpp", ] deps = [ "//base/update/updater/services/log:libupdaterlog", "//base/update/updater/services/package:libupdaterpackage", "//third_party/bounds_checking_function:libsec_static", "//third_party/bzip2:libbz2", "//third_party/lz4:liblz4_static", "//third_party/zlib:libz", ] configs = [ ":patch_config" ] subsystem_name = "updater" part_name = "updater" }