From 09a6eab24139f2fe739c8127cdb8c6c2595e9e2c Mon Sep 17 00:00:00 2001 From: sunjiakun Date: Wed, 20 Nov 2024 10:59:59 +0800 Subject: [PATCH] =?UTF-8?q?bundle=5Fframework=E7=8B=AC=E7=AB=8B=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sunjiakun --- bundle.json | 8 +++ interfaces/inner_api/appexecfwk_core/BUILD.gn | 2 +- interfaces/kits/js/installer/BUILD.gn | 1 + .../kits/js/launcher_bundle_manager/BUILD.gn | 1 + services/bundlemgr/BUILD.gn | 51 ++++++++++++++++++- .../BUILD.gn | 9 ++-- services/test/moduletest/utils/BUILD.gn | 3 +- .../bm/pageAbilityBundleForInstall/BUILD.gn | 2 +- .../bm/pageAbilityBundleForUninstall/BUILD.gn | 2 +- test/sceneProject/tools/ohos_test/BUILD.gn | 4 +- .../driver_test/driver_feature10/BUILD.gn | 2 +- .../driver_test/driver_feature15/BUILD.gn | 2 +- .../driver_test/driver_feature16/BUILD.gn | 2 +- .../driver_test/driver_feature17/BUILD.gn | 2 +- .../driver_test/driver_feature18/BUILD.gn | 2 +- .../driver_test/driver_feature6/BUILD.gn | 2 +- .../high_version_driver_feature13/BUILD.gn | 2 +- test/systemtest/common/bms/BUILD.gn | 16 ++---- 18 files changed, 83 insertions(+), 30 deletions(-) diff --git a/bundle.json b/bundle.json index f260209ef5..3b88be00dc 100644 --- a/bundle.json +++ b/bundle.json @@ -64,6 +64,8 @@ "init", "ipc", "image_framework", + "kv_store", + "libpng", "napi", "os_account", "power_manager", @@ -186,6 +188,12 @@ ] }, "name": "//foundation/bundlemanager/bundle_framework/interfaces/kits/js/common:bundle_napi_common" + }, + { + "name": "//foundation/bundlemanager/bundle_framework/services/bundlemgr:bundle_tool_libs", + "visibility": [ + "bundle_tool" + ] } ], "test": [ diff --git a/interfaces/inner_api/appexecfwk_core/BUILD.gn b/interfaces/inner_api/appexecfwk_core/BUILD.gn index cb416bc59a..28106e8806 100644 --- a/interfaces/inner_api/appexecfwk_core/BUILD.gn +++ b/interfaces/inner_api/appexecfwk_core/BUILD.gn @@ -87,12 +87,12 @@ ohos_shared_library("appexecfwk_core") { "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", - "samgr:samgr_proxy", ] public_external_deps = [ "ability_base:want", "common_event_service:cesfwk_innerkits", + "samgr:samgr_proxy", ] if (bundle_framework_graphics) { diff --git a/interfaces/kits/js/installer/BUILD.gn b/interfaces/kits/js/installer/BUILD.gn index edac49c1ad..3dc4a13f2e 100755 --- a/interfaces/kits/js/installer/BUILD.gn +++ b/interfaces/kits/js/installer/BUILD.gn @@ -40,6 +40,7 @@ ohos_shared_library("installer") { "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", + "samgr:samgr_proxy", ] sources = [ diff --git a/interfaces/kits/js/launcher_bundle_manager/BUILD.gn b/interfaces/kits/js/launcher_bundle_manager/BUILD.gn index a1122db418..deb5bf6801 100644 --- a/interfaces/kits/js/launcher_bundle_manager/BUILD.gn +++ b/interfaces/kits/js/launcher_bundle_manager/BUILD.gn @@ -53,6 +53,7 @@ ohos_shared_library("launcherbundlemanager") { "hilog:libhilog", "ipc:ipc_single", "napi:ace_napi", + "window_manager:libwm", ] relative_install_dir = "module/bundle" subsystem_name = "bundlemanager" diff --git a/services/bundlemgr/BUILD.gn b/services/bundlemgr/BUILD.gn index c43ee6a87c..c8dc80f6e9 100644 --- a/services/bundlemgr/BUILD.gn +++ b/services/bundlemgr/BUILD.gn @@ -100,6 +100,7 @@ ohos_source_set("parser_common") { ] part_name = "bundle_framework" + subsystem_name = "bundlemanager" } ohos_source_set("rpcid_decode") { @@ -121,6 +122,7 @@ ohos_source_set("rpcid_decode") { ] part_name = "bundle_framework" + subsystem_name = "bundlemanager" } ohos_source_set("bundle_parser") { @@ -197,10 +199,12 @@ ohos_source_set("bundle_parser") { defines += [ "X86_EMULATOR_MODE" ] } part_name = "bundle_framework" + subsystem_name = "bundlemanager" } group("bms_target") { deps = [ + ":bundle_tool_libs", ":installs", ":installs.cfg", ":libbms", @@ -556,7 +560,13 @@ ohos_shared_library("installs") { } if (dfx_sigdump_handler_enabled) { - external_deps += [ "faultloggerd:dfx_sigdump_handler" ] + external_deps += [ + "faultloggerd:backtrace_local", + "faultloggerd:dfx_sigdump_handler", + "faultloggerd:libdfx_procinfo", + "faultloggerd:libfaultloggerd", + "faultloggerd:libunwinder", + ] defines += [ "DFX_SIGDUMP_HANDLER_ENABLE" ] } @@ -571,3 +581,42 @@ ohos_prebuilt_etc("installs.cfg") { subsystem_name = "bundlemanager" part_name = "bundle_framework" } + +config("bundle_tool_libs_config") { + include_dirs = [ + "include", + "include/shared", + "include/sandbox_app", + "include/rdb", + "include/installd", + "include/quick_fix", + "include/uninstall_data_mgr", + "include/navigation", + ] +} + +ohos_shared_library("bundle_tool_libs") { + branch_protector_ret = "pac_ret" + sanitize = { + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + integer_overflow = true + ubsan = true + } + public_configs = [ ":bundle_tool_libs_config" ] + + sources = [ "${kits_path}/js/bundlemgr/bundle_death_recipient.cpp" ] + + deps = [ "${core_path}:appexecfwk_core" ] + + external_deps = [ + "c_utils:utils", + "hilog:libhilog", + "ipc:ipc_single", + ] + + subsystem_name = "bundlemanager" + part_name = "bundle_framework" +} diff --git a/services/bundlemgr/test/unittest/bms_bundle_quick_fix_mgr_rdb_test/BUILD.gn b/services/bundlemgr/test/unittest/bms_bundle_quick_fix_mgr_rdb_test/BUILD.gn index 955a2292b5..5a2eeb6bdc 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_quick_fix_mgr_rdb_test/BUILD.gn +++ b/services/bundlemgr/test/unittest/bms_bundle_quick_fix_mgr_rdb_test/BUILD.gn @@ -65,10 +65,6 @@ ohos_unittest("BmsBundleQuickFixMgrRdbTest") { "${bundle_framework_path}/test/sceneProject/unittest/test_bundle/bmsAccessTokentest1:bmsAccessTokentest1", "${bundle_framework_path}/test/sceneProject/unittest/test_bundle/bmsAccessTokentest3:bmsAccessTokentest3", ] - if (bundle_framework_graphics) { - include_dirs += [ "../../../../../../../multimedia/image_framework/interfaces/innerkits/include" ] - deps += [ "../../../../../../../multimedia/image_framework/interfaces/innerkits:image_native" ] - } deps += bundle_install_deps deps += [ @@ -96,6 +92,11 @@ ohos_unittest("BmsBundleQuickFixMgrRdbTest") { "selinux_adapter:librestorecon", ] external_deps += bundle_install_external_deps + + if (bundle_framework_graphics) { + external_deps += [ "image_framework:image_native" ] + } + defines = [] if (code_signature_enable) { sources += [ diff --git a/services/test/moduletest/utils/BUILD.gn b/services/test/moduletest/utils/BUILD.gn index a1350554ed..7e2a0f3616 100644 --- a/services/test/moduletest/utils/BUILD.gn +++ b/services/test/moduletest/utils/BUILD.gn @@ -18,7 +18,7 @@ config("tool_config") { include_dirs = [ "include" ] } -ohos_source_set("tool_common") { +ohos_static_library("tool_common") { sources = [ "src/common_tool.cpp" ] public_configs = [ ":tool_config" ] @@ -26,4 +26,5 @@ ohos_source_set("tool_common") { external_deps = [ "c_utils:utils" ] part_name = "bundle_framework" + subsystem_name = "bundlemanager" } diff --git a/test/sceneProject/tools/bm/pageAbilityBundleForInstall/BUILD.gn b/test/sceneProject/tools/bm/pageAbilityBundleForInstall/BUILD.gn index 4abb66a486..5d415f7b07 100755 --- a/test/sceneProject/tools/bm/pageAbilityBundleForInstall/BUILD.gn +++ b/test/sceneProject/tools/bm/pageAbilityBundleForInstall/BUILD.gn @@ -18,7 +18,7 @@ ohos_hap("pageAbilityBundleForInstall") { hap_profile = "./src/main/config.json" hap_name = "pageAbilityBundleForInstall" subsystem_name = "bundlemanager" - final_hap_path = "$root_out_dir/tests/systemtest/bundle_tool/tools/resource/bm/${hap_name}.hap" + final_hap_path = "$root_out_dir/tests/systemtest/bundle_framework/tools/resource/bm/${hap_name}.hap" testonly = true deps = [ ":hjs_demo_js_assets", diff --git a/test/sceneProject/tools/bm/pageAbilityBundleForUninstall/BUILD.gn b/test/sceneProject/tools/bm/pageAbilityBundleForUninstall/BUILD.gn index 2ec69107e1..9d0d979c35 100755 --- a/test/sceneProject/tools/bm/pageAbilityBundleForUninstall/BUILD.gn +++ b/test/sceneProject/tools/bm/pageAbilityBundleForUninstall/BUILD.gn @@ -18,7 +18,7 @@ ohos_hap("pageAbilityBundleForUninstall") { hap_profile = "./src/main/config.json" hap_name = "pageAbilityBundleForUninstall" subsystem_name = "bundlemanager" - final_hap_path = "$root_out_dir/tests/systemtest/bundle_tool/tools/resource/bm/${hap_name}.hap" + final_hap_path = "$root_out_dir/tests/systemtest/bundle_framework/tools/resource/bm/${hap_name}.hap" testonly = true deps = [ ":hjs_demo_js_assets", diff --git a/test/sceneProject/tools/ohos_test/BUILD.gn b/test/sceneProject/tools/ohos_test/BUILD.gn index bba404b6b2..6e517632a2 100755 --- a/test/sceneProject/tools/ohos_test/BUILD.gn +++ b/test/sceneProject/tools/ohos_test/BUILD.gn @@ -16,7 +16,5 @@ import("../../../../appexecfwk.gni") ohos_copy("copy_ohos_test") { sources = [ "./ohos_test.xml" ] - outputs = [ - "$root_out_dir/tests/systemtest/bundle_tool/tools/resource/ohos_test.xml", - ] + outputs = [ "$root_out_dir/tests/systemtest/bundle_framework/tools/resource/ohos_test.xml" ] } diff --git a/test/sceneProject/unittest/driver_test/driver_feature10/BUILD.gn b/test/sceneProject/unittest/driver_test/driver_feature10/BUILD.gn index 92b7079767..dddff4f095 100644 --- a/test/sceneProject/unittest/driver_test/driver_feature10/BUILD.gn +++ b/test/sceneProject/unittest/driver_test/driver_feature10/BUILD.gn @@ -24,7 +24,7 @@ ohos_hap("driver_feature10_hap") { ":hjs_demo_js_assets", ":hjs_demo_resources", ] - shared_libraries = [ "//third_party/libpng:libpng" ] + external_deps = [ "libpng:libpng" ] certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.example.driverTest.p7b" } diff --git a/test/sceneProject/unittest/driver_test/driver_feature15/BUILD.gn b/test/sceneProject/unittest/driver_test/driver_feature15/BUILD.gn index 5690faf695..b10a694f03 100644 --- a/test/sceneProject/unittest/driver_test/driver_feature15/BUILD.gn +++ b/test/sceneProject/unittest/driver_test/driver_feature15/BUILD.gn @@ -24,7 +24,7 @@ ohos_hap("driver_feature15_hap") { ":hjs_demo_js_assets", ":hjs_demo_resources", ] - shared_libraries = [ "//third_party/libpng:libpng" ] + external_deps = [ "libpng:libpng" ] certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.example.driverTest.p7b" } diff --git a/test/sceneProject/unittest/driver_test/driver_feature16/BUILD.gn b/test/sceneProject/unittest/driver_test/driver_feature16/BUILD.gn index 521a2d95c0..171dc8410f 100644 --- a/test/sceneProject/unittest/driver_test/driver_feature16/BUILD.gn +++ b/test/sceneProject/unittest/driver_test/driver_feature16/BUILD.gn @@ -24,7 +24,7 @@ ohos_hap("driver_feature16_hap") { ":hjs_demo_js_assets", ":hjs_demo_resources", ] - shared_libraries = [ "//third_party/libpng:libpng" ] + external_deps = [ "libpng:libpng" ] certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.example.driverTest.p7b" } diff --git a/test/sceneProject/unittest/driver_test/driver_feature17/BUILD.gn b/test/sceneProject/unittest/driver_test/driver_feature17/BUILD.gn index e51787f0f8..f2e10034f2 100644 --- a/test/sceneProject/unittest/driver_test/driver_feature17/BUILD.gn +++ b/test/sceneProject/unittest/driver_test/driver_feature17/BUILD.gn @@ -24,7 +24,7 @@ ohos_hap("driver_feature17_hap") { ":hjs_demo_js_assets", ":hjs_demo_resources", ] - shared_libraries = [ "//third_party/libpng:libpng" ] + external_deps = [ "libpng:libpng" ] certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.example.driverTest.p7b" } diff --git a/test/sceneProject/unittest/driver_test/driver_feature18/BUILD.gn b/test/sceneProject/unittest/driver_test/driver_feature18/BUILD.gn index b52cf17aad..c42692a65c 100644 --- a/test/sceneProject/unittest/driver_test/driver_feature18/BUILD.gn +++ b/test/sceneProject/unittest/driver_test/driver_feature18/BUILD.gn @@ -24,7 +24,7 @@ ohos_hap("driver_feature18_hap") { ":hjs_demo_js_assets", ":hjs_demo_resources", ] - shared_libraries = [ "//third_party/libpng:libpng" ] + external_deps = [ "libpng:libpng" ] certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.example.driverTest.p7b" } diff --git a/test/sceneProject/unittest/driver_test/driver_feature6/BUILD.gn b/test/sceneProject/unittest/driver_test/driver_feature6/BUILD.gn index 551e8dd202..4cf51eb7ee 100644 --- a/test/sceneProject/unittest/driver_test/driver_feature6/BUILD.gn +++ b/test/sceneProject/unittest/driver_test/driver_feature6/BUILD.gn @@ -24,7 +24,7 @@ ohos_hap("driver_feature6_hap") { ":hjs_demo_js_assets", ":hjs_demo_resources", ] - shared_libraries = [ "//third_party/libpng:libpng" ] + external_deps = [ "libpng:libpng" ] certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.example.driverTest.p7b" } diff --git a/test/sceneProject/unittest/driver_test/high_version_driver_feature13/BUILD.gn b/test/sceneProject/unittest/driver_test/high_version_driver_feature13/BUILD.gn index f090b5d912..a963188c3d 100644 --- a/test/sceneProject/unittest/driver_test/high_version_driver_feature13/BUILD.gn +++ b/test/sceneProject/unittest/driver_test/high_version_driver_feature13/BUILD.gn @@ -24,7 +24,7 @@ ohos_hap("high_version_driver_feature13_hap") { ":hjs_demo_js_assets", ":hjs_demo_resources", ] - shared_libraries = [ "//third_party/libpng:libpng" ] + external_deps = [ "libpng:libpng" ] certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.example.driverTest.p7b" } diff --git a/test/systemtest/common/bms/BUILD.gn b/test/systemtest/common/bms/BUILD.gn index 178fdb9e6b..9cd9b75d23 100644 --- a/test/systemtest/common/bms/BUILD.gn +++ b/test/systemtest/common/bms/BUILD.gn @@ -26,7 +26,7 @@ config("bms_system_test_config") { ] } -ohos_source_set("bms_install_sst_source") { +ohos_static_library("bms_install_sst_source") { testonly = true sources = [ @@ -43,30 +43,24 @@ ohos_source_set("bms_install_sst_source") { public_configs = [ ":bms_system_test_config" ] - public_deps = [ - "${common_path}:libappexecfwk_common", - "//third_party/googletest:gtest_main", - ] + deps = [ "${common_path}:libappexecfwk_common" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } - deps = [ - "${services_path}/test/moduletest/utils:tool_common", - "//third_party/googletest:gtest_main", - - # "${core_path}:appexecfwk_core", - ] external_deps = [ "ability_base:base", "ability_base:want", "c_utils:utils", + "googletest:gtest_main", "hilog:libhilog", "ipc:ipc_core", + "json:nlohmann_json_static", ] part_name = "bundle_framework" + subsystem_name = "bundlemanager" } group("systemtest_bms") { -- Gitee