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 17ohos_static_library("libutils") { 18 sources = [ 19 "json/json_node.cpp", 20 "utils.cpp", 21 ] 22 23 include_dirs = [ 24 "include", 25 "//base/update/updater/interfaces/kits/include/", 26 "//base/update/updater/services/include/", 27 "//third_party/bounds_checking_function/include", 28 "//third_party/cJSON", 29 ] 30 31 deps = [ 32 "//third_party/bounds_checking_function:libsec_static", 33 "//third_party/cJSON:cjson", 34 ] 35 external_deps += [ "init:libbegetutil" ] 36 37 subsystem_name = "updater" 38 part_name = "updater" 39} 40 41ohos_executable("updater_reboot") { 42 sources = [ "updater_reboot.cpp" ] 43 44 include_dirs = [ 45 "include", 46 "//base/update/updater/interfaces/kits/include/", 47 "//base/update/updater/services/include/", 48 ] 49 50 deps = [ 51 "//base/update/updater/interfaces/kits/misc_info:libmiscinfo", 52 "//base/update/updater/services/fs_manager:libfsmanager", 53 "//base/update/updater/utils:libutils", 54 ] 55 install_images = [ "updater" ] 56 install_enable = true 57 part_name = "updater" 58 subsystem_name = "updater" 59} 60 61ohos_executable("write_updater") { 62 sources = [ "write_updater.cpp" ] 63 64 include_dirs = [ 65 "include", 66 "//base/update/updater/interfaces/kits/include/", 67 "//base/update/updater/services/include/", 68 "//third_party/bounds_checking_function/include", 69 "//base/startup/init/interfaces/innerkits/include", 70 ] 71 72 deps = [ 73 "//base/update/updater/interfaces/kits/misc_info:libmiscinfo", 74 "//third_party/bounds_checking_function:libsec_static", 75 ] 76 external_deps += [ "init:libbegetutil" ] 77 78 install_enable = true 79 part_name = "updater" 80 subsystem_name = "updater" 81} 82