• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  "//base/update/sys_installer/include",
21  "//base/update/sys_installer/interfaces/innerkits",
22  "//base/update/sys_installer/interfaces/inner_api/include",
23  "//base/update/sys_installer/interfaces/innerkits/ipc_client/include",
24]
25
26download_include = [
27  "//base/update/updateservice/services/core/ability/download/data/include",
28]
29
30firmware_include = [
31  "$firmware_root_path/alarm/include",
32  "$firmware_root_path/callback/include",
33  "$firmware_root_path/check/include",
34  "$firmware_root_path/common/include",
35  "$firmware_root_path/data/db/include",
36  "$firmware_root_path/data/manager/include",
37  "$firmware_root_path/event/include",
38  "$firmware_root_path/service/include",
39  "$firmware_root_path/upgrade/data_processor/include",
40  "$firmware_root_path/upgrade/executor/include",
41  "$firmware_root_path/upgrade/flow/include",
42  "$firmware_root_path/upgrade/install/include",
43  "$firmware_root_path/upgrade/mode/include",
44  "$firmware_root_path/upgrade/status/include",
45  "$firmware_root_path/utils/include",
46]
47firmware_include += ab_update_include
48firmware_include += download_include
49
50ab_update_src = [
51  "$firmware_root_path/upgrade/install/src/firmware_sys_installer_callback.cpp",
52  "$firmware_root_path/upgrade/install/src/firmware_sys_installer_install.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/event/src/firmware_event_listener.cpp",
60  "$firmware_root_path/upgrade/data_processor/src/firmware_check_data_processor.cpp",
61  "$firmware_root_path/upgrade/data_processor/src/firmware_download_data_processor.cpp",
62  "$firmware_root_path/upgrade/data_processor/src/firmware_install_data_processor.cpp",
63  "$firmware_root_path/upgrade/executor/src/firmware_apply_executor.cpp",
64  "$firmware_root_path/upgrade/executor/src/firmware_check_executor.cpp",
65  "$firmware_root_path/upgrade/executor/src/firmware_download_executor.cpp",
66  "$firmware_root_path/upgrade/executor/src/firmware_install_executor.cpp",
67  "$firmware_root_path/upgrade/flow/src/firmware_flow_manager.cpp",
68  "$firmware_root_path/upgrade/flow/src/firmware_manager.cpp",
69  "$firmware_root_path/upgrade/install/src/firmware_install.cpp",
70  "$firmware_root_path/upgrade/install/src/firmware_updater_install.cpp",
71  "$firmware_root_path/upgrade/install/src/firmware_install_factory.cpp",
72  "$firmware_root_path/upgrade/mode/src/firmware_manual_check_mode.cpp",
73  "$firmware_root_path/upgrade/mode/src/firmware_download_mode.cpp",
74  "$firmware_root_path/upgrade/mode/src/firmware_install_apply_mode.cpp",
75  "$firmware_root_path/upgrade/status/src/firmware_status_cache.cpp",
76  "$firmware_root_path/upgrade/status/src/firmware_result_process.cpp",
77  "$firmware_root_path/utils/src/firmware_check_analyze_utils.cpp",
78  "$firmware_root_path/utils/src/firmware_changelog_utils.cpp",
79  "$firmware_root_path/utils/src/firmware_combine_version_utils.cpp",
80]
81
82if (relational_store_native_rdb_enable) {
83  firmware_src += [
84    "$firmware_root_path/data/db/src/firmware_component_operator.cpp",
85    "$firmware_root_path/data/db/src/firmware_component_table.cpp",
86    "$firmware_root_path/data/db/src/firmware_database.cpp",
87    "$firmware_root_path/data/db/src/firmware_database_callback.cpp",
88    "$firmware_root_path/data/db/src/firmware_task_operator.cpp",
89    "$firmware_root_path/data/db/src/firmware_task_table.cpp",
90  ]
91} else {
92  firmware_src += [
93    "$firmware_root_path/data/db/src/firmware_component_operator_empty.cpp",
94    "$firmware_root_path/data/db/src/firmware_component_table_empty.cpp",
95    "$firmware_root_path/data/db/src/firmware_database_empty.cpp",
96    "$firmware_root_path/data/db/src/firmware_task_operator_empty.cpp",
97    "$firmware_root_path/data/db/src/firmware_task_table_empty.cpp",
98  ]
99}
100firmware_src += ab_update_src
101
102firmware_external_deps = []
103
104ab_update_deps = [ "//base/update/sys_installer/interfaces/innerkits/ipc_client:libsysinstallerkits" ]
105
106firmware_deps = []
107firmware_deps += ab_update_deps
108