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