1# Copyright (c) 2021-2024 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" 31fuzz_test_path = "bundle_framework/bundle_framework" 32services_path = "${bundle_framework_path}/services" 33kits_path = "${bundle_framework_path}/interfaces/kits" 34inner_api_path = "${bundle_framework_path}/interfaces/inner_api" 35tools_path = "${bundle_framework_path}/tools" 36base_path = "${bundle_framework_path}/interfaces/inner_api/appexecfwk_base" 37core_path = "${bundle_framework_path}/interfaces/inner_api/appexecfwk_core" 38extension_path = 39 "${bundle_framework_path}/interfaces/inner_api/bundlemgr_extension" 40 41declare_args() { 42 bundle_framework_power_mgr_enable = true 43 bundle_framework_graphics = true 44 bundle_framework_free_install = true 45 bundle_framework_default_app = true 46 bundle_framework_launcher = true 47 bundle_framework_sandbox_app = true 48 bundle_framework_quick_fix = true 49 bundle_framework_app_control = true 50 distributed_bundle_framework = true 51 bundle_framework_overlay_install = true 52 bundle_framework_bundle_resource = true 53 54 ability_runtime_enable = true 55 account_enable = true 56 configpolicy_enable = true 57 global_resmgr_enable = true 58 global_i18n_enable = true 59 hicollie_enable = true 60 hisysevent_enable = true 61 storage_service_enable = true 62 use_pre_bundle_profile = true 63 window_enable = true 64 dlp_permission_enable = true 65 code_signature_enable = true 66 code_encryption_enable = true 67 verify_abc_enabled = true 68 check_eldir_enabled = true 69 udmf_enabled = true 70 bms_device_info_manager_part_enabled = true 71 app_domain_verify_enabled = true 72 device_usage_statistics_enabled = true 73 dfx_sigdump_handler_enabled = true 74 webview_enable = true 75 76 if (defined(global_parts_info) && 77 !defined(global_parts_info.resourceschedule_device_usage_statistics)) { 78 device_usage_statistics_enabled = false 79 bundle_framework_free_install = false 80 } 81 82 if (defined(global_parts_info) && 83 !defined(global_parts_info.ability_ability_runtime)) { 84 ability_runtime_enable = false 85 bundle_framework_free_install = false 86 } 87 88 if (defined(global_parts_info) && 89 !defined(global_parts_info.account_os_account)) { 90 account_enable = false 91 bundle_framework_free_install = false 92 } 93 94 if (defined(global_parts_info) && 95 !defined(global_parts_info.bundlemanager_distributed_bundle_framework)) { 96 distributed_bundle_framework = false 97 } 98 99 if (defined(global_parts_info) && 100 !defined(global_parts_info.customization_config_policy)) { 101 configpolicy_enable = false 102 } 103 104 if (defined(global_parts_info) && 105 !defined(global_parts_info.global_resource_management)) { 106 global_resmgr_enable = false 107 bundle_framework_bundle_resource = false 108 } 109 110 if (defined(global_parts_info) && !defined(global_parts_info.global_i18n)) { 111 global_i18n_enable = false 112 } 113 114 if (defined(global_parts_info) && 115 !defined(global_parts_info.hiviewdfx_hicollie)) { 116 hicollie_enable = false 117 } 118 119 if (defined(global_parts_info) && 120 (!defined(global_parts_info.powermgr_power_manager) || 121 !defined(global_parts_info.powermgr_battery_manager) || 122 !defined(global_parts_info.powermgr_display_manager) || 123 !defined(global_parts_info.resourceschedule_device_usage_statistics))) { 124 bundle_framework_free_install = false 125 } 126 127 if (defined(global_parts_info) && 128 (!defined(global_parts_info.powermgr_power_manager) || 129 !defined(global_parts_info.powermgr_battery_manager) || 130 !defined(global_parts_info.powermgr_display_manager))) { 131 bundle_framework_power_mgr_enable = false 132 } 133 134 if (defined(global_parts_info) && 135 !defined(global_parts_info.hiviewdfx_hisysevent)) { 136 hisysevent_enable = false 137 } 138 139 if (defined(global_parts_info) && 140 !defined(global_parts_info.window_window_manager)) { 141 window_enable = false 142 } 143 144 if (defined(global_parts_info) && 145 !defined(global_parts_info.filemanagement_storage_service)) { 146 storage_service_enable = false 147 } 148 149 if (defined(global_parts_info) && 150 !defined(global_parts_info.security_dlp_permission_service)) { 151 dlp_permission_enable = false 152 } 153 154 if (defined(global_parts_info) && 155 !defined(global_parts_info.security_code_signature)) { 156 code_signature_enable = false 157 } 158 159 if (defined(global_parts_info) && 160 !defined(global_parts_info.security_code_crypto_metadata_process)) { 161 code_encryption_enable = false 162 } 163 164 if (defined(global_parts_info) && 165 !defined(global_parts_info.multimedia_image_framework)) { 166 bundle_framework_graphics = false 167 } 168 169 if (defined(global_parts_info) && 170 !defined(global_parts_info.arkcompiler_runtime_core)) { 171 verify_abc_enabled = false 172 } 173 if (defined(global_parts_info) && 174 !defined(global_parts_info.distributeddatamgr_udmf)) { 175 udmf_enabled = false 176 } 177 178 if (defined(global_parts_info) && 179 !defined(global_parts_info.deviceprofile_device_info_manager)) { 180 bms_device_info_manager_part_enabled = false 181 } 182 183 if (defined(global_parts_info) && 184 !defined(global_parts_info.bundlemanager_app_domain_verify)) { 185 app_domain_verify_enabled = false 186 } 187 188 if (defined(global_parts_info) && 189 !defined(global_parts_info.hiviewdfx_faultloggerd)) { 190 dfx_sigdump_handler_enabled = false 191 } 192 193 if (defined(global_parts_info) && !defined(global_parts_info.web_webview)) { 194 webview_enable = false 195 } 196} 197 198print("bundle_framework_power_mgr_enable = " + 199 "$bundle_framework_power_mgr_enable") 200print("bundle_framework_graphics = " + "$bundle_framework_graphics") 201print("bundle_framework_free_install = " + "$bundle_framework_free_install") 202print("bundle_framework_default_app = " + "$bundle_framework_default_app") 203print("bundle_framework_launcher = " + "$bundle_framework_launcher") 204print("bundle_framework_sandbox_app = " + "$bundle_framework_sandbox_app") 205print("bundle_framework_quick_fix = " + "$bundle_framework_quick_fix") 206print("bundle_framework_app_control = " + "$bundle_framework_app_control") 207print("distributed_bundle_framework = " + "$distributed_bundle_framework") 208print("ability_runtime_enable = " + "$ability_runtime_enable") 209print("account_enable = " + "$account_enable") 210print("configpolicy_enable = " + "$configpolicy_enable") 211print("global_resmgr_enable = " + "$global_resmgr_enable") 212print("hicollie_enable = " + "$hicollie_enable") 213print("support_jsapi = " + "$support_jsapi") 214print("hisysevent_enable = " + "$hisysevent_enable") 215print( 216 "bundle_framework_overlay_install = " + "$bundle_framework_overlay_install") 217print( 218 "bundle_framework_bundle_resource = " + "$bundle_framework_bundle_resource") 219print("verify_abc_enabled = " + "$verify_abc_enabled") 220