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_user_status_awareness_enable = true 44 bundle_framework_graphics = true 45 bundle_framework_free_install = true 46 bundle_framework_default_app = true 47 bundle_framework_launcher = true 48 bundle_framework_sandbox_app = true 49 bundle_framework_quick_fix = true 50 bundle_framework_app_control = true 51 distributed_bundle_framework = true 52 bundle_framework_overlay_install = true 53 bundle_framework_bundle_resource = true 54 55 ability_runtime_enable = true 56 account_enable = true 57 configpolicy_enable = true 58 global_resmgr_enable = true 59 global_i18n_enable = true 60 hicollie_enable = true 61 hisysevent_enable = true 62 storage_service_enable = true 63 use_pre_bundle_profile = true 64 window_enable = true 65 dlp_permission_enable = true 66 code_signature_enable = true 67 code_encryption_enable = true 68 verify_abc_enabled = true 69 check_eldir_enabled = true 70 udmf_enabled = true 71 bms_device_info_manager_part_enabled = true 72 app_domain_verify_enabled = true 73 74 if (defined(global_parts_info) && 75 !defined(global_parts_info.ability_ability_runtime)) { 76 ability_runtime_enable = false 77 bundle_framework_free_install = false 78 } 79 80 if (defined(global_parts_info) && 81 !defined(global_parts_info.account_os_account)) { 82 account_enable = false 83 bundle_framework_free_install = false 84 } 85 86 if (defined(global_parts_info) && 87 !defined(global_parts_info.bundlemanager_distributed_bundle_framework)) { 88 distributed_bundle_framework = false 89 } 90 91 if (defined(global_parts_info) && 92 !defined(global_parts_info.customization_config_policy)) { 93 configpolicy_enable = false 94 } 95 96 if (defined(global_parts_info) && 97 !defined(global_parts_info.global_resource_management)) { 98 global_resmgr_enable = false 99 bundle_framework_bundle_resource = false 100 } 101 102 if (defined(global_parts_info) && !defined(global_parts_info.global_i18n)) { 103 global_i18n_enable = false 104 } 105 106 if (defined(global_parts_info) && 107 !defined(global_parts_info.hiviewdfx_hicollie)) { 108 hicollie_enable = false 109 } 110 111 if (defined(global_parts_info) && 112 (!defined(global_parts_info.powermgr_power_manager) || 113 !defined(global_parts_info.powermgr_battery_manager) || 114 !defined(global_parts_info.powermgr_display_manager) || 115 !defined(global_parts_info.resourceschedule_device_usage_statistics))) { 116 bundle_framework_free_install = 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 bundle_framework_power_mgr_enable = false 124 } 125 126 if (defined(global_parts_info) && 127 !defined(global_parts_info.msdp_user_status_awareness)) { 128 bundle_framework_user_status_awareness_enable = false 129 } 130 131 if (defined(global_parts_info) && 132 !defined(global_parts_info.hiviewdfx_hisysevent)) { 133 hisysevent_enable = false 134 } 135 136 if (defined(global_parts_info) && 137 !defined(global_parts_info.window_window_manager)) { 138 window_enable = false 139 } 140 141 if (defined(global_parts_info) && 142 !defined(global_parts_info.filemanagement_storage_service)) { 143 storage_service_enable = false 144 } 145 146 if (defined(global_parts_info) && 147 !defined(global_parts_info.security_dlp_permission_service)) { 148 dlp_permission_enable = false 149 } 150 151 if (defined(global_parts_info) && 152 !defined(global_parts_info.security_code_signature)) { 153 code_signature_enable = false 154 } 155 156 if (defined(global_parts_info) && 157 !defined(global_parts_info.security_code_crypto_metadata_process)) { 158 code_encryption_enable = false 159 } 160 161 if (defined(global_parts_info) && 162 !defined(global_parts_info.multimedia_image_framework)) { 163 bundle_framework_graphics = false 164 } 165 166 if (defined(global_parts_info) && 167 !defined(global_parts_info.arkcompiler_runtime_core)) { 168 verify_abc_enabled = false 169 } 170 if (defined(global_parts_info) && 171 !defined(global_parts_info.distributeddatamgr_udmf)) { 172 udmf_enabled = false 173 } 174 175 if (defined(global_parts_info) && 176 !defined(global_parts_info.deviceprofile_device_info_manager)) { 177 bms_device_info_manager_part_enabled = false 178 } 179 180 if (defined(global_parts_info) && 181 !defined(global_parts_info.bundlemanager_app_domain_verify)) { 182 app_domain_verify_enabled = false 183 } 184} 185 186print("bundle_framework_power_mgr_enable = " + 187 "$bundle_framework_power_mgr_enable") 188print("bundle_framework_user_status_awareness_enable = " + 189 "$bundle_framework_user_status_awareness_enable") 190print("bundle_framework_graphics = " + "$bundle_framework_graphics") 191print("bundle_framework_free_install = " + "$bundle_framework_free_install") 192print("bundle_framework_default_app = " + "$bundle_framework_default_app") 193print("bundle_framework_launcher = " + "$bundle_framework_launcher") 194print("bundle_framework_sandbox_app = " + "$bundle_framework_sandbox_app") 195print("bundle_framework_quick_fix = " + "$bundle_framework_quick_fix") 196print("bundle_framework_app_control = " + "$bundle_framework_app_control") 197print("distributed_bundle_framework = " + "$distributed_bundle_framework") 198print("ability_runtime_enable = " + "$ability_runtime_enable") 199print("account_enable = " + "$account_enable") 200print("configpolicy_enable = " + "$configpolicy_enable") 201print("global_resmgr_enable = " + "$global_resmgr_enable") 202print("hicollie_enable = " + "$hicollie_enable") 203print("support_jsapi = " + "$support_jsapi") 204print("hisysevent_enable = " + "$hisysevent_enable") 205print( 206 "bundle_framework_overlay_install = " + "$bundle_framework_overlay_install") 207print( 208 "bundle_framework_bundle_resource = " + "$bundle_framework_bundle_resource") 209print("verify_abc_enabled = " + "$verify_abc_enabled") 210