• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_bundle_res_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
30  include_dirs = [
31    "${inner_api_path}/appexecfwk_core/include",
32    "${kits_path}/ani/resource_manager",
33    "${kits_path}/ani/common",
34    "${kits_path}/js/common",
35    "${kits_path}/js/bundle_resource",
36  ]
37
38  if (bundle_framework_bundle_resource) {
39    sources = [ "ani_resource_manager.cpp" ]
40  } else {
41    sources = [ "ani_resource_manager_unsupport.cpp" ]
42  }
43
44  defines = [
45    "APP_LOG_TAG = \"BMS\"",
46    "LOG_DOMAIN = 0xD001120",
47  ]
48
49  deps = [
50    "${base_path}:appexecfwk_base",
51    "${common_path}:libappexecfwk_common",
52    "${core_path}:appexecfwk_core",
53    "${kits_path}/ani/common:bms_ani_common",
54    "${kits_path}/js/bundle_resource:bundle_res_common",
55    "${kits_path}/js/common:bundle_napi_common",
56  ]
57
58  cflags = [
59    "-Os",
60    "-fstack-protector-strong",
61  ]
62
63  cflags_cc = [
64    "-Os",
65    "-fstack-protector-strong",
66  ]
67
68  external_deps = [
69    "ability_base:want",
70    "c_utils:utils",
71    "common_event_service:cesfwk_core",
72    "common_event_service:cesfwk_innerkits",
73    "hilog:libhilog",
74    "ipc:ipc_core",
75    "napi:ace_napi",
76    "runtime_core:ani",
77    "runtime_core:ani_helpers",
78    "samgr:samgr_proxy",
79  ]
80
81  subsystem_name = "bundlemanager"
82  part_name = "bundle_framework"
83}
84
85generate_static_abc("bundle_resource_info") {
86  base_url = "./ets"
87  files = [
88    "./ets/bundleManager/BundleResourceInfo.ets",
89    "./ets/bundleManager/BundleResourceInfoInner.ets",
90  ]
91  is_boot_abc = "True"
92  device_dst_file = "/system/framework/bundle_resource_info.abc"
93}
94
95ohos_prebuilt_etc("bundle_resource_info_etc") {
96  source = "$target_out_dir/bundle_resource_info.abc"
97  module_install_dir = "framework"
98  subsystem_name = "bundlemanager"
99  part_name = "bundle_framework"
100  deps = [ ":bundle_resource_info" ]
101}
102
103generate_static_abc("bundle_resource_manager") {
104  base_url = "./ets"
105  files = [ "./ets/@ohos.bundle.bundleResourceManager.ets" ]
106  is_boot_abc = "True"
107  device_dst_file = "/system/framework/bundle_resource_manager.abc"
108}
109
110ohos_prebuilt_etc("bundle_resource_manager_etc") {
111  source = "$target_out_dir/bundle_resource_manager.abc"
112  module_install_dir = "framework"
113  subsystem_name = "bundlemanager"
114  part_name = "bundle_framework"
115  deps = [ ":bundle_resource_manager" ]
116}
117
118generate_static_abc("launcher_ability_resource_info") {
119  base_url = "./ets"
120  files = [
121    "./ets/bundleManager/LauncherAbilityResourceInfo.ets",
122    "./ets/bundleManager/LauncherAbilityResourceInfoInner.ets",
123  ]
124  is_boot_abc = "True"
125  device_dst_file = "/system/framework/launcher_ability_resource_info.abc"
126}
127
128ohos_prebuilt_etc("launcher_ability_resource_info_etc") {
129  source = "$target_out_dir/launcher_ability_resource_info.abc"
130  module_install_dir = "framework"
131  subsystem_name = "bundlemanager"
132  part_name = "bundle_framework"
133  deps = [ ":launcher_ability_resource_info" ]
134}
135