1# Copyright (c) 2021 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 if (updater_ui_support) { 20 defines = [ "UPDATER_UI_SUPPORT" ] 21 } 22 include_dirs = [ 23 "${updater_path}/interfaces/kits/include", 24 "${updater_path}/services/ui", 25 "${updater_path}/services/ui/include", 26 "${updater_path}/services/ui/control", 27 "${updater_path}/services/ui/driver", 28 "${updater_path}/services/ui/view", 29 "${updater_path}/services/ui/language", 30 ] 31} 32 33ohos_static_library("libui") { 34 defines = [ 35 "ENABLE_BITMAP_FONT = 0", 36 "ENABLE_ICU = 0", 37 "ENABLE_MULTI_FONT = 0", 38 "ENABLE_SHAPING = 0", 39 "ENABLE_STATIC_FONT = 0", 40 "ENABLE_VECTOR_FONT = 1", 41 ] 42 43 public_configs = [ ":updater_ui_support_cfg" ] 44 45 sources = [ 46 "control/callback_manager.cpp", 47 "control/event_listener.cpp", 48 "control/event_manager.cpp", 49 "driver/drm_driver.cpp", 50 "driver/fbdev_driver.cpp", 51 "driver/graphic_engine.cpp", 52 "driver/input_event.cpp", 53 "driver/keys_input_device.cpp", 54 "driver/pointers_input_device.cpp", 55 "driver/surface_dev.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/component_factory.cpp", 66 "view/component/img_view_adapter.cpp", 67 "view/component/label_btn_adapter.cpp", 68 "view/component/text_label_adapter.cpp", 69 "view/layout/layout_parser.cpp", 70 "view/page/base_page.cpp", 71 "view/page/page.cpp", 72 "view/page/page_manager.cpp", 73 "view/page/sub_page.cpp", 74 "view/view_api.cpp", 75 ] 76 77 include_dirs = [ 78 "//third_party/libpng", 79 "//third_party/libdrm/include/drm", 80 "//third_party/libdrm", 81 "${updater_path}/services/common", 82 "${updater_path}/services/include/log", 83 "${updater_path}/services/include", 84 "//drivers/hdf_core/framework/ability/sbuf/include", 85 "//drivers/hdf_core/framework/include/platform", 86 "//drivers/hdf_core/framework/include/core", 87 "//drivers/hdf_core/framework/include/osal", 88 "//drivers/hdf_core/framework/include/utils", 89 "//drivers/hdf_core/framework/include/config", 90 "//drivers/hdf_core/framework/include", 91 "//drivers/hdf_core/adapter/uhdf2/hdi", 92 "//drivers/peripheral/input/hal/include", 93 "${updater_path}/utils/include", 94 "${updater_path}/utils/json", 95 "${updater_path}/services", 96 "${updater_path}/interfaces/kits/include", 97 "${updater_path}/services/ui", 98 "${updater_path}/services/ui/include", 99 "${updater_path}/services/ui/control", 100 "${updater_path}/services/ui/driver", 101 "${updater_path}/services/ui/view", 102 "${updater_path}/services/ui/language", 103 ] 104 105 deps = [ 106 "${updater_path}/interfaces/kits/packages:libpackageExt", 107 "${updater_path}/services/log:libupdaterlog", 108 "${updater_path}/utils:libutils", 109 "//third_party/bounds_checking_function:libsec_static", 110 "//third_party/cJSON:cjson", 111 "//third_party/libdrm:libdrm", 112 "//third_party/libpng:libpng", 113 ] 114 115 if (!updater_ui_support) { 116 sources = [] 117 } else { 118 external_deps = [ 119 "drivers_peripheral_input:hdi_input", 120 "ui_lite:libupdater_layout", 121 ] 122 } 123 124 if (defined(updater_ui_custom_deps)) { 125 deps += updater_ui_custom_deps 126 } 127 128 if (defined(updater_ui_custom_cfg)) { 129 public_configs += updater_ui_custom_cfg 130 } 131 132 subsystem_name = "updater" 133 part_name = "updater" 134} 135