• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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/sys_installer/sys_installer_default_cfg.gni")
15import("//build/ohos.gni")
16
17sys_installer_path = rebase_path("${sys_installer_absolutely_path}", ".")
18config("utils_exported_header") {
19  visibility = [ ":*" ]
20
21  include_dirs = [
22    "${sys_installer_path}/frameworks/installer_manager/include",
23    "${sys_installer_path}/interfaces/innerkits",
24    "${sys_installer_path}/interfaces/inner_api/include",
25    "${sys_installer_path}/services/module_update/util/include",
26  ]
27}
28
29ohos_shared_library("module_update_utils") {
30  sources = [
31    "${sys_installer_path}/services/module_update/util/src/module_file.cpp",
32    "${sys_installer_path}/services/module_update/util/src/module_update_verify.cpp",
33    "${sys_installer_path}/services/module_update/util/src/module_utils.cpp",
34    "${sys_installer_path}/services/module_update/util/src/module_zip_helper.cpp",
35  ]
36
37  public_configs = [ ":utils_exported_header" ]
38
39  public_external_deps = [
40    "cJSON:cjson",
41    "zlib:shared_libz",
42  ]
43
44  deps = []
45
46  external_deps = [
47    "bounds_checking_function:libsec_shared",
48    "cJSON:cjson",
49    "c_utils:utils",
50    "hilog:libhilog",
51    "init:libbegetutil",
52    "ipc:ipc_single",
53    "openssl:libcrypto_shared",
54    "safwk:system_ability_fwk",
55    "samgr:samgr_proxy",
56    "updater:libdiff_patch_shared",
57    "updater:libmiscinfo",
58    "updater:libpackage_shared",
59    "updater:libringbuffer",
60    "updater:libupdaterlog_shared",
61    "updater:libupdaterpackage_shared",
62    "updater:libutils",
63  ]
64  if (ohos_indep_compiler_enable) {
65    external_deps += [
66      "init:libfsmanager_static",
67      "updater:libfsmanager",
68      "selinux_adapter:librestorecon",
69    ]
70  }
71
72  if (defined(global_parts_info.startup_hvb)) {
73    sources += [
74      "${sys_installer_path}/services/module_update/util/src/module_hvb_ops.cpp",
75      "${sys_installer_path}/services/module_update/util/src/module_hvb_utils.cpp",
76    ]
77
78    defines = [ "SUPPORT_HVB" ]
79
80    external_deps += [
81      "hvb:libhvb_static",
82      "init:libfsmanager_static_real",
83    ]
84  }
85
86  part_name = "sys_installer"
87  subsystem_name = "updater"
88}
89