提交 f9270616 编写于 作者: W wangzhen 提交者: Gitee

修正用户程序框架中readme的描述错误

上级 86673b15
...@@ -161,58 +161,93 @@ The following table describes the source code directory structure of the applica ...@@ -161,58 +161,93 @@ The following table describes the source code directory structure of the applica
- Add the configuration for application framework compilation. The following section uses **hi3516dv300\_liteos\_a** as an example: - Add the configuration for application framework compilation. The following section uses **hi3516dv300\_liteos\_a** as an example:
- Add the configuration of **appexecfwk** and **aafwk** under the **subsystem\_list** field in the **build/lite/platform/hi3516dv300\_liteos\_a/platform.json** file. The sample code is as follows: - Add the configuration of **appexecfwk** and **aafwk** under the **subsystems** field in the **build/lite/platform/hi3516dv300\_liteos\_a/platform.json** file. The sample code is as follows:
``` ```
{ {
"name":"aafwk", "subsystem": "aafwk",
"project":"hmf/aafwk/services/abilitymgr_lite", "components": [
"path":"build/lite/config/subsystem/aafwk", {
"dir":"foundation/aafwk/services/abilitymgr_lite", "component": "ability",
"desc":"Ability Services Manager", "optional": "true",
"requirement":"yes", "dirs": [
"default":"yes", "foundation/aafwk"
"selected":"yes" ],
"targets": [
"//foundation/aafwk/frameworks/ability_lite:aafwk_abilitykit_lite",
"//foundation/aafwk/frameworks/ability_lite:aafwk_abilityMain_lite",
"//foundation/aafwk/frameworks/abilitymgr_lite:aafwk_abilityManager_lite",
"//foundation/aafwk/services/abilitymgr_lite:aafwk_services_lite"
],
"features": [
{"enable_ohos_appexecfwk_feature_ability": "true"}
],
"deps": {
"components": [
"hilog_a",
"bundle_mgr",
"system_ability_manager",
"distributed_schedule",
"graphic",
"utils",
"ipc"
],
"third_party": [
"cjson",
"bounds_checking_function"
]
}
}
]
}, },
{ {
"name":"appexecfwk", "subsystem": "appexecfwk",
"project": "hmf/appexecfwk/services/bundlemgr_lite", "components": [
"path": "build/lite/config/subsystem/appexecfwk", {
"dir": "foundation/appexecfwk/services/bundlemgr_lite", "component": "bundle_mgr",
"desc":"Bundle Services Manager", "optional": "true",
"requirement":"yes", "dirs": [
"default":"yes", "foundation/appexecfwk"
"selected":"yes" ],
"targets": [
"//foundation/appexecfwk/services/bundlemgr_lite:appexecfwk_services_lite",
"//foundation/appexecfwk/frameworks/bundle_lite:appexecfwk_kits_lite"
],
"features": [],
"deps": {
"components": [
"iam",
"app_verify",
"hilog_a",
"system_ability_manager",
"global_resource_manager",
"graphic",
"utils"
],
"third_party": [
"cjson",
"zlib"
]
}
}
]
}, },
``` ```
- Add the configuration of **appexecfwk** and **aafwk** under the **template\_subsystem\_list** field in the **build/lite/platform/hi3516dv300\_liteos\_a/template/ipcamera.json** file. The sample code is as follows:
```
"template_subsystem_list" : [
......
"distributedschedule",
"aafwk",
"appexecfwk",
"communication",
......
],
```
- Add the configuration of particular application framework components for compilation in **build/lite/config/subsystem/aafwk/BUILD.gn** and **/build/lite/config/subsystem/appexecfwk/BUILD.gn**. The sample code is as follows: - Add the configuration of particular application framework components for compilation in **build/lite/config/subsystem/aafwk/BUILD.gn** and **/build/lite/config/subsystem/appexecfwk/BUILD.gn**. The sample code is as follows:
``` ```
import("//build/lite/config/subsystem/lite_subsystem.gni") import("//build/lite/config/subsystem/lite_subsystem.gni")
lite_subsystem("aafwk") { lite_subsystem("aafwk") {
subsystem_components = [ subsystem_components = [
"//foundation/aafwk/frameworks/kits/ability_lite:aafwk_abilitykit_lite", "//foundation/aafwk/frameworks/ability_lite:aafwk_abilitykit_lite",
"//foundation/aafwk/frameworks/kits/ability_lite:aafwk_abilityMain_lite", "//foundation/aafwk/frameworks/abilitymgr_lite:aafwk_abilityManager_lite",
"//foundation/aafwk/services/abilitymgr_lite:aafwk_services_lite", "//foundation/aafwk/services/abilitymgr_lite:aafwk_services_lite",
"//foundation/aafwk/frameworks/kits/tools_lite:tools_lite",
"//foundation/aafwk/frameworks/kits/ability_lite/test:aafwk_testapp_lite",
] ]
} }
``` ```
``` ```
...@@ -230,9 +265,9 @@ The following table describes the source code directory structure of the applica ...@@ -230,9 +265,9 @@ The following table describes the source code directory structure of the applica
- After the preceding configurations are complete, run the following command to compile the entire system: - After the preceding configurations are complete, run the following command to compile the entire system:
``` ```
python build.py ipcamera_hi3516dv300 -b debug python build.py ipcamera_hi3516dv300 -b debug
``` ```
## Running the Two Services in the Application Framework<a name="section1048719468503"></a> ## Running the Two Services in the Application Framework<a name="section1048719468503"></a>
...@@ -240,16 +275,20 @@ python build.py ipcamera_hi3516dv300 -b debug ...@@ -240,16 +275,20 @@ python build.py ipcamera_hi3516dv300 -b debug
- **Ability Manager Service** and **Bundle Manager Service** are registered with **sa\_manager**. **sa\_manager** runs in the foundation process and sets up a thread runtime environment for the two services. For details about how to create and use **Ability Manager Service** and **Bundle Manager Service**, see [Service Framework](en-us_topic_0000001051589563.md). - **Ability Manager Service** and **Bundle Manager Service** are registered with **sa\_manager**. **sa\_manager** runs in the foundation process and sets up a thread runtime environment for the two services. For details about how to create and use **Ability Manager Service** and **Bundle Manager Service**, see [Service Framework](en-us_topic_0000001051589563.md).
- Add the configuration of **abilityms** and **bundlems** for compilation in **foundation/distributedschedule/services/safwk\_lite/BUILD.gn**. The sample code is as follows: - Add the configuration of **abilityms** and **bundlems** for compilation in **foundation/distributedschedule/services/safwk\_lite/BUILD.gn**. The sample code is as follows:
``` ```
deps = [
"//foundation/distributedschedule/services/samgr_lite/samgr_server:server", deps = [
"//base/dfx/lite/liteos-a/source/log:hilog_a_shared", "...",
"//foundation/aafwk/services/abilitymgr_lite:abilityms", ]
"//foundation/appexecfwk/services/bundlemgr_lite:bundlems", if (ohos_kernel_type == "liteos_a") {
"//base/security/services/iam_lite:pms_target", deps += [
"//foundation/distributedschedule/services/dtbschedmgr_lite:dtbschedmgr", "...",
] "//foundation/aafwk/services/abilitymgr_lite:abilityms",
``` "//foundation/appexecfwk/services/bundlemgr_lite:bundlems",
"...",
]
}
```
## Running an Ability Developed Based on AbilityKit<a name="section16249444135119"></a> ## Running an Ability Developed Based on AbilityKit<a name="section16249444135119"></a>
...@@ -352,9 +391,9 @@ deps = [ ...@@ -352,9 +391,9 @@ deps = [
- After the installation is complete, run the following command to run the demo: - After the installation is complete, run the following command to run the demo:
``` ```
./bin/aa start -p com.huawei.hiability -n MainAbility ./bin/aa start -p com.huawei.hiability -n MainAbility
``` ```
## Repositories Involved<a name="section93061357133720"></a> ## Repositories Involved<a name="section93061357133720"></a>
......
...@@ -156,58 +156,95 @@ ...@@ -156,58 +156,95 @@
- 添加对用户程序框架子系统的编译,以hi3516dv300\_liteos\_a为例 - 添加对用户程序框架子系统的编译,以hi3516dv300\_liteos\_a为例
- 在build/lite/platform/hi3516dv300\_liteos\_a/platform.json中的subsystem\_list字段下面添加appexecfwk和aafwk,代码如下: - 在build/lite/platform/hi3516dv300\_liteos\_a/platform.json中的subsystems字段下面添加appexecfwk和aafwk,代码已添加如下:
``` ```
{ {
"name":"aafwk", "subsystem": "aafwk",
"project":"hmf/aafwk/services/abilitymgr_lite", "components": [
"path":"build/lite/config/subsystem/aafwk", {
"dir":"foundation/aafwk/services/abilitymgr_lite", "component": "ability",
"desc":"Ability Services Manager", "optional": "true",
"requirement":"yes", "dirs": [
"default":"yes", "foundation/aafwk"
"selected":"yes" ],
"targets": [
"//foundation/aafwk/frameworks/ability_lite:aafwk_abilitykit_lite",
"//foundation/aafwk/frameworks/ability_lite:aafwk_abilityMain_lite",
"//foundation/aafwk/frameworks/abilitymgr_lite:aafwk_abilityManager_lite",
"//foundation/aafwk/services/abilitymgr_lite:aafwk_services_lite"
],
"features": [
{"enable_ohos_appexecfwk_feature_ability": "true"}
],
"deps": {
"components": [
"hilog_a",
"bundle_mgr",
"system_ability_manager",
"distributed_schedule",
"graphic",
"utils",
"ipc"
],
"third_party": [
"cjson",
"bounds_checking_function"
]
}
}
]
}, },
{ {
"name":"appexecfwk", "subsystem": "appexecfwk",
"project": "hmf/appexecfwk/services/bundlemgr_lite", "components": [
"path": "build/lite/config/subsystem/appexecfwk", {
"dir": "foundation/appexecfwk/services/bundlemgr_lite", "component": "bundle_mgr",
"desc":"Bundle Services Manager", "optional": "true",
"requirement":"yes", "dirs": [
"default":"yes", "foundation/appexecfwk"
"selected":"yes" ],
"targets": [
"//foundation/appexecfwk/services/bundlemgr_lite:appexecfwk_services_lite",
"//foundation/appexecfwk/frameworks/bundle_lite:appexecfwk_kits_lite"
],
"features": [],
"deps": {
"components": [
"iam",
"app_verify",
"hilog_a",
"system_ability_manager",
"global_resource_manager",
"graphic",
"utils"
],
"third_party": [
"cjson",
"zlib"
]
}
}
]
}, },
```
- 在build/lite/platform/hi3516dv300\_liteos\_a/template/ipcamera.json的“template\_subsystem\_list”字段下面添加"appexecfwk"和"aafwk",代码如下:
```
"template_subsystem_list" : [
......
"distributedschedule",
"aafwk",
"appexecfwk",
"communication",
......
],
``` ```
- 在build/lite/config/subsystem/aafwk/BUILD.gn和/build/lite/config/subsystem/appexecfwk/BUILD.gn中添加对用户程序框架中具体组件的编译,如下: - 在build/lite/config/subsystem/aafwk/BUILD.gn和/build/lite/config/subsystem/appexecfwk/BUILD.gn中添加对用户程序框架中具体组件的编译,代码已添加如下:
``` ```
import("//build/lite/config/subsystem/lite_subsystem.gni") import("//build/lite/config/subsystem/lite_subsystem.gni")
lite_subsystem("aafwk") { lite_subsystem("aafwk") {
subsystem_components = [ subsystem_components = [
"//foundation/aafwk/frameworks/kits/ability_lite:aafwk_abilitykit_lite", "//foundation/aafwk/frameworks/ability_lite:aafwk_abilitykit_lite",
"//foundation/aafwk/frameworks/kits/ability_lite:aafwk_abilityMain_lite", "//foundation/aafwk/frameworks/abilitymgr_lite:aafwk_abilityManager_lite",
"//foundation/aafwk/services/abilitymgr_lite:aafwk_services_lite", "//foundation/aafwk/services/abilitymgr_lite:aafwk_services_lite",
"//foundation/aafwk/frameworks/kits/tools_lite:tools_lite",
"//foundation/aafwk/frameworks/kits/ability_lite/test:aafwk_testapp_lite",
] ]
} }
``` ```
``` ```
...@@ -225,26 +262,31 @@ ...@@ -225,26 +262,31 @@
- 添加完上述的配置后,执行如下命令编译整个系统: - 添加完上述的配置后,执行如下命令编译整个系统:
``` ```
python build.py ipcamera_hi3516dv300 -b debug python build.py ipcamera_hi3516dv300 -b debug
``` ```
## 运行用户程序框架子系统的两个服务<a name="section1048719468503"></a> ## 运行用户程序框架子系统的两个服务<a name="section1048719468503"></a>
- 用户程序框架有两个系统服务ability管理服务(abilityms)和(bundlems),两系统服务运行于foundation进程中。 - 用户程序框架有两个系统服务ability管理服务(abilityms)和(bundlems),两系统服务运行于foundation进程中。
- abilityms和bundlems注册到sa\_manager中,sa\_manager运行于foundation进程中,sa\_manager为abilityms和bundlems创建线程运行环境。具体创建abilityms、bundlems服务的方式以及使用该服务的方式,可参考[系统服务框架子系统](zh-cn_topic_0000001051589563.md) - abilityms和bundlems注册到sa\_manager中,sa\_manager运行于foundation进程中,sa\_manager为abilityms和bundlems创建线程运行环境。具体创建abilityms、bundlems服务的方式以及使用该服务的方式,可参考[系统服务框架子系统](zh-cn_topic_0000001051589563.md)
- 在foundation/distributedschedule/services/safwk\_lite/BUILD.gn中添加对abilityms和bundlems,如下: - 在foundation/distributedschedule/services/safwk\_lite/BUILD.gn中添加对abilityms和bundlems,实际代码已添加如下:
``` ```
deps = [
"//foundation/distributedschedule/services/samgr_lite/samgr_server:server", deps = [
"//base/dfx/lite/liteos-a/source/log:hilog_a_shared", "...",
"//foundation/aafwk/services/abilitymgr_lite:abilityms", ]
"//foundation/appexecfwk/services/bundlemgr_lite:bundlems", if (ohos_kernel_type == "liteos_a") {
"//base/security/services/iam_lite:pms_target", deps += [
"//foundation/distributedschedule/services/dtbschedmgr_lite:dtbschedmgr", "...",
] "//foundation/aafwk/services/abilitymgr_lite:abilityms",
``` "//foundation/appexecfwk/services/bundlemgr_lite:bundlems",
"...",
]
}
```
## 运行基于AbilityKit开发的Ability<a name="section16249444135119"></a> ## 运行基于AbilityKit开发的Ability<a name="section16249444135119"></a>
...@@ -347,9 +389,9 @@ deps = [ ...@@ -347,9 +389,9 @@ deps = [
- 安装完成后,通过如下命令,运行Demo - 安装完成后,通过如下命令,运行Demo
``` ```
./bin/aa start -p com.huawei.hiability -n MainAbility ./bin/aa start -p com.huawei.hiability -n MainAbility
``` ```
## 涉及仓<a name="section93061357133720"></a> ## 涉及仓<a name="section93061357133720"></a>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册