2023-12-04 21:02:21 +08:00
|
|
|
# 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.
|
|
|
|
|
2025-01-16 21:14:31 +08:00
|
|
|
import("//build/config/components/idl_tool/idl.gni")
|
2023-12-04 21:02:21 +08:00
|
|
|
import("//build/ohos.gni")
|
|
|
|
|
2025-01-16 21:14:31 +08:00
|
|
|
idl_gen_interface("i18n_service_interface") {
|
|
|
|
src_idl = rebase_path("II18nServiceAbility.idl")
|
|
|
|
log_domainid = "0xD001E00"
|
|
|
|
log_tag = "GLOBAL_I18N"
|
|
|
|
}
|
|
|
|
|
2023-12-04 21:02:21 +08:00
|
|
|
group("i18n_service_ability") {
|
|
|
|
deps = [
|
|
|
|
":i18n_sa",
|
|
|
|
":i18n_sa_client",
|
|
|
|
"./etc:i18n_sa_etc",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2025-01-16 21:14:31 +08:00
|
|
|
config("I18n_service_public_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"${target_gen_dir}",
|
|
|
|
"./include",
|
|
|
|
"../frameworks/intl/include",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2023-12-04 21:02:21 +08:00
|
|
|
ohos_shared_library("i18n_sa_client") {
|
2024-03-08 16:22:19 +08:00
|
|
|
sanitize = {
|
|
|
|
cfi = true
|
|
|
|
cfi_cross_dso = true
|
|
|
|
debug = false
|
|
|
|
}
|
2024-08-21 10:41:18 +08:00
|
|
|
branch_protector_ret = "pac_ret"
|
2024-03-08 16:22:19 +08:00
|
|
|
|
2023-12-04 21:02:21 +08:00
|
|
|
sources = [
|
|
|
|
"./src/i18n_service_ability_client.cpp",
|
|
|
|
"./src/i18n_service_ability_load_callback.cpp",
|
|
|
|
"./src/i18n_service_ability_load_manager.cpp",
|
|
|
|
]
|
2025-01-16 21:14:31 +08:00
|
|
|
output_values = get_target_outputs(":i18n_service_interface")
|
|
|
|
sources += filter_include(output_values, [ "*_proxy.cpp" ])
|
|
|
|
public_configs = [ ":I18n_service_public_config" ]
|
|
|
|
deps = [ ":i18n_service_interface" ]
|
2023-12-04 21:02:21 +08:00
|
|
|
external_deps = [
|
|
|
|
"c_utils:utils",
|
|
|
|
"hilog:libhilog",
|
|
|
|
"ipc:ipc_core",
|
|
|
|
"samgr:samgr_proxy",
|
|
|
|
]
|
2024-02-21 15:11:02 +08:00
|
|
|
innerapi_tags = [ "platformsdk" ]
|
2023-12-04 21:02:21 +08:00
|
|
|
part_name = "i18n"
|
|
|
|
subsystem_name = "global"
|
|
|
|
}
|
|
|
|
|
|
|
|
ohos_shared_library("i18n_sa") {
|
2024-03-08 16:22:19 +08:00
|
|
|
sanitize = {
|
|
|
|
cfi = true
|
|
|
|
cfi_cross_dso = true
|
|
|
|
debug = false
|
|
|
|
}
|
2024-08-21 10:41:18 +08:00
|
|
|
branch_protector_ret = "pac_ret"
|
2024-03-08 16:22:19 +08:00
|
|
|
|
2023-12-04 21:02:21 +08:00
|
|
|
sources = [
|
|
|
|
"./src/i18n_service_ability.cpp",
|
2024-08-16 17:46:23 +08:00
|
|
|
"./src/i18n_service_event.cpp",
|
2023-12-04 21:02:21 +08:00
|
|
|
]
|
2025-01-16 21:14:31 +08:00
|
|
|
output_values = get_target_outputs(":i18n_service_interface")
|
|
|
|
sources += filter_include(output_values, [ "*_stub.cpp" ])
|
2023-12-04 21:02:21 +08:00
|
|
|
include_dirs = [
|
2025-01-16 21:14:31 +08:00
|
|
|
"${target_gen_dir}",
|
2023-12-04 21:02:21 +08:00
|
|
|
"./include",
|
|
|
|
"../frameworks/intl/include",
|
|
|
|
"../interfaces/native/inner_api/preferred_language/include",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":i18n_sa_client",
|
2025-01-16 21:14:31 +08:00
|
|
|
":i18n_service_interface",
|
2023-12-04 21:02:21 +08:00
|
|
|
"../frameworks/intl:intl_util",
|
|
|
|
"../frameworks/intl:preferred_language",
|
|
|
|
]
|
2024-09-25 20:38:48 +08:00
|
|
|
if (target_platform == "pc") {
|
2024-09-26 10:34:39 +08:00
|
|
|
defines = [ "SUPPORT_MULTI_USER" ]
|
2024-09-25 20:38:48 +08:00
|
|
|
}
|
2023-12-04 21:02:21 +08:00
|
|
|
external_deps = [
|
2024-08-16 17:46:23 +08:00
|
|
|
"ability_base:want",
|
2023-12-04 21:02:21 +08:00
|
|
|
"ability_runtime:ability_manager",
|
|
|
|
"access_token:libaccesstoken_sdk",
|
|
|
|
"access_token:libtokenid_sdk",
|
|
|
|
"c_utils:utils",
|
|
|
|
"eventhandler:libeventhandler",
|
|
|
|
"hilog:libhilog",
|
|
|
|
"ipc:ipc_core",
|
2024-05-06 20:58:49 +08:00
|
|
|
"memmgr:memmgrclient",
|
2024-04-17 19:33:12 +08:00
|
|
|
"openssl:libcrypto_shared",
|
|
|
|
"openssl:libssl_shared",
|
2024-11-29 20:04:07 +08:00
|
|
|
"os_account:os_account_innerkits",
|
2024-04-17 19:33:12 +08:00
|
|
|
"preferences:native_preferences",
|
2023-12-04 21:02:21 +08:00
|
|
|
"safwk:system_ability_fwk",
|
|
|
|
"samgr:samgr_proxy",
|
|
|
|
]
|
|
|
|
part_name = "i18n"
|
|
|
|
subsystem_name = "global"
|
|
|
|
}
|