• 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_shared_library("libsysinstaller_shared") {
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 = [
51    "//third_party/bounds_checking_function:libsec_shared",
52    "//third_party/lz4:liblz4_static",
53    "//third_party/zlib:shared_libz",
54  ]
55
56  external_deps = [
57    "c_utils:utils",
58    "hilog:libhilog",
59    "init:libbegetutil",
60    "ipc:ipc_core",
61    "safwk:system_ability_fwk",
62    "samgr:samgr_proxy",
63    "updater:libfsmanager",
64    "updater:libmiscinfo",
65    "updater:libupdaterlog",
66    "updater:libupdaterpackage",
67    "updater:libutils",
68  ]
69
70  innerapi_tags = [
71    "platformsdk",
72    "sasdk",
73  ]
74
75  part_name = "sys_installer"
76  subsystem_name = "updater"
77}
78
79ohos_static_library("libsysinstallerkits") {
80  defines = [ "SYS_INSTALLER_KITS" ]
81  sources = [
82    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_callback.cpp",
83    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_kits_impl.cpp",
84    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_load_callback.cpp",
85    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_proxy.cpp",
86  ]
87
88  include_dirs = [
89    "${sys_installer_path}/common/include",
90    "${sys_installer_path}/include",
91    "${sys_installer_path}/interfaces/innerkits",
92    "${sys_installer_path}/interfaces/inner_api/include",
93    "${sys_installer_path}/interfaces/innerkits/ipc_client/include",
94    "//third_party/bounds_checking_function/include",
95  ]
96
97  public_configs = [ ":libsysinstallerkits_exported_headers" ]
98
99  deps = [ "//third_party/bounds_checking_function:libsec_static" ]
100
101  external_deps = [
102    "c_utils:utils",
103    "hilog:libhilog",
104    "init:libbegetutil",
105    "ipc:ipc_core",
106    "safwk:system_ability_fwk",
107    "samgr:samgr_proxy",
108    "updater:libupdaterlog",
109    "updater:libutils",
110  ]
111
112  part_name = "sys_installer"
113  subsystem_name = "updater"
114}
115
116ohos_executable("sys_installer_client") {
117  sources = [ "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_client.cpp" ]
118
119  include_dirs = [
120    "${sys_installer_path}/interfaces/innerkits/ipc_client/include",
121    "${sys_installer_path}/interfaces/inner_api/include",
122  ]
123
124  deps = [
125    "${sys_installer_path}/interfaces/innerkits/ipc_client:libsysinstallerkits",
126    "//third_party/bounds_checking_function:libsec_static",
127  ]
128  external_deps = [
129    "c_utils:utils",
130    "hilog:libhilog",
131    "init:libbegetutil",
132    "ipc:ipc_core",
133    "safwk:system_ability_fwk",
134    "samgr:samgr_proxy",
135  ]
136  install_enable = true
137  part_name = "sys_installer"
138  subsystem_name = "updater"
139}
140
141module_update_gen("module_update") {
142  sources = [ "./src/check_module_update.cpp" ]
143
144  include_dirs = [ "./include" ]
145
146  deps = [ "${sys_installer_path}/services/module_update:module_update_static" ]
147
148  public_configs = [ ":exported_header_files" ]
149
150  if (defined(module_update_custom_external_deps)) {
151    external_deps = module_update_custom_external_deps
152  }
153
154  part_name = "sys_installer"
155  subsystem_name = "updater"
156}
157
158config("exported_header_files") {
159  visibility = [ ":*" ]
160  include_dirs = [
161    "${sys_installer_path}/services/module_update/util/include",
162    "${sys_installer_path}/interfaces/inner_api/include",
163    "${sys_installer_path}/interfaces/innerkits/ipc_client/include",
164    "//third_party/zlib",
165    "//third_party/zlib/contrib/minizip",
166  ]
167}
168
169ohos_static_library("module_update_client") {
170  sources = [
171    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/module_update_kits_impl.cpp",
172    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/module_update_proxy.cpp",
173    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_callback.cpp",
174    "${sys_installer_path}/services/module_update/util/src/module_ipc_helper.cpp",
175  ]
176
177  include_dirs = [
178    "${sys_installer_path}/common/include",
179    "//third_party/bounds_checking_function/include",
180    "//third_party/zlib",
181    "//third_party/zlib/contrib/minizip",
182  ]
183
184  public_configs = [ ":exported_header_files" ]
185
186  external_deps = [
187    "c_utils:utils",
188    "init:libbegetutil",
189    "ipc:ipc_core",
190    "samgr:samgr_proxy",
191    "updater:libupdaterlog",
192  ]
193
194  part_name = "sys_installer"
195  subsystem_name = "updater"
196}
197
198ohos_shared_library("libmodule_update_shared") {
199  sources = [
200    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/module_update_kits_impl.cpp",
201    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/module_update_proxy.cpp",
202    "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_callback.cpp",
203    "${sys_installer_path}/services/module_update/util/src/module_ipc_helper.cpp",
204  ]
205
206  include_dirs = [
207    "${sys_installer_path}/common/include",
208    "//third_party/bounds_checking_function/include",
209    "//third_party/zlib",
210    "//third_party/zlib/contrib/minizip",
211  ]
212
213  public_configs = [ ":exported_header_files" ]
214
215  external_deps = [
216    "c_utils:utils",
217    "init:libbegetutil",
218    "ipc:ipc_core",
219    "samgr:samgr_proxy",
220    "updater:libupdaterlog",
221  ]
222
223  innerapi_tags = [
224    "platformsdk",
225    "sasdk",
226  ]
227
228  part_name = "sys_installer"
229  subsystem_name = "updater"
230}
231