1# Copyright (c) 2023 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("//base/update/sys_installer/sys_installer_default_cfg.gni") 15import("//build/ohos.gni") 16 17sys_installer_path = rebase_path("${sys_installer_absolutely_path}", ".") 18module_update_service_gen("module_update_service") { 19 deps = [ "${sys_installer_path}/services/module_update/service:libmodule_update_service_static" ] 20 21 if (ohos_indep_compiler_enable) { 22 external_deps = [ "init:libbegetutil", ] 23 } 24 25 part_name = "sys_installer" 26 subsystem_name = "updater" 27} 28 29config("module_update_service_exported_header") { 30 visibility = [ ":*" ] 31 32 include_dirs = [ 33 "${sys_installer_path}/interfaces/inner_api/include", 34 "${sys_installer_path}/services/module_update/include", 35 "${sys_installer_path}/services/module_update/service/include", 36 "${sys_installer_path}/services/module_update/util/include", 37 ] 38} 39 40ohos_static_library("libmodule_update_service_static") { 41 sources = [ 42 "${sys_installer_path}/frameworks/ipc_server/src/module_update_service.cpp", 43 "${sys_installer_path}/frameworks/ipc_server/src/module_update_stub.cpp", 44 "${sys_installer_path}/services/module_update/service/src/module_update_consumer.cpp", 45 "${sys_installer_path}/services/module_update/service/src/module_update_main.cpp", 46 "${sys_installer_path}/services/module_update/service/src/module_update_producer.cpp", 47 "${sys_installer_path}/services/module_update/service/src/module_update_queue.cpp", 48 "${sys_installer_path}/services/module_update/util/src/module_ipc_helper.cpp", 49 ] 50 51 include_dirs = [ 52 "${sys_installer_path}/common/include", 53 "${sys_installer_path}/frameworks/installer_manager/include", 54 "${sys_installer_path}/frameworks/ipc_server/include", 55 "${sys_installer_path}/interfaces/inner_api/include", 56 "${sys_installer_path}/interfaces/innerkits/ipc_client/include", 57 "${sys_installer_path}/services/module_update/service/include", 58 "${sys_installer_path}/services/module_update/include", 59 ] 60 61 public_configs = [ 62 ":module_update_service_exported_header", 63 "${sys_installer_path}/interfaces/innerkits/ipc_client:idl_file_headers", 64 ] 65 66 deps = [ 67 "${sys_installer_path}/interfaces/innerkits/ipc_client:module_update_stub", 68 "${sys_installer_path}/services/module_update/src:module_update_static", 69 ] 70 71 external_deps = [ 72 "access_token:libaccesstoken_sdk", 73 "c_utils:utils", 74 "hilog:libhilog", 75 "hisysevent:libhisyseventmanager", 76 "init:libbeget_proxy", 77 "ipc:ipc_single", 78 "safwk:system_ability_fwk", 79 "samgr:samgr_proxy", 80 "updater:libpackage_shared", 81 "updater:libupdaterlog_shared", 82 "updater:libutils_fs", 83 ] 84 85 if (build_selinux) { 86 external_deps += [ "selinux_adapter:librestorecon" ] 87 cflags = [ "-DWITH_SELINUX" ] 88 } 89 90 part_name = "sys_installer" 91 subsystem_name = "updater" 92} 93