From b60ec027c82f691d2b94fb881d311adb1400b1f7 Mon Sep 17 00:00:00 2001 From: Lotol Date: Sat, 6 May 2023 02:38:59 +0000 Subject: [PATCH] =?UTF-8?q?=E7=BB=9D=E5=AF=B9=E8=B7=AF=E5=BE=84=E9=83=A8?= =?UTF-8?q?=E4=BB=B6=E5=8C=96=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lotol Change-Id: I58270772dcc897693cdf423c72a825e39dd4bec4 --- bundle_framework_lite.gni | 12 +++++ frameworks/bundle_lite/BUILD.gn | 34 ++++++------ .../kits/bundle_lite/js/builtin/BUILD.gn | 19 ++++--- services/bundlemgr_lite/BUILD.gn | 52 +++++++++---------- .../bundlemgr_lite/bundle_daemon/BUILD.gn | 12 +++-- services/bundlemgr_lite/tools/BUILD.gn | 26 +++++----- 6 files changed, 88 insertions(+), 67 deletions(-) diff --git a/bundle_framework_lite.gni b/bundle_framework_lite.gni index c01b278..e8cbd1c 100644 --- a/bundle_framework_lite.gni +++ b/bundle_framework_lite.gni @@ -11,6 +11,18 @@ # See the License for the specific language governing permissions and # limitations under the License. +ace_engine_lite_path = "//foundation/arkui/ace_engine_lite" +appverify_lite_path = + "//base/security/appverify/interfaces/innerkits/appverify_lite" +arkui_path = "//foundation/arkui" +communication_path = "//foundation/communication" +hilog_lite_path = "//base/hiviewdfx/hilog_lite" +permission_lite_path = "//base/security/permission_lite" +resource_management_lite_path = "//base/global/resource_management_lite" +samgr_lite_path = "//foundation/systemabilitymgr/samgr_lite" +startup_path = "//base/startup" +utils_lite_path = "//commonlibrary/utils_lite" + declare_args() { enable_ohos_bundle_manager_service = false enable_ohos_bundle_manager_service_permission = false diff --git a/frameworks/bundle_lite/BUILD.gn b/frameworks/bundle_lite/BUILD.gn index 6999eec..85639d0 100644 --- a/frameworks/bundle_lite/BUILD.gn +++ b/frameworks/bundle_lite/BUILD.gn @@ -12,6 +12,8 @@ # limitations under the License. import("//build/lite/config/component/lite_component.gni") import("//build/lite/ndk/ndk.gni") +import( + "//foundation/bundlemanager/bundle_framework_lite/bundle_framework_lite.gni") generate_notice_file("bundle_notice_file") { module_name = "bundle" @@ -44,7 +46,7 @@ lite_library("bundle") { public_deps = [ "${aafwk_lite_path}/frameworks/want_lite:want", - "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_static", + "${hilog_lite_path}/frameworks/featured:hilog_static", ] include_dirs = [ @@ -55,18 +57,18 @@ lite_library("bundle") { "${appexecfwk_lite_path}/interfaces/kits/bundle_lite", "${appexecfwk_lite_path}/utils/bundle_lite", "${appexecfwk_lite_path}/frameworks/bundle_lite/include", - "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite", - "//base/security/permission_lite/interfaces/kits", - "//base/security/permission_lite/services/pms/include", + "${hilog_lite_path}/interfaces/native/kits/hilog_lite", + "${permission_lite_path}/interfaces/kits", + "${permission_lite_path}/services/pms/include", "${aafwk_lite_path}/frameworks/want_lite/include", "${aafwk_lite_path}/interfaces/kits/want_lite", "${aafwk_lite_path}/interfaces/kits/ability_lite/slite", "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite", - "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", - "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry", + "${samgr_lite_path}/interfaces/kits/samgr", + "${samgr_lite_path}/interfaces/kits/registry", "//third_party/bounds_checking_function/include", - "//commonlibrary/utils_lite/include", - "//commonlibrary/utils_lite/memory/include", + "${utils_lite_path}/include", + "${utils_lite_path}/memory/include", "//third_party/cJSON", ] } else { @@ -90,25 +92,25 @@ lite_library("bundle") { deps = [ "${aafwk_lite_path}/frameworks/want_lite:want", - "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", - "//base/security/permission_lite/services/pms_client:pms_client", + "${hilog_lite_path}/frameworks/featured:hilog_shared", + "${permission_lite_path}/services/pms_client:pms_client", ] include_dirs = [ "include", - "//base/security/permission_lite/interfaces/kits", - "//base/security/permission_lite/services/pms/include", + "${permission_lite_path}/interfaces/kits", + "${permission_lite_path}/services/pms/include", "${aafwk_lite_path}/frameworks/want_lite/include", "${aafwk_lite_path}/interfaces/kits/want_lite", "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite", "${appexecfwk_lite_path}/interfaces/inner_api/bundlemgr_lite", "${appexecfwk_lite_path}/interfaces/kits/bundle_lite", "${appexecfwk_lite_path}/utils/bundle_lite", - "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include", - "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", - "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry", + "${communication_path}/ipc/interfaces/innerkits/c/ipc/include", + "${samgr_lite_path}/interfaces/kits/samgr", + "${samgr_lite_path}/interfaces/kits/registry", "//third_party/bounds_checking_function/include", - "//commonlibrary/utils_lite/include", + "${utils_lite_path}/include", "//third_party/cJSON", ] diff --git a/interfaces/kits/bundle_lite/js/builtin/BUILD.gn b/interfaces/kits/bundle_lite/js/builtin/BUILD.gn index f53ef4f..9be0b95 100644 --- a/interfaces/kits/bundle_lite/js/builtin/BUILD.gn +++ b/interfaces/kits/bundle_lite/js/builtin/BUILD.gn @@ -12,15 +12,18 @@ # limitations under the License. import("//build/lite/config/component/lite_component.gni") import("//build/lite/ndk/ndk.gni") +import( + "//foundation/bundlemanager/bundle_framework_lite/bundle_framework_lite.gni") + static_library("capability_api_simulator") { sources = [ "${appexecfwk_lite_path}/interfaces/kits/bundle_lite/js/builtin/src/capability_module.cpp" ] include_dirs = [ - "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/base", - "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/jsi", - "${appexecfwk_lite_path}/interfaces/kits/bundle_lite/js/builtin/include", - "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include", "${aafwk_lite_path}/interfaces/kits/want_lite", "${appexecfwk_lite_path}/interfaces/kits/bundle_lite", + "${appexecfwk_lite_path}/interfaces/kits/bundle_lite/js/builtin/include", + "${arkui_path}/ace_engine_lite/interfaces/inner_api/builtin/base", + "${arkui_path}/ace_engine_lite/interfaces/inner_api/builtin/jsi", + "${communication_path}/ipc/interfaces/innerkits/c/ipc/include", ] defines = [ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER" ] outdir = rebase_path("$root_out_dir") @@ -33,12 +36,12 @@ shared_library("capability_api") { cflags += [ "-Wall" ] cflags_cc = cflags include_dirs = [ - "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/base", - "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/jsi", - "${appexecfwk_lite_path}/interfaces/kits/bundle_lite/js/builtin/include", - "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include", "${aafwk_lite_path}/interfaces/kits/want_lite", "${appexecfwk_lite_path}/interfaces/kits/bundle_lite", + "${appexecfwk_lite_path}/interfaces/kits/bundle_lite/js/builtin/include", + "${arkui_path}/ace_engine_lite/interfaces/inner_api/builtin/base", + "${arkui_path}/ace_engine_lite/interfaces/inner_api/builtin/jsi", + "${communication_path}/ipc/interfaces/innerkits/c/ipc/include", ] defines = [ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER" ] outdir = rebase_path("$root_out_dir") diff --git a/services/bundlemgr_lite/BUILD.gn b/services/bundlemgr_lite/BUILD.gn index 3fb0ae6..4c52d73 100644 --- a/services/bundlemgr_lite/BUILD.gn +++ b/services/bundlemgr_lite/BUILD.gn @@ -46,12 +46,12 @@ if (ohos_kernel_type == "liteos_m") { } deps = [ + "${ace_engine_lite_path}/frameworks:ace_lite", "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle", - "//base/global/resource_management_lite/frameworks/resmgr_lite:global_resmgr", - "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_static", + "${hilog_lite_path}/frameworks/featured:hilog_static", + "${resource_management_lite_path}/frameworks/resmgr_lite:global_resmgr", + "${samgr_lite_path}/samgr:samgr", "//build/lite/config/component/cJSON:cjson_static", - "//foundation/arkui/ace_engine_lite/frameworks:ace_lite", - "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", "//third_party/jerryscript/jerry-core:jerry-core_static", ] @@ -63,17 +63,17 @@ if (ohos_kernel_type == "liteos_m") { "${appexecfwk_lite_path}/interfaces/kits/bundle_lite", "${appexecfwk_lite_path}/utils/bundle_lite", "${appexecfwk_lite_path}/frameworks/bundle_lite/include", - "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite", - "//base/startup/init/interfaces/innerkits/include/syspara", + "${hilog_lite_path}/interfaces/native/kits/hilog_lite", + "${startup_path}/init/interfaces/innerkits/include/syspara", "${aafwk_lite_path}/interfaces/kits/ability_lite/slite", "${aafwk_lite_path}/services/abilitymgr_lite/include", "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite", "${aafwk_lite_path}/interfaces/kits/ability_lite", "${aafwk_lite_path}/interfaces/kits/want_lite", "${aafwk_lite_path}/frameworks/want_lite/include", - "//base/global/resource_management_lite/interfaces/inner_api/include", - "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry", - "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", + "${resource_management_lite_path}/interfaces/inner_api/include", + "${samgr_lite_path}/interfaces/kits/registry", + "${samgr_lite_path}/interfaces/kits/samgr", "//third_party/jerryscript/jerry-core", "//third_party/jerryscript/jerry-core/api", "//third_party/jerryscript/jerry-core/ecma/base", @@ -84,12 +84,12 @@ if (ohos_kernel_type == "liteos_m") { "//third_party/cJSON", "//third_party/zlib", "//third_party/zlib/contrib/minizip", - "//base/security/permission_lite/interfaces/kits", - "//base/security/permission_lite/services/pms/include", - "//base/security/appverify/interfaces/innerkits/appverify_lite/include", + "${permission_lite_path}/interfaces/kits", + "${permission_lite_path}/services/pms/include", + "${appverify_lite_path}/include", "//third_party/bounds_checking_function/include", - "//commonlibrary/utils_lite/include", - "//commonlibrary/utils_lite/memory/include", + "${utils_lite_path}/include", + "${utils_lite_path}/memory/include", "include", ] } @@ -126,7 +126,7 @@ if (ohos_kernel_type == "liteos_m") { "src/zip_file.cpp", ] include_dirs = [ - "//base/global/resource_management_lite/interfaces/inner_api/include", + "${resource_management_lite_path}/interfaces/inner_api/include", "${aafwk_lite_path}/services/abilitymgr_lite/include", "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite", "${aafwk_lite_path}/interfaces/kits/ability_lite", @@ -136,28 +136,28 @@ if (ohos_kernel_type == "liteos_m") { "${appexecfwk_lite_path}/frameworks/bundle_lite/include", "${appexecfwk_lite_path}/interfaces/kits/bundle_lite", "${appexecfwk_lite_path}/utils/bundle_lite", - "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry", - "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", + "${samgr_lite_path}/interfaces/kits/registry", + "${samgr_lite_path}/interfaces/kits/samgr", "//third_party/cJSON", "//third_party/zlib", "//third_party/zlib/contrib/minizip", - "//base/security/permission_lite/interfaces/kits", - "//base/security/permission_lite/services/pms/include", - "//base/security/appverify/interfaces/innerkits/appverify_lite/include", + "${permission_lite_path}/interfaces/kits", + "${permission_lite_path}/services/pms/include", + "${appverify_lite_path}/include", "//third_party/bounds_checking_function/include", - "//commonlibrary/utils_lite/include", - "//commonlibrary/utils_lite/memory", + "${utils_lite_path}/include", + "${utils_lite_path}/memory", "include", ] public_deps = [ "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle", - "//base/global/resource_management_lite/frameworks/resmgr_lite:global_resmgr", - "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", - "//base/security/appverify/interfaces/innerkits/appverify_lite:verify", + "${appverify_lite_path}:verify", + "${hilog_lite_path}/frameworks/featured:hilog_shared", + "${resource_management_lite_path}/frameworks/resmgr_lite:global_resmgr", + "${samgr_lite_path}/samgr:samgr", "//build/lite/config/component/cJSON:cjson_shared", "//build/lite/config/component/zlib:zlib_shared", - "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", ] } lite_component("appexecfwk_services_lite") { diff --git a/services/bundlemgr_lite/bundle_daemon/BUILD.gn b/services/bundlemgr_lite/bundle_daemon/BUILD.gn index 4c2c311..cedc3ba 100755 --- a/services/bundlemgr_lite/bundle_daemon/BUILD.gn +++ b/services/bundlemgr_lite/bundle_daemon/BUILD.gn @@ -11,6 +11,8 @@ # See the License for the specific language governing permissions and # limitations under the License. import("//build/lite/config/component/lite_component.gni") +import( + "//foundation/bundlemanager/bundle_framework_lite/bundle_framework_lite.gni") generate_notice_file("bundle_daemon_lite_notice_file") { module_name = "bundle_daemon_lite" @@ -43,9 +45,9 @@ executable("bundle_daemon") { ] deps = [ - "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", + "${hilog_lite_path}/frameworks/featured:hilog_shared", + "${samgr_lite_path}/samgr:samgr", "//build/lite/config/component/zlib:zlib_shared", - "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", ] include_dirs = [ @@ -53,9 +55,9 @@ executable("bundle_daemon") { "${appexecfwk_lite_path}/interfaces/inner_api/bundlemgr_lite", "${appexecfwk_lite_path}/utils/bundle_lite", "${appexecfwk_lite_path}/services/bundlemgr_lite/include", - "//foundation/systemabilitymgr/samgr_lite/interfaces/innerkits/samgr", - "//foundation/systemabilitymgr/samgr_lite/interfaces/innerkits/registry", + "${samgr_lite_path}/interfaces/innerkits/samgr", + "${samgr_lite_path}/interfaces/innerkits/registry", "//third_party/zlib/contrib/minizip", - "//commonlibrary/utils_lite/include", + "${utils_lite_path}/include", ] } diff --git a/services/bundlemgr_lite/tools/BUILD.gn b/services/bundlemgr_lite/tools/BUILD.gn index 7a38c7a..42db079 100644 --- a/services/bundlemgr_lite/tools/BUILD.gn +++ b/services/bundlemgr_lite/tools/BUILD.gn @@ -11,6 +11,8 @@ # See the License for the specific language governing permissions and # limitations under the License. import("//build/lite/config/component/lite_component.gni") +import( + "//foundation/bundlemanager/bundle_framework_lite/bundle_framework_lite.gni") generate_notice_file("bm_notice_file") { module_name = "bm" @@ -37,19 +39,19 @@ executable("bm") { deps = [ "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle", - "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", - "//base/security/permission_lite/services/pms_client:pms_client", - "//base/startup/init/interfaces/innerkits:libbegetutil", + "${communication_path}/ipc/interfaces/innerkits/c/ipc:ipc_single", + "${hilog_lite_path}/frameworks/featured:hilog_shared", + "${permission_lite_path}/services/pms_client:pms_client", + "${samgr_lite_path}/samgr:samgr", + "${startup_path}/init/interfaces/innerkits:libbegetutil", "//build/lite/config/component/cJSON:cjson_shared", - "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single", - "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", ] include_dirs = [ "include", - "//base/security/permission_lite/services/pms_client/include", - "//base/security/permission_lite/interfaces/innerkits", - "//base/startup/init/interfaces/innerkits/include/syspara", + "${permission_lite_path}/services/pms_client/include", + "${permission_lite_path}/interfaces/innerkits", + "${startup_path}/init/interfaces/innerkits/include/syspara", "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite", "${aafwk_lite_path}/interfaces/kits/want_lite", "${aafwk_lite_path}/services/abilitymgr_lite/include", @@ -57,11 +59,11 @@ executable("bm") { "${appexecfwk_lite_path}/frameworks/bundle_lite/include", "${appexecfwk_lite_path}/utils/bundle_lite", "${appexecfwk_lite_path}/interfaces/kits/bundle_lite", - "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", - "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry", + "${samgr_lite_path}/interfaces/kits/samgr", + "${samgr_lite_path}/interfaces/kits/registry", "//third_party/cJSON", - "//commonlibrary/utils_lite/include", - "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include", + "${utils_lite_path}/include", + "${communication_path}/ipc/interfaces/innerkits/c/ipc/include", ] defines = [ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER" ] -- Gitee