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" ] 20 21 part_name = "sys_installer" 22 subsystem_name = "updater" 23} 24 25ohos_static_library("libmodule_update_service") { 26 sources = [ 27 "${sys_installer_path}/frameworks/ipc_server/src/module_update_service.cpp", 28 "${sys_installer_path}/frameworks/ipc_server/src/module_update_stub.cpp", 29 "${sys_installer_path}/frameworks/ipc_server/src/sys_installer_callback_proxy.cpp", 30 "${sys_installer_path}/services/module_update/service/main.cpp", 31 "${sys_installer_path}/services/module_update/service/src/crash_sys_event_listener.cpp", 32 "${sys_installer_path}/services/module_update/service/src/module_update_main.cpp", 33 "${sys_installer_path}/services/module_update/service/src/sys_event_service_listener.cpp", 34 "${sys_installer_path}/services/module_update/util/src/module_ipc_helper.cpp", 35 ] 36 37 include_dirs = [ 38 "${sys_installer_path}/common/include", 39 "${sys_installer_path}/frameworks/installer_manager/include", 40 "${sys_installer_path}/frameworks/ipc_server/include", 41 "${sys_installer_path}/interfaces/inner_api/include", 42 "${sys_installer_path}/interfaces/innerkits/ipc_client/include", 43 "${sys_installer_path}/services/module_update/service/include", 44 ] 45 46 deps = [ "${sys_installer_path}/services/module_update:module_update_utils" ] 47 48 external_deps = [ 49 "access_token:libaccesstoken_sdk", 50 "c_utils:utils", 51 "hisysevent:libhisyseventmanager", 52 "init:libbeget_proxy", 53 "ipc:ipc_core", 54 "safwk:system_ability_fwk", 55 "samgr:samgr_proxy", 56 "updater:libpackageExt", 57 "updater:libupdaterlog", 58 "updater:libutils", 59 ] 60 61 if (build_selinux) { 62 external_deps += [ "selinux_adapter:librestorecon" ] 63 cflags = [ "-DWITH_SELINUX" ] 64 } 65 66 part_name = "sys_installer" 67 subsystem_name = "updater" 68} 69