1# Copyright (c) 2020 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. 13import("//build/lite/config/component/lite_component.gni") 14 15config("bundle_config") { 16 defines = [ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER" ] 17 cflags_cc = [ "-std=c++14" ] 18} 19 20if (ohos_kernel_type == "liteos_m") { 21 static_library("bundlems") { 22 sources = [ 23 "src/bundle_map.cpp", 24 "src/bundle_mgr_service.cpp", 25 "src/bundle_mgr_slite_feature.cpp", 26 "src/bundle_util.cpp", 27 "src/gt_bundle_extractor.cpp", 28 "src/gt_bundle_installer.cpp", 29 "src/gt_bundle_manager_service.cpp", 30 "src/gt_bundle_parser.cpp", 31 "src/gt_extractor_util.cpp", 32 ] 33 deps = [ 34 "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle", 35 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_static", 36 "//foundation/ace/ace_engine_lite/frameworks:ace_lite", 37 "//foundation/distributedschedule/samgr_lite/samgr:samgr", 38 ] 39 40 include_dirs = [ 41 "${appexecfwk_lite_path}/services/bundlemgr_lite/include", 42 "${appexecfwk_lite_path}/interfaces/innerkits/bundlemgr_lite/slite", 43 "${appexecfwk_lite_path}/interfaces/innerkits/bundlemgr_lite", 44 "${appexecfwk_lite_path}/interfaces/kits/bundle_lite/slite", 45 "${appexecfwk_lite_path}/interfaces/kits/bundle_lite", 46 "${appexecfwk_lite_path}/utils/bundle_lite", 47 "${appexecfwk_lite_path}/frameworks/bundle_lite/include", 48 "//base/startup/syspara_lite/interfaces/kits/", 49 "${aafwk_lite_path}/interfaces/kits/ability_lite/slite", 50 "${aafwk_lite_path}/services/abilitymgr_lite/include", 51 "${aafwk_lite_path}/interfaces/innerkits/abilitymgr_lite", 52 "${aafwk_lite_path}/interfaces/kits/ability_lite", 53 "${aafwk_lite_path}/interfaces/kits/want_lite", 54 "${aafwk_lite_path}/frameworks/want_lite/include", 55 "//base/global/resmgr_lite/interfaces/innerkits/include", 56 "//foundation/distributedschedule/samgr_lite/interfaces/kits/registry", 57 "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr", 58 "//third_party/jerryscript/jerry-core/api", 59 "//third_party/jerryscript/jerry-core/include", 60 "//third_party/cJSON", 61 "//third_party/zlib", 62 "//third_party/zlib/contrib/minizip", 63 "//base/security/permission/interfaces/kits/permission_lite", 64 "//base/security/permission/services/permission_lite/pms/include", 65 "//base/security/appverify/interfaces/innerkits/appverify_lite/include", 66 "//third_party/bounds_checking_function/include", 67 "//utils/native/lite/include", 68 "//utils/native/lite/memory/include", 69 "include", 70 ] 71 } 72 lite_component("appexecfwk_services_lite") { 73 features = [ ":bundlems" ] 74 } 75} else { 76 shared_library("bundlems") { 77 configs -= [ "//build/lite/config:language_cpp" ] 78 configs += [ ":bundle_config" ] 79 80 cflags = [ 81 "-Wall", 82 "-Wno-format", 83 "-Wno-format-extra-args", 84 ] 85 cflags_cc = cflags 86 87 sources = [ 88 "src/bundle_daemon_client.cpp", 89 "src/bundle_extractor.cpp", 90 "src/bundle_info_creator.cpp", 91 "src/bundle_inner_feature.cpp", 92 "src/bundle_installer.cpp", 93 "src/bundle_manager_service.cpp", 94 "src/bundle_map.cpp", 95 "src/bundle_ms_feature.cpp", 96 "src/bundle_ms_host.cpp", 97 "src/bundle_parser.cpp", 98 "src/bundle_res_transform.cpp", 99 "src/bundle_util.cpp", 100 "src/extractor_util.cpp", 101 "src/hap_sign_verify.cpp", 102 "src/zip_file.cpp", 103 ] 104 include_dirs = [ 105 "//base/global/resmgr_lite/interfaces/innerkits/include", 106 "${aafwk_lite_path}/services/abilitymgr_lite/include", 107 "${aafwk_lite_path}/interfaces/innerkits/abilitymgr_lite", 108 "${aafwk_lite_path}/interfaces/kits/ability_lite", 109 "${aafwk_lite_path}/interfaces/kits/want_lite", 110 "${aafwk_lite_path}/frameworks/want_lite/include", 111 "${appexecfwk_lite_path}/interfaces/innerkits/bundlemgr_lite", 112 "${appexecfwk_lite_path}/frameworks/bundle_lite/include", 113 "${appexecfwk_lite_path}/interfaces/kits/bundle_lite", 114 "${appexecfwk_lite_path}/utils/bundle_lite", 115 "//foundation/distributedschedule/samgr_lite/interfaces/kits/registry", 116 "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr", 117 "//third_party/cJSON", 118 "//third_party/zlib", 119 "//third_party/zlib/contrib/minizip", 120 "//base/security/permission/interfaces/kits/permission_lite", 121 "//base/security/permission/services/permission_lite/pms/include", 122 "//base/security/appverify/interfaces/innerkits/appverify_lite/include", 123 "//third_party/bounds_checking_function/include", 124 "//utils/native/lite/include", 125 "//utils/native/lite/memory", 126 "include", 127 ] 128 129 public_deps = [ 130 "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle", 131 "//base/global/resmgr_lite/frameworks/resmgr_lite:global_resmgr", 132 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 133 "//base/security/appverify/interfaces/innerkits/appverify_lite:verify", 134 "//build/lite/config/component/cJSON:cjson_shared", 135 "//build/lite/config/component/zlib:zlib_shared", 136 "//foundation/distributedschedule/samgr_lite/samgr:samgr", 137 ] 138 } 139 lite_component("appexecfwk_services_lite") { 140 features = [ 141 ":bundlems", 142 "tools:bm", 143 "bundle_daemon:bundle_daemon", 144 ] 145 } 146} 147 148generate_notice_file("appexecfwk_services_lite_notice_file") { 149 module_name = "appexecfwk_services_lite" 150 module_source_dir_list = [ 151 "//third_party/cJSON", 152 "//third_party/zlib", 153 "//third_party/bounds_checking_function", 154 ] 155} 156