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" 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 71 if (defined(global_parts_info) && 72 !defined(global_parts_info.ability_ability_runtime)) { 73 ability_runtime_enable = false 74 bundle_framework_free_install = false 75 } 76 77 if (defined(global_parts_info) && 78 !defined(global_parts_info.account_os_account)) { 79 account_enable = false 80 bundle_framework_free_install = false 81 } 82 83 if (defined(global_parts_info) && 84 !defined(global_parts_info.bundlemanager_distributed_bundle_framework)) { 85 distributed_bundle_framework = false 86 } 87 88 if (defined(global_parts_info) && 89 !defined(global_parts_info.customization_config_policy)) { 90 configpolicy_enable = false 91 } 92 93 if (defined(global_parts_info) && 94 !defined(global_parts_info.global_resource_management)) { 95 global_resmgr_enable = false 96 bundle_framework_bundle_resource = false 97 } 98 99 if (defined(global_parts_info) && !defined(global_parts_info.global_i18n)) { 100 global_i18n_enable = false 101 } 102 103 if (defined(global_parts_info) && 104 !defined(global_parts_info.hiviewdfx_hicollie)) { 105 hicollie_enable = false 106 } 107 108 if (defined(global_parts_info) && 109 (!defined(global_parts_info.powermgr_power_manager) || 110 !defined(global_parts_info.powermgr_battery_manager) || 111 !defined(global_parts_info.powermgr_display_manager) || 112 !defined(global_parts_info.resourceschedule_device_usage_statistics))) { 113 bundle_framework_free_install = false 114 } 115 116 if (defined(global_parts_info) && 117 (!defined(global_parts_info.powermgr_power_manager) || 118 !defined(global_parts_info.powermgr_battery_manager) || 119 !defined(global_parts_info.powermgr_display_manager))) { 120 bundle_framework_power_mgr_enable = false 121 } 122 123 if (defined(global_parts_info) && 124 !defined(global_parts_info.hiviewdfx_hisysevent)) { 125 hisysevent_enable = false 126 } 127 128 if (defined(global_parts_info) && 129 !defined(global_parts_info.window_window_manager)) { 130 window_enable = false 131 } 132 133 if (defined(global_parts_info) && 134 !defined(global_parts_info.filemanagement_storage_service)) { 135 storage_service_enable = false 136 } 137 138 if (defined(global_parts_info) && 139 !defined(global_parts_info.security_dlp_permission_service)) { 140 dlp_permission_enable = false 141 } 142 143 if (defined(global_parts_info) && 144 !defined(global_parts_info.security_code_signature)) { 145 code_signature_enable = false 146 } 147 148 if (defined(global_parts_info) && 149 !defined(global_parts_info.security_code_crypto_metadata_process)) { 150 code_encryption_enable = false 151 } 152 153 if (defined(global_parts_info) && 154 !defined(global_parts_info.multimedia_image_framework)) { 155 bundle_framework_graphics = false 156 } 157 158 if (defined(global_parts_info) && 159 !defined(global_parts_info.arkcompiler_runtime_core)) { 160 verify_abc_enabled = false 161 } 162 if (defined(global_parts_info) && 163 !defined(global_parts_info.distributeddatamgr_udmf)) { 164 udmf_enabled = false 165 } 166} 167 168print("bundle_framework_power_mgr_enable = " + 169 "$bundle_framework_power_mgr_enable") 170print("bundle_framework_graphics = " + "$bundle_framework_graphics") 171print("bundle_framework_free_install = " + "$bundle_framework_free_install") 172print("bundle_framework_default_app = " + "$bundle_framework_default_app") 173print("bundle_framework_launcher = " + "$bundle_framework_launcher") 174print("bundle_framework_sandbox_app = " + "$bundle_framework_sandbox_app") 175print("bundle_framework_quick_fix = " + "$bundle_framework_quick_fix") 176print("bundle_framework_app_control = " + "$bundle_framework_app_control") 177print("distributed_bundle_framework = " + "$distributed_bundle_framework") 178print("ability_runtime_enable = " + "$ability_runtime_enable") 179print("account_enable = " + "$account_enable") 180print("configpolicy_enable = " + "$configpolicy_enable") 181print("global_resmgr_enable = " + "$global_resmgr_enable") 182print("hicollie_enable = " + "$hicollie_enable") 183print("support_jsapi = " + "$support_jsapi") 184print("hisysevent_enable = " + "$hisysevent_enable") 185print( 186 "bundle_framework_overlay_install = " + "$bundle_framework_overlay_install") 187print( 188 "bundle_framework_bundle_resource = " + "$bundle_framework_bundle_resource") 189print("verify_abc_enabled = " + "$verify_abc_enabled") 190