1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-18 17:50:39 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee
Files
react-native-update/Example/harmony_use_pushy/README.md
波仔糕 822602add9 react-native-pushy适配harmony (#461)
* init

* update

* udpate

* update

* update

* update

* add pushy build time logic
2024-12-26 12:11:52 +08:00

34 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 运行harmony_use_pushy项目步骤
### 1.将项目克隆到本地后在项目根目录创建libs文件夹。
### 2.然后将[`rnoh`](https://github.com/bozaigao/rnoh)克隆到libs文件夹中。
说明rnoh项目基于react-native 0.72.5版本适配如果使用最新的RN版本可能会报错项目适配RN新版本请关注[`gitee仓库`](https://gitee.com/openharmony-sig/ohos_react_native/tree/0.72.5-ohos-5.0-release/tester/harmony/react_native_openharmony/src/main)
### 3.进入rnoh项目执行下面命令对rnoh项目依赖的C++库进行初始化;
```
git submodule update --init --recursive
```
### 4. 确保在react-native-update根目录已经执行过yarn submodule命令。
说明这个命令会在harmony/src/main/cpp目录生成HDiffPatch和lzma的C++模块依赖。
### 5. 在项目根目录执行下面命令安装第三方依赖。
```
yarn install
```
### 6. 在项目根目录执行下面命令生成bundle包文件。
```
yarn build
```
说明这个命令会在harmony/entry/src/main/resources/rawfile目录生成Hbundle.harmony.js和assets文件同时会基于该内容在.pushy/output目录生成ppk包。
**注意⚠️**在使用pushy bundle --platform harmony命令进行打包的默认bundle包名是Hbundle.harmony.js不要随意修改包名因为diff是匹配该包名进行生成的。
### 7. 使用DevEco Studio IDE打开harmony目录然后执行sync运行项目
![image](./sync.png)
### 8 运行效果图
![image](./demo.png)