1# Copyright (c) 2025 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 14import("//build/config/components/ets_frontend/ets2abc_config.gni") 15import("//build/ohos.gni") 16import("//foundation/bundlemanager/bundle_framework/appexecfwk.gni") 17 18ohos_shared_library("ani_launcher_bundle_manager") { 19 branch_protector_ret = "pac_ret" 20 21 sanitize = { 22 boundary_sanitize = true 23 cfi = true 24 cfi_cross_dso = true 25 debug = false 26 integer_overflow = true 27 ubsan = true 28 } 29 include_dirs = [ 30 "${kits_path}/ani/common", 31 "${kits_path}/ani/launcher_bundle_manager", 32 "${kits_path}/js/launcher_bundle_manager", 33 ] 34 if (bundle_framework_launcher) { 35 sources = [ "ani_launcher_bundle_manager.cpp" ] 36 } else { 37 sources = [ "ani_launcher_bundle_manager_unsupported.cpp" ] 38 } 39 40 defines = [ 41 "APP_LOG_TAG = \"BMS\"", 42 "LOG_DOMAIN = 0xD001120", 43 ] 44 45 deps = [ 46 "${base_path}:appexecfwk_base", 47 "${common_path}:libappexecfwk_common", 48 "${core_path}:appexecfwk_core", 49 "${kits_path}/ani/common:bms_ani_common", 50 "${kits_path}/js/common:bundle_napi_common", 51 "${kits_path}/js/launcher_bundle_manager:launcherbundlemanager_common", 52 ] 53 54 cflags = [ 55 "-Os", 56 "-fstack-protector-strong", 57 ] 58 59 cflags_cc = [ 60 "-Os", 61 "-fstack-protector-strong", 62 ] 63 64 external_deps = [ 65 "ability_base:want", 66 "ability_runtime:ability_manager", 67 "ability_runtime:ability_start_options", 68 "ability_runtime:ani_common", 69 "ability_runtime:runtime", 70 "c_utils:utils", 71 "hilog:libhilog", 72 "ipc:ipc_single", 73 "napi:ace_napi", 74 "runtime_core:ani", 75 "runtime_core:ani_helpers", 76 ] 77 78 subsystem_name = "bundlemanager" 79 part_name = "bundle_framework" 80} 81 82generate_static_abc("launcher_bundle_manager") { 83 base_url = "./ets" 84 files = [ "./ets/@ohos.bundle.launcherBundleManager.ets" ] 85 is_boot_abc = "True" 86 device_dst_file = "/system/framework/launcher_bundle_manager.abc" 87} 88 89ohos_prebuilt_etc("launcher_bundle_manager_etc") { 90 source = "$target_out_dir/launcher_bundle_manager.abc" 91 module_install_dir = "framework" 92 subsystem_name = "bundlemanager" 93 part_name = "bundle_framework" 94 deps = [ ":launcher_bundle_manager" ] 95} 96 97generate_static_abc("element_name") { 98 base_url = "./ets" 99 files = [ 100 "./ets/bundleManager/ElementName.ets", 101 "./ets/bundleManager/ElementNameInner.ets", 102 ] 103 is_boot_abc = "True" 104 device_dst_file = "/system/framework/element_name.abc" 105} 106 107ohos_prebuilt_etc("element_name_etc") { 108 source = "$target_out_dir/element_name.abc" 109 module_install_dir = "framework" 110 subsystem_name = "bundlemanager" 111 part_name = "bundle_framework" 112 deps = [ ":element_name" ] 113} 114 115generate_static_abc("launcher_ability_info") { 116 base_url = "./ets" 117 files = [ 118 "./ets/bundleManager/LauncherAbilityInfo.ets", 119 "./ets/bundleManager/LauncherAbilityInfoInner.ets", 120 ] 121 is_boot_abc = "True" 122 device_dst_file = "/system/framework/launcher_ability_info.abc" 123 external_dependencies = [ "bundle_framework:copy_bundleManager_ets" ] 124} 125 126ohos_prebuilt_etc("launcher_ability_info_etc") { 127 source = "$target_out_dir/launcher_ability_info.abc" 128 module_install_dir = "framework" 129 subsystem_name = "bundlemanager" 130 part_name = "bundle_framework" 131 deps = [ ":launcher_ability_info" ] 132} 133