• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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}", ".")
18
19config("libsysinstallerkits_exported_headers") {
20  visibility = [ ":*" ]
21  include_dirs = [
22    "${sys_installer_path}/common/include",
23    "${sys_installer_path}/include",
24    "${sys_installer_path}/interfaces/innerkits",
25    "${sys_installer_path}/interfaces/inner_api/include",
26    "${sys_installer_path}/interfaces/innerkits/ipc_client/include",
27  ]
28}
29
30ohos_static_library("libsysinstallerkits") {
31  defines = [ "SYS_INSTALLER_KITS" ]
32  sources = [
33    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_callback.cpp",
34    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_kits_impl.cpp",
35    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_load_callback.cpp",
36    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_proxy.cpp",
37  ]
38
39  include_dirs = [
40    "${sys_installer_path}/common/include",
41    "${sys_installer_path}/include",
42    "${sys_installer_path}/interfaces/innerkits",
43    "${sys_installer_path}/interfaces/inner_api/include",
44    "${sys_installer_path}/interfaces/innerkits/ipc_client/include",
45    "//third_party/bounds_checking_function/include",
46  ]
47
48  public_configs = [ ":libsysinstallerkits_exported_headers" ]
49
50  deps = [ "//third_party/bounds_checking_function:libsec_static" ]
51
52  external_deps = [
53    "c_utils:utils",
54    "hilog:libhilog",
55    "init:libbegetutil",
56    "ipc:ipc_core",
57    "safwk:system_ability_fwk",
58    "samgr:samgr_proxy",
59    "updater:libupdaterlog",
60    "updater:libutils",
61  ]
62
63  part_name = "sys_installer"
64  subsystem_name = "updater"
65}
66
67ohos_executable("sys_installer_client") {
68  sources = [ "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_client.cpp" ]
69
70  include_dirs = [
71    "${sys_installer_path}/interfaces/innerkits/ipc_client/include",
72    "${sys_installer_path}/interfaces/inner_api/include",
73  ]
74
75  deps = [
76    "${sys_installer_path}/interfaces/innerkits/ipc_client:libsysinstallerkits",
77    "//third_party/bounds_checking_function:libsec_static",
78  ]
79  external_deps = [
80    "c_utils:utils",
81    "hilog:libhilog",
82    "init:libbegetutil",
83    "ipc:ipc_core",
84    "safwk:system_ability_fwk",
85    "samgr:samgr_proxy",
86  ]
87  install_enable = true
88  part_name = "sys_installer"
89  subsystem_name = "updater"
90}
91
92ohos_shared_library("module_update") {
93  sources = [ "./src/check_module_update.cpp" ]
94
95  include_dirs = [ "./include" ]
96
97  deps = [ "${sys_installer_path}/services/module_update:module_update_static" ]
98
99  part_name = "sys_installer"
100  subsystem_name = "updater"
101}
102
103config("exported_header_files") {
104  visibility = [ ":*" ]
105  include_dirs = [
106    "${sys_installer_path}/services/module_update/util/include",
107    "${sys_installer_path}/interfaces/inner_api/include",
108    "${sys_installer_path}/interfaces/innerkits/ipc_client/include",
109  ]
110}
111
112ohos_static_library("module_update_client") {
113  sources = [
114    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/module_update_kits_impl.cpp",
115    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/module_update_proxy.cpp",
116    "${sys_installer_path}/services/module_update/util/src/module_ipc_helper.cpp",
117  ]
118
119  include_dirs = [ "//third_party/bounds_checking_function/include" ]
120
121  public_configs = [ ":exported_header_files" ]
122
123  external_deps = [
124    "c_utils:utils",
125    "init:libbegetutil",
126    "ipc:ipc_core",
127    "samgr:samgr_proxy",
128    "updater:libupdaterlog",
129  ]
130
131  part_name = "sys_installer"
132  subsystem_name = "updater"
133}
134