1fb299fa2Sopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd. 2fb299fa2Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3fb299fa2Sopenharmony_ci# you may not use this file except in compliance with the License. 4fb299fa2Sopenharmony_ci# You may obtain a copy of the License at 5fb299fa2Sopenharmony_ci# 6fb299fa2Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7fb299fa2Sopenharmony_ci# 8fb299fa2Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9fb299fa2Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10fb299fa2Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11fb299fa2Sopenharmony_ci# See the License for the specific language governing permissions and 12fb299fa2Sopenharmony_ci# limitations under the License. 13fb299fa2Sopenharmony_ci 14fb299fa2Sopenharmony_ciimport("//base/update/updater/updater_default_cfg.gni") 15fb299fa2Sopenharmony_ciimport("//build/ohos.gni") 16fb299fa2Sopenharmony_ci 17fb299fa2Sopenharmony_ciupdater_path = rebase_path("${updater_absolutely_path}", ".") 18fb299fa2Sopenharmony_ciconfig("updater_ui_support_cfg") { 19fb299fa2Sopenharmony_ci if (updater_ui_support) { 20fb299fa2Sopenharmony_ci defines = [ "UPDATER_UI_SUPPORT" ] 21fb299fa2Sopenharmony_ci } 22fb299fa2Sopenharmony_ci include_dirs = [ 23fb299fa2Sopenharmony_ci "${updater_path}/interfaces/kits/include", 24fb299fa2Sopenharmony_ci "${updater_path}/services/ui", 25fb299fa2Sopenharmony_ci "${updater_path}/services/ui/include", 26fb299fa2Sopenharmony_ci "${updater_path}/services/ui/control", 27fb299fa2Sopenharmony_ci "${updater_path}/services/ui/driver", 28fb299fa2Sopenharmony_ci "${updater_path}/services/ui/view", 29fb299fa2Sopenharmony_ci "${updater_path}/services/ui/language", 30fb299fa2Sopenharmony_ci ] 31fb299fa2Sopenharmony_ci} 32fb299fa2Sopenharmony_ci 33fb299fa2Sopenharmony_ciohos_static_library("libui") { 34fb299fa2Sopenharmony_ci defines = [ 35fb299fa2Sopenharmony_ci "ENABLE_BITMAP_FONT = 0", 36fb299fa2Sopenharmony_ci "ENABLE_ICU = 1", 37fb299fa2Sopenharmony_ci "ENABLE_MULTI_FONT = 0", 38fb299fa2Sopenharmony_ci "ENABLE_SHAPING = 0", 39fb299fa2Sopenharmony_ci "ENABLE_STATIC_FONT = 0", 40fb299fa2Sopenharmony_ci "ENABLE_VECTOR_FONT = 1", 41fb299fa2Sopenharmony_ci ] 42fb299fa2Sopenharmony_ci 43fb299fa2Sopenharmony_ci public_configs = [ ":updater_ui_support_cfg" ] 44fb299fa2Sopenharmony_ci 45fb299fa2Sopenharmony_ci sources = [ 46fb299fa2Sopenharmony_ci "control/callback_manager.cpp", 47fb299fa2Sopenharmony_ci "control/event_listener.cpp", 48fb299fa2Sopenharmony_ci "control/event_manager.cpp", 49fb299fa2Sopenharmony_ci "driver/drm_driver.cpp", 50fb299fa2Sopenharmony_ci "driver/fbdev_driver.cpp", 51fb299fa2Sopenharmony_ci "driver/graphic_engine.cpp", 52fb299fa2Sopenharmony_ci "driver/input_event.cpp", 53fb299fa2Sopenharmony_ci "driver/keys_input_device.cpp", 54fb299fa2Sopenharmony_ci "driver/pointers_input_device.cpp", 55fb299fa2Sopenharmony_ci "driver/surface_dev.cpp", 56fb299fa2Sopenharmony_ci "driver/ui_rotation.cpp", 57fb299fa2Sopenharmony_ci "language/language_ui.cpp", 58fb299fa2Sopenharmony_ci "strategy/logo_strategy.cpp", 59fb299fa2Sopenharmony_ci "strategy/progress_strategy.cpp", 60fb299fa2Sopenharmony_ci "strategy/ui_strategy.cpp", 61fb299fa2Sopenharmony_ci "updater_ui_config.cpp", 62fb299fa2Sopenharmony_ci "updater_ui_env.cpp", 63fb299fa2Sopenharmony_ci "updater_ui_facade.cpp", 64fb299fa2Sopenharmony_ci "updater_ui_tools.cpp", 65fb299fa2Sopenharmony_ci "view/component/box_progress_adapter.cpp", 66fb299fa2Sopenharmony_ci "view/component/component_factory.cpp", 67fb299fa2Sopenharmony_ci "view/component/img_view_adapter.cpp", 68fb299fa2Sopenharmony_ci "view/component/label_btn_adapter.cpp", 69fb299fa2Sopenharmony_ci "view/component/text_label_adapter.cpp", 70fb299fa2Sopenharmony_ci "view/layout/auto_layout.cpp", 71fb299fa2Sopenharmony_ci "view/layout/layout_parser.cpp", 72fb299fa2Sopenharmony_ci "view/page/base_page.cpp", 73fb299fa2Sopenharmony_ci "view/page/page.cpp", 74fb299fa2Sopenharmony_ci "view/page/page_manager.cpp", 75fb299fa2Sopenharmony_ci "view/page/sub_page.cpp", 76fb299fa2Sopenharmony_ci "view/view_api.cpp", 77fb299fa2Sopenharmony_ci ] 78fb299fa2Sopenharmony_ci 79fb299fa2Sopenharmony_ci include_dirs = [ 80fb299fa2Sopenharmony_ci "${updater_path}/services/common", 81fb299fa2Sopenharmony_ci "${updater_path}/services/include/log", 82fb299fa2Sopenharmony_ci "${updater_path}/services/include", 83fb299fa2Sopenharmony_ci "${updater_path}/utils/include", 84fb299fa2Sopenharmony_ci "${updater_path}/utils/json", 85fb299fa2Sopenharmony_ci "${updater_path}/services", 86fb299fa2Sopenharmony_ci "${updater_path}/interfaces/kits/include", 87fb299fa2Sopenharmony_ci "${updater_path}/services/ui", 88fb299fa2Sopenharmony_ci "${updater_path}/services/ui/include", 89fb299fa2Sopenharmony_ci "${updater_path}/services/ui/control", 90fb299fa2Sopenharmony_ci "${updater_path}/services/ui/driver", 91fb299fa2Sopenharmony_ci "${updater_path}/services/ui/view", 92fb299fa2Sopenharmony_ci "${updater_path}/services/ui/language", 93fb299fa2Sopenharmony_ci ] 94fb299fa2Sopenharmony_ci 95fb299fa2Sopenharmony_ci deps = [ 96fb299fa2Sopenharmony_ci "${updater_path}/interfaces/kits/packages:libpackageExt", 97fb299fa2Sopenharmony_ci "${updater_path}/services/log:libupdaterlog", 98fb299fa2Sopenharmony_ci "${updater_path}/utils:libutils", 99fb299fa2Sopenharmony_ci ] 100fb299fa2Sopenharmony_ci 101fb299fa2Sopenharmony_ci external_deps = [ 102fb299fa2Sopenharmony_ci "bounds_checking_function:libsec_static", 103fb299fa2Sopenharmony_ci "cJSON:cjson", 104fb299fa2Sopenharmony_ci "libdrm:libdrm", 105fb299fa2Sopenharmony_ci "libpng:libpng", 106fb299fa2Sopenharmony_ci ] 107fb299fa2Sopenharmony_ci 108fb299fa2Sopenharmony_ci if (!updater_ui_support) { 109fb299fa2Sopenharmony_ci sources = [] 110fb299fa2Sopenharmony_ci } else { 111fb299fa2Sopenharmony_ci external_deps += [ 112fb299fa2Sopenharmony_ci "drivers_peripheral_input:hdi_input", 113fb299fa2Sopenharmony_ci "ui_lite:libupdater_layout", 114fb299fa2Sopenharmony_ci ] 115fb299fa2Sopenharmony_ci } 116fb299fa2Sopenharmony_ci 117fb299fa2Sopenharmony_ci if (defined(updater_ui_custom_deps)) { 118fb299fa2Sopenharmony_ci external_deps += updater_ui_custom_deps 119fb299fa2Sopenharmony_ci } 120fb299fa2Sopenharmony_ci 121fb299fa2Sopenharmony_ci if (defined(updater_ui_custom_cfg)) { 122fb299fa2Sopenharmony_ci public_configs += updater_ui_custom_cfg 123fb299fa2Sopenharmony_ci } 124fb299fa2Sopenharmony_ci 125fb299fa2Sopenharmony_ci subsystem_name = "updater" 126fb299fa2Sopenharmony_ci part_name = "updater" 127fb299fa2Sopenharmony_ci} 128