1# Copyright (c) 2022 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/updateservice/updateengine.gni") 15import("$updateengine_root_path/services/core/ability/sqlite/sqlite.gni") 16 17firmware_root_path = "$updateengine_root_path/services/firmware" 18 19ab_update_include = [] 20 21download_include = [ 22 "//base/update/updateservice/services/core/ability/download/data/include", 23] 24 25firmware_include = [ 26 "$firmware_root_path/alarm/include", 27 "$firmware_root_path/callback/include", 28 "$firmware_root_path/check/include", 29 "$firmware_root_path/common/include", 30 "$firmware_root_path/data/db/include", 31 "$firmware_root_path/data/manager/include", 32 "$firmware_root_path/event/include", 33 "$firmware_root_path/service/include", 34 "$firmware_root_path/upgrade/data_processor/include", 35 "$firmware_root_path/upgrade/executor/include", 36 "$firmware_root_path/upgrade/flow/include", 37 "$firmware_root_path/upgrade/install/include", 38 "$firmware_root_path/upgrade/mode/include", 39 "$firmware_root_path/upgrade/status/include", 40 "$firmware_root_path/utils/include", 41] 42firmware_include += ab_update_include 43firmware_include += download_include 44 45ab_update_src = [ 46 "$firmware_root_path/upgrade/install/src/firmware_sys_installer_callback.cpp", 47] 48 49if (ability_ability_runtime_enable) { 50 ab_update_src += [ "$firmware_root_path/upgrade/install/src/firmware_sys_installer_install.cpp" ] 51} else { 52 ab_update_src += [ "$firmware_root_path/upgrade/install/src/firmware_sys_installer_install_empty.cpp" ] 53} 54 55firmware_src = [ 56 "$firmware_root_path/callback/src/firmware_callback_utils.cpp", 57 "$firmware_root_path/common/src/firmware_update_helper.cpp", 58 "$firmware_root_path/data/manager/src/firmware_preferences_utils.cpp", 59 "$firmware_root_path/upgrade/data_processor/src/firmware_download_data_processor.cpp", 60 "$firmware_root_path/upgrade/data_processor/src/firmware_install_data_processor.cpp", 61 "$firmware_root_path/upgrade/executor/src/firmware_apply_executor.cpp", 62 "$firmware_root_path/upgrade/executor/src/firmware_check_executor.cpp", 63 "$firmware_root_path/upgrade/executor/src/firmware_download_executor.cpp", 64 "$firmware_root_path/upgrade/executor/src/firmware_install_executor.cpp", 65 "$firmware_root_path/upgrade/flow/src/firmware_flow_manager.cpp", 66 "$firmware_root_path/upgrade/flow/src/firmware_manager.cpp", 67 "$firmware_root_path/upgrade/install/src/firmware_install.cpp", 68 "$firmware_root_path/upgrade/install/src/firmware_updater_install.cpp", 69 "$firmware_root_path/upgrade/install/src/firmware_install_factory.cpp", 70 "$firmware_root_path/upgrade/status/src/firmware_status_cache.cpp", 71 "$firmware_root_path/upgrade/status/src/firmware_result_process.cpp", 72 "$firmware_root_path/utils/src/firmware_check_analyze_utils.cpp", 73 "$firmware_root_path/utils/src/firmware_changelog_utils.cpp", 74 "$firmware_root_path/utils/src/firmware_combine_version_utils.cpp", 75] 76 77if (communication_netmanager_base_enable) { 78 firmware_src += [ 79 "$firmware_root_path/event/src/firmware_event_listener.cpp", 80 "$firmware_root_path/upgrade/data_processor/src/firmware_check_data_processor.cpp", 81 "$firmware_root_path/upgrade/mode/src/firmware_download_mode.cpp", 82 "$firmware_root_path/upgrade/mode/src/firmware_manual_check_mode.cpp", 83 "$firmware_root_path/upgrade/mode/src/firmware_install_apply_mode.cpp", 84 ] 85} else { 86 firmware_src += [ 87 "$firmware_root_path/event/src/firmware_event_listener_empty.cpp", 88 "$firmware_root_path/upgrade/data_processor/src/firmware_check_data_processor_empty.cpp", 89 "$firmware_root_path/upgrade/mode/src/firmware_download_mode_empty.cpp", 90 "$firmware_root_path/upgrade/mode/src/firmware_manual_check_mode_empty.cpp", 91 "$firmware_root_path/upgrade/mode/src/firmware_install_apply_mode_empty.cpp", 92 ] 93} 94 95if (relational_store_native_rdb_enable) { 96 firmware_src += [ 97 "$firmware_root_path/data/db/src/firmware_component_operator.cpp", 98 "$firmware_root_path/data/db/src/firmware_component_table.cpp", 99 "$firmware_root_path/data/db/src/firmware_database.cpp", 100 "$firmware_root_path/data/db/src/firmware_database_callback.cpp", 101 "$firmware_root_path/data/db/src/firmware_task_operator.cpp", 102 "$firmware_root_path/data/db/src/firmware_task_table.cpp", 103 ] 104} else { 105 firmware_src += [ 106 "$firmware_root_path/data/db/src/firmware_component_operator_empty.cpp", 107 "$firmware_root_path/data/db/src/firmware_component_table_empty.cpp", 108 "$firmware_root_path/data/db/src/firmware_database_empty.cpp", 109 "$firmware_root_path/data/db/src/firmware_task_operator_empty.cpp", 110 "$firmware_root_path/data/db/src/firmware_task_table_empty.cpp", 111 ] 112} 113firmware_src += ab_update_src 114 115firmware_external_deps = [ "sys_installer:libsysinstaller_shared" ] 116 117ab_update_deps = [] 118 119firmware_deps = [] 120firmware_deps += ab_update_deps 121