deploy i18n.dat

Signed-off-by: sunyaozu <sunyaozu@huawei.com>
This commit is contained in:
sunyaozu
2022-11-11 12:15:46 +08:00
parent 1aacbd43be
commit 8c858744c2
5 changed files with 61 additions and 1 deletions
+12 -1
View File
@@ -51,7 +51,9 @@
},
"build": {
"sub_component": [
"//base/global/i18n_lite/frameworks/i18n:global_i18n"
"//base/global/i18n_lite/frameworks/i18n:global_i18n",
"//base/global/i18n_lite/interfaces/kits:global_i18n_dat",
"//base/global/i18n_lite/interfaces/kits/js/builtin:nativeapi_locale_simulator"
],
"inner_kits": [
{
@@ -67,6 +69,15 @@
],
"header_base": "//base/global/i18n_lite/interfaces/kits/i18n/zone/include"
}
},
{
"name": "//base/global/i18n_lite/interfaces/kits/js/builtin:nativeapi_locale_simulator",
"header": {
"header_files": [
"locale_module.h"
],
"header_base": "//base/global/i18n_lite/interfaces/kits/js/builtin/include"
}
}
],
"test": [
+7
View File
@@ -11,6 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//base/global/i18n_lite/i18n_lite.gni")
if (defined(ohos_lite)) {
import("//build/lite/config/component/lite_component.gni")
} else {
@@ -57,6 +58,12 @@ if (defined(ohos_lite)) {
":global_dat",
"//third_party/bounds_checking_function:libsec_static",
]
if (i18n_lite_support_i18n_product) {
include_dirs +=
[ "//vendor/huawei/domains/wearable/platform/utils/memory" ]
defines = [ "I18N_PRODUCT" ]
deps += [ "//vendor/huawei/domains/wearable/platform/utils:utils_wear" ]
}
}
} else {
shared_library("global_i18n") {
@@ -40,6 +40,7 @@ inline void I18nFree(void *a)
}
#else // I18N_PRODUCT
#include "stddef.h"
#include "stdint.h"
#include "ohos_mem_pool.h"
+16
View File
@@ -0,0 +1,16 @@
# Copyright (c) 2022 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.
declare_args() {
i18n_lite_support_i18n_product = false
}
+25
View File
@@ -0,0 +1,25 @@
# Copyright (c) 2022 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("//build/ohos.gni")
ohos_prebuilt_etc("i18n_dat") {
source = "//base/global/i18n_lite/frameworks/i18n/i18n.dat"
module_install_dir = "system/i18n"
part_name = "i18n_lite"
subsystem_name = "global"
}
group("global_i18n_dat") {
deps = [ ":i18n_dat" ]
}