提交 00f0e6d8 编写于 作者: H handyohos 提交者: 李明康

fixed 2a9d7e54 from https://gitee.com/xiao-ming-k/startup_init_lite/pulls/1734

Bugfix: update startup JS API

1) change systemParameterV9 to systemParameterEnhance
2) add deprecated for @ohos.deviceInfo.hardwareProfile
Signed-off-by: Nhandyohos <zhangxiaotian@huawei.com>

#I6C8I5
上级 b7f866df
......@@ -24,7 +24,7 @@ group("kitsgroup") {
deps += [
"jskits:deviceinfo",
"jskits:systemparameter",
"jskits:systemparameterv9",
"jskits:systemparameterenhance",
]
}
}
......
......@@ -50,19 +50,20 @@ ohos_shared_library("systemparameter") {
part_name = "init"
}
ohos_shared_library("systemparameterv9") {
ohos_shared_library("systemparameterenhance") {
include_dirs = [
"src",
"//third_party/libuv/include",
]
sources = [ "src_v9/native_parameters_js.cpp" ]
sources = [ "src_enhance/native_parameters_js.cpp" ]
deps = [
"//base/startup/init/interfaces/innerkits:libbeget_proxy",
"//base/startup/init/interfaces/innerkits:libbegetutil",
]
symlink_target_name = [ "libsystemparameterv9.z.so" ]
external_deps = [ "napi:ace_napi" ]
relative_install_dir = "module"
subsystem_name = "startup"
......
......@@ -382,7 +382,7 @@ static napi_value Init(napi_env env, napi_value exports)
/*
* Attribute definition
*/
napi_property_descriptor desc[] = {
const napi_property_descriptor desc[] = {
DECLARE_NAPI_FUNCTION("set", Set),
DECLARE_NAPI_FUNCTION("setSync", SetSync),
DECLARE_NAPI_FUNCTION("get", Get),
......@@ -404,7 +404,7 @@ EXTERN_C_END
/*
* Module definition
*/
static napi_module _module = {
static napi_module _module_old = {
.nm_version = 1,
.nm_flags = 0,
.nm_filename = NULL,
......@@ -414,10 +414,21 @@ static napi_module _module = {
.reserved = { 0 }
};
static napi_module _module = {
.nm_version = 1,
.nm_flags = 0,
.nm_filename = NULL,
.nm_register_func = Init,
.nm_modname = "systemParameterEnhance",
.nm_priv = ((void *)0),
.reserved = { 0 }
};
/*
* Module registration function
*/
extern "C" __attribute__((constructor)) void RegisterModule(void)
{
napi_module_register(&_module);
napi_module_register(&_module_old);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册