• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2023 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
28bundle_framework_path = "//foundation/bundlemanager/bundle_framework"
29ecological_rule_mgr_path = "//foundation/bundlemanager/ecological_rule_mgr/interfaces/innerkits/include"
30common_path = "${bundle_framework_path}/common"
31services_path = "${bundle_framework_path}/services"
32kits_path = "${bundle_framework_path}/interfaces/kits"
33inner_api_path = "${bundle_framework_path}/interfaces/inner_api"
34tools_path = "${bundle_framework_path}/tools"
35base_path = "${bundle_framework_path}/interfaces/inner_api/appexecfwk_base"
36core_path = "${bundle_framework_path}/interfaces/inner_api/appexecfwk_core"
37extension_path =
38    "${bundle_framework_path}/interfaces/inner_api/bundlemgr_extension"
39
40declare_args() {
41  bundle_framework_power_mgr_enable = true
42  bundle_framework_graphics = true
43  bundle_framework_free_install = true
44  bundle_framework_default_app = true
45  bundle_framework_launcher = true
46  bundle_framework_sandbox_app = true
47  bundle_framework_quick_fix = true
48  bundle_framework_app_control = true
49  distributed_bundle_framework = true
50  bundle_framework_overlay_install = true
51
52  ability_runtime_enable = true
53  account_enable = true
54  configpolicy_enable = true
55  global_resmgr_enable = true
56  global_i18n_enable = true
57  hicollie_enable = true
58  hisysevent_enable = true
59  storage_service_enable = true
60  use_pre_bundle_profile = true
61  window_enable = true
62  dlp_permission_enable = true
63  code_signature_enable = true
64  ecologic_rule_mgr_enabled = true
65
66  if (defined(global_parts_info) &&
67      !defined(global_parts_info.ability_ability_runtime)) {
68    ability_runtime_enable = false
69    bundle_framework_free_install = false
70  }
71
72  if (defined(global_parts_info) &&
73      !defined(global_parts_info.account_os_account)) {
74    account_enable = false
75    bundle_framework_free_install = false
76  }
77
78  if (defined(global_parts_info) &&
79      !defined(global_parts_info.bundlemanager_distributed_bundle_framework)) {
80    distributed_bundle_framework = false
81  }
82
83  if (defined(global_parts_info) &&
84      !defined(global_parts_info.customization_config_policy)) {
85    configpolicy_enable = false
86  }
87
88  if (defined(global_parts_info) &&
89      !defined(global_parts_info.global_resource_management)) {
90    global_resmgr_enable = false
91  }
92
93  if (defined(global_parts_info) && !defined(global_parts_info.global_i18n)) {
94    global_i18n_enable = false
95  }
96
97  if (defined(global_parts_info) &&
98      !defined(global_parts_info.hiviewdfx_hicollie)) {
99    hicollie_enable = false
100  }
101
102  if (defined(global_parts_info) &&
103      (!defined(global_parts_info.powermgr_power_manager) ||
104       !defined(global_parts_info.powermgr_battery_manager) ||
105       !defined(global_parts_info.powermgr_display_manager) ||
106       !defined(global_parts_info.resourceschedule_device_usage_statistics))) {
107    bundle_framework_free_install = false
108  }
109
110  if (defined(global_parts_info) &&
111      (!defined(global_parts_info.powermgr_power_manager) ||
112       !defined(global_parts_info.powermgr_battery_manager) ||
113       !defined(global_parts_info.powermgr_display_manager))) {
114    bundle_framework_power_mgr_enable = false
115  }
116
117  if (defined(global_parts_info) &&
118      !defined(global_parts_info.hiviewdfx_hisysevent)) {
119    hisysevent_enable = false
120  }
121
122  if (defined(global_parts_info) &&
123      !defined(global_parts_info.window_window_manager)) {
124    window_enable = false
125  }
126
127  if (defined(global_parts_info) &&
128      !defined(global_parts_info.filemanagement_storage_service)) {
129    storage_service_enable = false
130  }
131
132  if (defined(global_parts_info) &&
133      !defined(global_parts_info.security_dlp_permission_service)) {
134    dlp_permission_enable = false
135  }
136
137  if (defined(global_parts_info) &&
138      !defined(global_parts_info.security_code_signature)) {
139    code_signature_enable = false
140  }
141
142  if (defined(global_parts_info) &&
143      !defined(global_parts_info.bundlemanager_ecological_rule_mgr)) {
144    ecologic_rule_mgr_enabled = false
145  }
146}
147
148print("bundle_framework_power_mgr_enable = " +
149      "$bundle_framework_power_mgr_enable")
150print("bundle_framework_graphics = " + "$bundle_framework_graphics")
151print("bundle_framework_free_install = " + "$bundle_framework_free_install")
152print("bundle_framework_default_app = " + "$bundle_framework_default_app")
153print("bundle_framework_launcher = " + "$bundle_framework_launcher")
154print("bundle_framework_sandbox_app = " + "$bundle_framework_sandbox_app")
155print("bundle_framework_quick_fix = " + "$bundle_framework_quick_fix")
156print("bundle_framework_app_control = " + "$bundle_framework_app_control")
157print("distributed_bundle_framework = " + "$distributed_bundle_framework")
158print("ability_runtime_enable = " + "$ability_runtime_enable")
159print("account_enable = " + "$account_enable")
160print("configpolicy_enable = " + "$configpolicy_enable")
161print("global_resmgr_enable = " + "$global_resmgr_enable")
162print("hicollie_enable = " + "$hicollie_enable")
163print("support_jsapi = " + "$support_jsapi")
164print("hisysevent_enable = " + "$hisysevent_enable")
165print(
166    "bundle_framework_overlay_install = " + "$bundle_framework_overlay_install")
167