# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//base/update/sys_installer/sys_installer_default_cfg.gni") import("//build/ohos.gni") sys_installer_path = rebase_path("${sys_installer_absolutely_path}", ".") module_update_service_gen("module_update_service") { deps = [ "${sys_installer_path}/services/module_update/service:libmodule_update_service_static" ] part_name = "sys_installer" subsystem_name = "updater" } config("module_update_service_exported_header") { visibility = [ ":*" ] include_dirs = [ "${sys_installer_path}/services/module_update/include", "${sys_installer_path}/services/module_update/util/include", ] } ohos_static_library("libmodule_update_service_static") { sources = [ "${sys_installer_path}/frameworks/ipc_server/src/module_update_service.cpp", "${sys_installer_path}/frameworks/ipc_server/src/module_update_stub.cpp", "${sys_installer_path}/frameworks/ipc_server/src/sys_installer_callback_proxy.cpp", "${sys_installer_path}/services/module_update/service/src/module_update_consumer.cpp", "${sys_installer_path}/services/module_update/service/src/module_update_main.cpp", "${sys_installer_path}/services/module_update/service/src/module_update_producer.cpp", "${sys_installer_path}/services/module_update/service/src/module_update_queue.cpp", "${sys_installer_path}/services/module_update/util/src/module_ipc_helper.cpp", ] include_dirs = [ "${sys_installer_path}/common/include", "${sys_installer_path}/frameworks/installer_manager/include", "${sys_installer_path}/frameworks/ipc_server/include", "${sys_installer_path}/interfaces/inner_api/include", "${sys_installer_path}/interfaces/innerkits/ipc_client/include", "${sys_installer_path}/services/module_update/service/include", "${sys_installer_path}/services/module_update/include", ] public_configs = [ ":module_update_service_exported_header" ] deps = [ "${sys_installer_path}/services/module_update/src:module_update_static", ] external_deps = [ "access_token:libaccesstoken_sdk", "c_utils:utils", "hilog:libhilog", "hisysevent:libhisyseventmanager", "init:libbeget_proxy", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr:samgr_proxy", "updater:libpackage_shared", "updater:libupdaterlog_shared", "updater:libutils_fs", ] if (build_selinux) { external_deps += [ "selinux_adapter:librestorecon" ] cflags = [ "-DWITH_SELINUX" ] } part_name = "sys_installer" subsystem_name = "updater" }