188edb362Sopenharmony_ci# Copyright (c) 2021-2023 Huawei Device Co., Ltd. 288edb362Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 388edb362Sopenharmony_ci# you may not use this file except in compliance with the License. 488edb362Sopenharmony_ci# You may obtain a copy of the License at 588edb362Sopenharmony_ci# 688edb362Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 788edb362Sopenharmony_ci# 888edb362Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 988edb362Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1088edb362Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1188edb362Sopenharmony_ci# See the License for the specific language governing permissions and 1288edb362Sopenharmony_ci# limitations under the License. 1388edb362Sopenharmony_ci 1488edb362Sopenharmony_ciimport("//base/update/sys_installer/sys_installer_default_cfg.gni") 1588edb362Sopenharmony_ciimport("//build/ohos.gni") 1688edb362Sopenharmony_ci 1788edb362Sopenharmony_cisys_installer_path = rebase_path("${sys_installer_absolutely_path}", ".") 1888edb362Sopenharmony_ci 1988edb362Sopenharmony_ciconfig("libsysinstallerkits_exported_headers") { 2088edb362Sopenharmony_ci visibility = [ ":*" ] 2188edb362Sopenharmony_ci include_dirs = [ 2288edb362Sopenharmony_ci "${sys_installer_path}/common/include", 2388edb362Sopenharmony_ci "${sys_installer_path}/include", 2488edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits", 2588edb362Sopenharmony_ci "${sys_installer_path}/interfaces/inner_api/include", 2688edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/include", 2788edb362Sopenharmony_ci ] 2888edb362Sopenharmony_ci} 2988edb362Sopenharmony_ci 3088edb362Sopenharmony_ciohos_shared_library("libsysinstaller_shared") { 3188edb362Sopenharmony_ci defines = [ "SYS_INSTALLER_KITS" ] 3288edb362Sopenharmony_ci sources = [ 3388edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_callback.cpp", 3488edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_kits_impl.cpp", 3588edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_load_callback.cpp", 3688edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_proxy.cpp", 3788edb362Sopenharmony_ci ] 3888edb362Sopenharmony_ci 3988edb362Sopenharmony_ci include_dirs = [ 4088edb362Sopenharmony_ci "${sys_installer_path}/common/include", 4188edb362Sopenharmony_ci "${sys_installer_path}/include", 4288edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits", 4388edb362Sopenharmony_ci "${sys_installer_path}/interfaces/inner_api/include", 4488edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/include", 4588edb362Sopenharmony_ci ] 4688edb362Sopenharmony_ci 4788edb362Sopenharmony_ci public_configs = [ ":libsysinstallerkits_exported_headers" ] 4888edb362Sopenharmony_ci 4988edb362Sopenharmony_ci deps = [] 5088edb362Sopenharmony_ci 5188edb362Sopenharmony_ci external_deps = [ 5288edb362Sopenharmony_ci "bounds_checking_function:libsec_shared", 5388edb362Sopenharmony_ci "c_utils:utils", 5488edb362Sopenharmony_ci "hilog:libhilog", 5588edb362Sopenharmony_ci "init:libbegetutil", 5688edb362Sopenharmony_ci "ipc:ipc_core", 5788edb362Sopenharmony_ci "lz4:liblz4_static", 5888edb362Sopenharmony_ci "safwk:system_ability_fwk", 5988edb362Sopenharmony_ci "samgr:samgr_proxy", 6088edb362Sopenharmony_ci "updater:libupdaterlog", 6188edb362Sopenharmony_ci "updater:libutils_fs", 6288edb362Sopenharmony_ci "zlib:shared_libz", 6388edb362Sopenharmony_ci ] 6488edb362Sopenharmony_ci 6588edb362Sopenharmony_ci innerapi_tags = [ 6688edb362Sopenharmony_ci "platformsdk", 6788edb362Sopenharmony_ci "sasdk", 6888edb362Sopenharmony_ci ] 6988edb362Sopenharmony_ci 7088edb362Sopenharmony_ci part_name = "sys_installer" 7188edb362Sopenharmony_ci subsystem_name = "updater" 7288edb362Sopenharmony_ci} 7388edb362Sopenharmony_ci 7488edb362Sopenharmony_ciohos_static_library("libsysinstallerkits") { 7588edb362Sopenharmony_ci defines = [ "SYS_INSTALLER_KITS" ] 7688edb362Sopenharmony_ci sources = [ 7788edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_callback.cpp", 7888edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_kits_impl.cpp", 7988edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_load_callback.cpp", 8088edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_proxy.cpp", 8188edb362Sopenharmony_ci ] 8288edb362Sopenharmony_ci 8388edb362Sopenharmony_ci include_dirs = [ 8488edb362Sopenharmony_ci "${sys_installer_path}/common/include", 8588edb362Sopenharmony_ci "${sys_installer_path}/include", 8688edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits", 8788edb362Sopenharmony_ci "${sys_installer_path}/interfaces/inner_api/include", 8888edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/include", 8988edb362Sopenharmony_ci ] 9088edb362Sopenharmony_ci 9188edb362Sopenharmony_ci public_configs = [ ":libsysinstallerkits_exported_headers" ] 9288edb362Sopenharmony_ci 9388edb362Sopenharmony_ci deps = [] 9488edb362Sopenharmony_ci 9588edb362Sopenharmony_ci external_deps = [ 9688edb362Sopenharmony_ci "bounds_checking_function:libsec_static", 9788edb362Sopenharmony_ci "c_utils:utils", 9888edb362Sopenharmony_ci "hilog:libhilog", 9988edb362Sopenharmony_ci "init:libbegetutil", 10088edb362Sopenharmony_ci "ipc:ipc_core", 10188edb362Sopenharmony_ci "safwk:system_ability_fwk", 10288edb362Sopenharmony_ci "samgr:samgr_proxy", 10388edb362Sopenharmony_ci "updater:libupdaterlog", 10488edb362Sopenharmony_ci "updater:libutils", 10588edb362Sopenharmony_ci ] 10688edb362Sopenharmony_ci 10788edb362Sopenharmony_ci part_name = "sys_installer" 10888edb362Sopenharmony_ci subsystem_name = "updater" 10988edb362Sopenharmony_ci} 11088edb362Sopenharmony_ci 11188edb362Sopenharmony_ciohos_executable("sys_installer_client") { 11288edb362Sopenharmony_ci sources = [ "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_client.cpp" ] 11388edb362Sopenharmony_ci 11488edb362Sopenharmony_ci include_dirs = [ 11588edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/include", 11688edb362Sopenharmony_ci "${sys_installer_path}/interfaces/inner_api/include", 11788edb362Sopenharmony_ci ] 11888edb362Sopenharmony_ci 11988edb362Sopenharmony_ci deps = [ 12088edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client:libsysinstallerkits", 12188edb362Sopenharmony_ci ] 12288edb362Sopenharmony_ci external_deps = [ 12388edb362Sopenharmony_ci "bounds_checking_function:libsec_static", 12488edb362Sopenharmony_ci "c_utils:utils", 12588edb362Sopenharmony_ci "hilog:libhilog", 12688edb362Sopenharmony_ci "init:libbegetutil", 12788edb362Sopenharmony_ci "ipc:ipc_core", 12888edb362Sopenharmony_ci "safwk:system_ability_fwk", 12988edb362Sopenharmony_ci "samgr:samgr_proxy", 13088edb362Sopenharmony_ci ] 13188edb362Sopenharmony_ci install_enable = true 13288edb362Sopenharmony_ci part_name = "sys_installer" 13388edb362Sopenharmony_ci subsystem_name = "updater" 13488edb362Sopenharmony_ci} 13588edb362Sopenharmony_ci 13688edb362Sopenharmony_cimodule_update_gen("module_update") { 13788edb362Sopenharmony_ci include_dirs = [ "./include" ] 13888edb362Sopenharmony_ci 13988edb362Sopenharmony_ci deps = [ "${sys_installer_path}/interfaces/innerkits/ipc_client:libmodule_update_shared" ] 14088edb362Sopenharmony_ci 14188edb362Sopenharmony_ci public_configs = [ ":exported_header_files" ] 14288edb362Sopenharmony_ci 14388edb362Sopenharmony_ci if (defined(module_update_custom_external_deps)) { 14488edb362Sopenharmony_ci external_deps = module_update_custom_external_deps 14588edb362Sopenharmony_ci } 14688edb362Sopenharmony_ci 14788edb362Sopenharmony_ci part_name = "sys_installer" 14888edb362Sopenharmony_ci subsystem_name = "updater" 14988edb362Sopenharmony_ci} 15088edb362Sopenharmony_ci 15188edb362Sopenharmony_ciconfig("exported_header_files") { 15288edb362Sopenharmony_ci visibility = [ ":*" ] 15388edb362Sopenharmony_ci include_dirs = [ 15488edb362Sopenharmony_ci "${sys_installer_path}/services/module_update/util/include", 15588edb362Sopenharmony_ci "${sys_installer_path}/interfaces/inner_api/include", 15688edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/include", 15788edb362Sopenharmony_ci ] 15888edb362Sopenharmony_ci} 15988edb362Sopenharmony_ci 16088edb362Sopenharmony_ciohos_executable("module_update_client") { 16188edb362Sopenharmony_ci sources = [ "${sys_installer_path}/services/module_update/service/main.cpp" ] 16288edb362Sopenharmony_ci 16388edb362Sopenharmony_ci include_dirs = [ "./include" ] 16488edb362Sopenharmony_ci deps = [ "${sys_installer_path}/interfaces/innerkits/ipc_client:libmodule_update_shared" ] 16588edb362Sopenharmony_ci public_configs = [ ":exported_header_files" ] 16688edb362Sopenharmony_ci 16788edb362Sopenharmony_ci external_deps = [ 16888edb362Sopenharmony_ci "c_utils:utils", 16988edb362Sopenharmony_ci "ipc:ipc_core", 17088edb362Sopenharmony_ci "samgr:samgr_proxy", 17188edb362Sopenharmony_ci "updater:libupdaterlog", 17288edb362Sopenharmony_ci ] 17388edb362Sopenharmony_ci install_enable = false 17488edb362Sopenharmony_ci part_name = "sys_installer" 17588edb362Sopenharmony_ci subsystem_name = "updater" 17688edb362Sopenharmony_ci} 17788edb362Sopenharmony_ci 17888edb362Sopenharmony_ciohos_static_library("module_update_client_static") { 17988edb362Sopenharmony_ci sources = [ 18088edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/module_update_kits_impl.cpp", 18188edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/module_update_load_callback.cpp", 18288edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/module_update_proxy.cpp", 18388edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_callback.cpp", 18488edb362Sopenharmony_ci "${sys_installer_path}/services/module_update/util/src/module_ipc_helper.cpp", 18588edb362Sopenharmony_ci ] 18688edb362Sopenharmony_ci 18788edb362Sopenharmony_ci include_dirs = [ "${sys_installer_path}/common/include" ] 18888edb362Sopenharmony_ci 18988edb362Sopenharmony_ci public_configs = [ ":exported_header_files" ] 19088edb362Sopenharmony_ci 19188edb362Sopenharmony_ci public_external_deps = [ "zlib:shared_libz" ] 19288edb362Sopenharmony_ci 19388edb362Sopenharmony_ci external_deps = [ 19488edb362Sopenharmony_ci "bounds_checking_function:libsec_static", 19588edb362Sopenharmony_ci "c_utils:utils", 19688edb362Sopenharmony_ci "init:libbegetutil", 19788edb362Sopenharmony_ci "ipc:ipc_core", 19888edb362Sopenharmony_ci "samgr:samgr_proxy", 19988edb362Sopenharmony_ci "updater:libupdaterlog", 20088edb362Sopenharmony_ci "zlib:shared_libz", 20188edb362Sopenharmony_ci ] 20288edb362Sopenharmony_ci 20388edb362Sopenharmony_ci part_name = "sys_installer" 20488edb362Sopenharmony_ci subsystem_name = "updater" 20588edb362Sopenharmony_ci} 20688edb362Sopenharmony_ci 20788edb362Sopenharmony_ciohos_shared_library("libmodule_update_shared") { 20888edb362Sopenharmony_ci sources = [ 20988edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/module_update_kits_impl.cpp", 21088edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/module_update_load_callback.cpp", 21188edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/module_update_proxy.cpp", 21288edb362Sopenharmony_ci "${sys_installer_path}/interfaces/innerkits/ipc_client/src/sys_installer_callback.cpp", 21388edb362Sopenharmony_ci "${sys_installer_path}/services/module_update/util/src/module_ipc_helper.cpp", 21488edb362Sopenharmony_ci ] 21588edb362Sopenharmony_ci 21688edb362Sopenharmony_ci include_dirs = [ "${sys_installer_path}/common/include" ] 21788edb362Sopenharmony_ci 21888edb362Sopenharmony_ci public_configs = [ ":exported_header_files" ] 21988edb362Sopenharmony_ci 22088edb362Sopenharmony_ci public_external_deps = [ "zlib:shared_libz" ] 22188edb362Sopenharmony_ci 22288edb362Sopenharmony_ci external_deps = [ 22388edb362Sopenharmony_ci "bounds_checking_function:libsec_static", 22488edb362Sopenharmony_ci "c_utils:utils", 22588edb362Sopenharmony_ci "init:libbegetutil", 22688edb362Sopenharmony_ci "ipc:ipc_core", 22788edb362Sopenharmony_ci "samgr:samgr_proxy", 22888edb362Sopenharmony_ci "updater:libupdaterlog", 22988edb362Sopenharmony_ci "zlib:shared_libz", 23088edb362Sopenharmony_ci ] 23188edb362Sopenharmony_ci 23288edb362Sopenharmony_ci innerapi_tags = [ 23388edb362Sopenharmony_ci "platformsdk", 23488edb362Sopenharmony_ci "sasdk", 23588edb362Sopenharmony_ci ] 23688edb362Sopenharmony_ci 23788edb362Sopenharmony_ci part_name = "sys_installer" 23888edb362Sopenharmony_ci subsystem_name = "updater" 23988edb362Sopenharmony_ci} 240