• 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}", ".")
18module_update_service_gen("module_update_service") {
19  deps = [ "${sys_installer_path}/services/module_update/service:libmodule_update_service_static" ]
20
21  part_name = "sys_installer"
22  subsystem_name = "updater"
23}
24
25config("module_update_service_exported_header") {
26  visibility = [ ":*" ]
27
28  include_dirs = [
29    "${sys_installer_path}/interfaces/inner_api/include",
30    "${sys_installer_path}/services/module_update/include",
31    "${sys_installer_path}/services/module_update/service/include",
32    "${sys_installer_path}/services/module_update/util/include",
33  ]
34}
35
36ohos_static_library("libmodule_update_service_static") {
37  sources = [
38    "${sys_installer_path}/frameworks/ipc_server/src/module_update_service.cpp",
39    "${sys_installer_path}/frameworks/ipc_server/src/module_update_stub.cpp",
40    "${sys_installer_path}/frameworks/ipc_server/src/sys_installer_callback_proxy.cpp",
41    "${sys_installer_path}/services/module_update/service/src/module_update_consumer.cpp",
42    "${sys_installer_path}/services/module_update/service/src/module_update_main.cpp",
43    "${sys_installer_path}/services/module_update/service/src/module_update_producer.cpp",
44    "${sys_installer_path}/services/module_update/service/src/module_update_queue.cpp",
45    "${sys_installer_path}/services/module_update/util/src/module_ipc_helper.cpp",
46  ]
47
48  include_dirs = [
49    "${sys_installer_path}/common/include",
50    "${sys_installer_path}/frameworks/installer_manager/include",
51    "${sys_installer_path}/frameworks/ipc_server/include",
52    "${sys_installer_path}/interfaces/inner_api/include",
53    "${sys_installer_path}/interfaces/innerkits/ipc_client/include",
54    "${sys_installer_path}/services/module_update/service/include",
55    "${sys_installer_path}/services/module_update/include",
56  ]
57
58  public_configs = [ ":module_update_service_exported_header" ]
59
60  deps = [
61    "${sys_installer_path}/services/module_update/src:module_update_static",
62  ]
63
64  external_deps = [
65    "access_token:libaccesstoken_sdk",
66    "c_utils:utils",
67    "hilog:libhilog",
68    "hisysevent:libhisyseventmanager",
69    "init:libbeget_proxy",
70    "ipc:ipc_core",
71    "safwk:system_ability_fwk",
72    "samgr:samgr_proxy",
73    "updater:libpackage_shared",
74    "updater:libupdaterlog_shared",
75    "updater:libutils_fs",
76  ]
77
78  if (build_selinux) {
79    external_deps += [ "selinux_adapter:librestorecon" ]
80    cflags = [ "-DWITH_SELINUX" ]
81  }
82
83  part_name = "sys_installer"
84  subsystem_name = "updater"
85}
86