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