• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
14VENDOR_CONFIG_PATH = rebase_path(
15        "//vendor/${product_company}/${product_name}/foundation/bundlemanager/bundle_framework/appexecfwk_impl.gni")
16CMD = "if [ -f ${VENDOR_CONFIG_PATH} ]; then echo true; else echo false; fi"
17
18vendor_config_exist =
19    exec_script("//build/lite/run_shell_cmd.py", [ CMD ], "value")
20if (vendor_config_exist) {
21  import(
22      "//vendor/${product_company}/${product_name}/foundation/bundlemanager/bundle_framework/appexecfwk_impl.gni")
23} else {
24  bundle_mgr_impl_sources = []
25  bundle_mgr_impl_include_dirs = []
26}
27
28ability_runtime_path = "//foundation/ability/ability_runtime"
29ability_runtime_innerkits_path = "${ability_runtime_path}/interfaces/inner_api"
30
31appexecfwk_path = "//foundation/bundlemanager/bundle_framework"
32common_path = "${appexecfwk_path}/common"
33services_path = "${appexecfwk_path}/services"
34kits_path = "${appexecfwk_path}/interfaces/kits"
35inner_api_path = "${appexecfwk_path}/interfaces/inner_api"
36tools_path = "${appexecfwk_path}/tools"
37core_path = "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core"
38
39declare_args() {
40  bundle_framework_graphics = true
41  bundle_framework_free_install = true
42  bundle_framework_default_app = true
43  bundle_framework_launcher = true
44  bundle_framework_sandbox_app = true
45  bundle_framework_quick_fix = true
46  bundle_framework_app_control = true
47  distributed_bundle_framework = true
48
49  ability_runtime_enable = true
50  account_enable = true
51  configpolicy_enable = true
52  device_manager_enable = true
53  global_resmgr_enable = true
54  global_i18n_enable = true
55  hicollie_enable = true
56  hisysevent_enable = true
57  bms_rdb_enable = true
58  use_pre_bundle_profile = true
59
60  if (defined(global_parts_info) &&
61      !defined(global_parts_info.ability_ability_runtime)) {
62    ability_runtime_enable = false
63    bundle_framework_free_install = false
64  }
65
66  if (defined(global_parts_info) &&
67      !defined(global_parts_info.account_os_account)) {
68    account_enable = false
69    bundle_framework_free_install = false
70  }
71
72  if (defined(global_parts_info) &&
73      !defined(global_parts_info.bundlemanager_distributed_bundle_framework)) {
74    distributed_bundle_framework = false
75  }
76
77  if (defined(global_parts_info) &&
78      !defined(global_parts_info.customization_config_policy)) {
79    configpolicy_enable = false
80  }
81
82  if (defined(global_parts_info) &&
83      !defined(global_parts_info.distributedhardware_device_manager)) {
84    device_manager_enable = false
85  }
86
87  if (defined(global_parts_info) &&
88      !defined(global_parts_info.global_resource_management)) {
89    global_resmgr_enable = false
90  }
91
92  if (defined(global_parts_info) && !defined(global_parts_info.global_i18n)) {
93    global_i18n_enable = false
94  }
95
96  if (defined(global_parts_info) &&
97      !defined(global_parts_info.hiviewdfx_hicollie_native)) {
98    hicollie_enable = false
99  }
100
101  if (defined(global_parts_info) &&
102      (!defined(global_parts_info.powermgr_power_manager) ||
103       !defined(global_parts_info.powermgr_battery_manager) ||
104       !defined(global_parts_info.powermgr_display_manager) ||
105       !defined(global_parts_info.resourceschedule_device_usage_statistics))) {
106    bundle_framework_free_install = false
107  }
108
109  if (defined(global_parts_info) &&
110      !defined(global_parts_info.hiviewdfx_hisysevent_native)) {
111    hisysevent_enable = false
112  }
113
114  if (defined(global_parts_info) &&
115      !defined(global_parts_info.distributeddatamgr_relational_store)) {
116    bms_rdb_enable = false
117  }
118}
119
120if (!bms_rdb_enable) {
121  bundle_framework_app_control = false
122}
123
124print("bundle_framework_graphics = " + "$bundle_framework_graphics")
125print("bundle_framework_free_install = " + "$bundle_framework_free_install")
126print("bundle_framework_default_app = " + "$bundle_framework_default_app")
127print("bundle_framework_launcher = " + "$bundle_framework_launcher")
128print("bundle_framework_sandbox_app = " + "$bundle_framework_sandbox_app")
129print("bundle_framework_quick_fix = " + "$bundle_framework_quick_fix")
130print("bundle_framework_app_control = " + "$bundle_framework_app_control")
131print("distributed_bundle_framework = " + "$distributed_bundle_framework")
132print("ability_runtime_enable = " + "$ability_runtime_enable")
133print("account_enable = " + "$account_enable")
134print("configpolicy_enable = " + "$configpolicy_enable")
135print("device_manager_enable = " + "$device_manager_enable")
136print("global_resmgr_enable = " + "$global_resmgr_enable")
137print("hicollie_enable = " + "$hicollie_enable")
138print("support_jsapi = " + "$support_jsapi")
139print("hisysevent_enable = " + "$hisysevent_enable")
140print("bms_rdb_enable = " + "$bms_rdb_enable")
141