mirror of
https://gitee.com/openharmony/applications_photos
synced 2025-02-03 05:42:46 +00:00
Signed-off-by: houfei <1069760703@qq.com>
Changes to be committed:
This commit is contained in:
parent
7e803d4fcc
commit
26d2cd14bf
37
README_zh.md
37
README_zh.md
@ -179,8 +179,8 @@
|
||||
## 5. 签名打包
|
||||
### 签名
|
||||
#### 签名文件的获取
|
||||
1. 使用 OpenHarmony 标准版的 signcenter_tool 目录里的.cer和.p12文件配置本地签名。
|
||||
2. 标准版下载地址:https://gitee.com/openharmony/signcenter_tool?_from=gitee_search。
|
||||
1. 拷贝 OpenHarmony 标准版的 prebuilts\signcenter 目录到操作目录。
|
||||
2. 标准版的签名文件下载路径:https://gitee.com/openharmony/signcenter_tool?_from=gitee_search。
|
||||
3. 拷贝图库工程的 signature\photos.p7b 到该目录下。
|
||||
|
||||
|
||||
@ -201,16 +201,15 @@
|
||||
使用的SDK 3.2.2.5版本编译master仓代码,在/entry/package.json里手动触发npm install
|
||||
![](D:\workspace\readme\applications_photos\figures\npm.png)
|
||||
|
||||
|
||||
### 打包
|
||||
DevEco Studio 支持 debug 与 release 两种打包类型。可以在 OhosBuild Variants 窗口中进行切换。
|
||||
|
||||
![](./figures/ds_ohosbuild_variants.png)
|
||||
![](./figures/ds_ohosbuild_variants.png)
|
||||
|
||||
#### release打包
|
||||
1. 代码准备完成后,在 OhosBuild Variants 窗口的 Selected Variant 中选择 release
|
||||
1. 代码准备完成后,在 OhosBuild Variants 窗口的 Selected Variant 中选择 release
|
||||
|
||||
![](./figures/ds_ohosbuild_variants_release.png)
|
||||
![](./figures/ds_ohosbuild_variants_release.png)
|
||||
|
||||
2. 选择Build → Build Haps(s)/APP(s) → Build Hap(s)
|
||||
|
||||
@ -245,7 +244,7 @@ DevEco Studio 支持 debug 与 release 两种打包类型。可以在 OhosBuild
|
||||
|
||||
![](./figures/cmd3.png)
|
||||
|
||||
第一次安装,需要先卸载系统自带图库
|
||||
首次安装需要卸载系统自带的图库
|
||||
|
||||
```html
|
||||
hdc shell mount -o remount,rw /
|
||||
@ -254,22 +253,25 @@ hdc shell rm -rf /system/app/com.ohos.photos/Photos.hap
|
||||
|
||||
hdc shell reboot
|
||||
```
|
||||
安装包使用如下命令
|
||||
|
||||
hdc install 签过名的hap包路径
|
||||
安装签过名的hap包
|
||||
|
||||
安装完成后长按图库图标添加到工作区
|
||||
```html
|
||||
hdc install 包路径
|
||||
```
|
||||
|
||||
长按图库图标添加到工作区
|
||||
|
||||
### 应用调试
|
||||
#### log打印
|
||||
- 在程序中添加 log
|
||||
```JS
|
||||
const TAG = "MoudleXXX"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
entry() {
|
||||
let input = 'hello'
|
||||
logInfo(TAG, `onPhotoChanged start ${input}`);
|
||||
}
|
||||
```
|
||||
上述log打印为:
|
||||
|
||||
@ -284,7 +286,7 @@ Photos_MoudleXXX:entry: hello
|
||||
- log获取
|
||||
|
||||
|
||||
将log输出至文件
|
||||
将log输出至文件
|
||||
```
|
||||
hdc shell hilog > 输出文件名称
|
||||
```
|
||||
@ -328,9 +330,10 @@ hilog | grep Album
|
||||
3. 修改代码。
|
||||
|
||||
> 将代码引入工程,以及编译工程等相关内容请参见 **3. 代码使用** 部分的相关内容。
|
||||
4. 提交代码到 fork 仓库。
|
||||
4. 提交代码到 fork 仓库。
|
||||
> 修改后的代码,首先执行 `git add` 命令,然后执行 `git commit` 命令与 `git push` 命令,将代码 push 到我们自己的 fork 仓中。
|
||||
> 关于代码提交的这部分内容涉及 git 的使用,可以参照 [git官网](https://git-scm.com/) 的内容,在此不再赘述。
|
||||
> 注意事项:需要使用commit -s,暴露提交者信息,否则门禁不通过
|
||||
|
||||
### 发起 Pull Request (PR)
|
||||
在将代码提交到 fork 仓之后,我们可以通过发起 Pull Request(PR)的方式来为 OpenHarmony 的相关项目贡献代码。
|
||||
|
Loading…
x
Reference in New Issue
Block a user