• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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/updater/updater_default_cfg.gni")
15import("//build/ohos.gni")
16
17updater_path = rebase_path("${updater_absolutely_path}", ".")
18config("updater_ui_support_cfg") {
19  include_dirs = [
20    "${updater_path}/interfaces/kits/include",
21    "${updater_path}/services/ui",
22    "${updater_path}/services/ui/include",
23    "${updater_path}/services/ui/control",
24    "${updater_path}/services/ui/driver",
25    "${updater_path}/services/ui/view",
26    "${updater_path}/services/ui/language",
27  ]
28  defines = [
29    "ENABLE_BITMAP_FONT = 0",
30    "ENABLE_ICU = 1",
31    "ENABLE_MULTI_FONT = 0",
32    "ENABLE_SHAPING = 0",
33    "ENABLE_STATIC_FONT = 0",
34    "ENABLE_VECTOR_FONT = 1",
35  ]
36  if (updater_ui_support) {
37    defines += [ "UPDATER_UI_SUPPORT" ]
38  }
39}
40
41ohos_static_library("libui") {
42  public_configs = [ ":updater_ui_support_cfg" ]
43
44  sources = [
45    "control/callback_manager.cpp",
46    "control/event_listener.cpp",
47    "control/event_manager.cpp",
48    "driver/drm_driver.cpp",
49    "driver/fbdev_driver.cpp",
50    "driver/graphic_engine.cpp",
51    "driver/input_event.cpp",
52    "driver/keys_input_device.cpp",
53    "driver/pointers_input_device.cpp",
54    "driver/surface_dev.cpp",
55    "driver/ui_rotation.cpp",
56    "language/language_ui.cpp",
57    "strategy/logo_strategy.cpp",
58    "strategy/progress_strategy.cpp",
59    "strategy/ui_strategy.cpp",
60    "updater_ui_config.cpp",
61    "updater_ui_env.cpp",
62    "updater_ui_facade.cpp",
63    "updater_ui_tools.cpp",
64    "view/component/box_progress_adapter.cpp",
65    "view/component/img_view_adapter.cpp",
66    "view/component/label_btn_adapter.cpp",
67    "view/component/text_label_adapter.cpp",
68    "view/component/component_register.cpp",
69    "view/layout/auto_layout.cpp",
70    "view/layout/layout_parser.cpp",
71    "view/page/base_page.cpp",
72    "view/page/page.cpp",
73    "view/page/page_manager.cpp",
74    "view/page/sub_page.cpp",
75    "view/view_api.cpp",
76  ]
77
78  include_dirs = [
79    "${updater_path}/services/common",
80    "${updater_path}/services/include/log",
81    "${updater_path}/services/include",
82    "${updater_path}/utils/include",
83    "${updater_path}/utils/json",
84    "${updater_path}/services",
85    "${updater_path}/interfaces/kits/include",
86    "${updater_path}/services/ui",
87    "${updater_path}/services/ui/include",
88    "${updater_path}/services/ui/control",
89    "${updater_path}/services/ui/driver",
90    "${updater_path}/services/ui/view",
91    "${updater_path}/services/ui/language",
92  ]
93
94  deps = [
95    "${updater_path}/interfaces/kits/packages:libpackageExt",
96    "${updater_path}/services/log:libupdaterlog",
97    "${updater_path}/utils:libutils",
98  ]
99
100  external_deps = [
101    "bounds_checking_function:libsec_static",
102    "cJSON:cjson",
103    "c_utils:utils",
104    "libdrm:libdrm",
105    "libpng:libpng",
106  ]
107
108  if (!updater_ui_support) {
109    sources = []
110  } else {
111    external_deps += [
112      "drivers_interface_input:libinput_proxy_1.0",
113      "ui_lite:libupdater_layout",
114      "graphic_utils_lite:utils_lite",
115    ]
116  }
117
118  subsystem_name = "updater"
119  part_name = "updater"
120}
121