@electron-ohos/electron-builder 26.8.2 → 26.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,11 +3,8 @@
|
|
|
3
3
|
### 一、前置条件
|
|
4
4
|
|
|
5
5
|
1. 安装deveco或下载独立打包工具([Command Line Tools工具下载](https://developer.huawei.com/consumer/cn/download/command-line-tools-for-hmos))
|
|
6
|
-
|
|
7
6
|
2. 安装java,并在系统变量中,配置java的路径。
|
|
8
7
|
|
|
9
|
-
3. 在electron工程的./node_modules目录下,创建electron-ohos/template目录,并将编译产物(通过华为账号[下载](https://devcloud.cn-north-4.huaweicloud.com/codehub/project/b19f5ea8ffd4492ea8c06ca2ebf3f858/codehub/2821214/home?ref=main))中的鸿蒙工程放在里面,全路径为:electron工程/node_modules/electron-ohos/template/ohos_hap。如下:
|
|
10
|
-
|
|
11
8
|
### 二、安装鸿蒙版electron-builder
|
|
12
9
|
|
|
13
10
|
在electron工程根目录中,执行如下命令:
|
|
@@ -37,9 +34,10 @@ npm install @electron-ohos/electron-builder --save-dev
|
|
|
37
34
|
"target": [
|
|
38
35
|
"hap"
|
|
39
36
|
],
|
|
40
|
-
"hvigorwPath": "D
|
|
41
|
-
"ohpmPath": "D
|
|
42
|
-
"sdkPath": "D
|
|
37
|
+
"hvigorwPath": "D:/software/DevEco/deveco-studio-5.1.1.406SP1.win/deveco-studio/tools/hvigor/bin",
|
|
38
|
+
"ohpmPath": "D:/software/DevEco/deveco-studio-5.1.1.406SP1.win/deveco-studio/tools/ohpm/bin",
|
|
39
|
+
"sdkPath": "D:/software/DevEco/deveco-studio-5.1.1.406SP1.win/deveco-studio/sdk",
|
|
40
|
+
"ohosHapPath": "D:/project/electron/v34.5.4-20250918.1-release/libelectron_132/libelectron/ohos_hap"
|
|
43
41
|
}
|
|
44
42
|
```
|
|
45
43
|
|
|
@@ -51,6 +49,8 @@ ohpmPath:ohpm工具路径(可以在deveco的安装目录或打包工具目
|
|
|
51
49
|
|
|
52
50
|
sdkPath:sdk路径(可以在deveco的安装目录或打包工具目录中找到)
|
|
53
51
|
|
|
52
|
+
ohosHapPath:进行编译需要的鸿蒙工程路径,可以通过华为账号在[这里](https://devcloud.cn-north-4.huaweicloud.com/codehub/project/b19f5ea8ffd4492ea8c06ca2ebf3f858/codehub/2821214/home?ref=main)进行下载,鸿蒙工程可以在编译产物解压缩后找到。
|
|
53
|
+
|
|
54
54
|
#### 3.3 添加签名证书配置(签名包必须)
|
|
55
55
|
|
|
56
56
|
在ohos节点添加:
|
|
@@ -78,7 +78,7 @@ storeFile: 本地秘钥地址
|
|
|
78
78
|
|
|
79
79
|
storePassword: 本地秘钥密码。(既可以在配置文件中配置,也支持在环境变量设置OH_STORE_PWD="123456")
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
**申请方式:** 首先创建storeFile([创建方式链接](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/ide-signing#section462703710326)),然后申certPath和profile([创建方式链接](https://developer.huawei.com/consumer/cn/doc/app/agc-help-add-debugcert-0000001914263178))
|
|
82
82
|
|
|
83
83
|
#### 3.4 原生模块
|
|
84
84
|
|
|
@@ -147,6 +147,7 @@ icon:应用图标,如果不设置,将使用electron默认图标。
|
|
|
147
147
|
"hvigorwPath": "D:/software/DevEco/deveco-studio-5.1.1.406SP1.win/devecostudio/tools/hvigor/bin",
|
|
148
148
|
"ohpmPath": "D:/software/DevEco/deveco-studio-5.1.1.406SP1.win/devecostudio/tools/ohpm/bin",
|
|
149
149
|
"sdkPath": "D:/software/DevEco/deveco-studio-5.1.1.406SP1.win/deveco-studio/sdk",
|
|
150
|
+
"ohosHapPath": "D:/project/electron/v34.5.4-20250918.1-release/libelectron_132/libelectron/ohos_hap",
|
|
150
151
|
"certPath": "D:/cert/debug.cer",
|
|
151
152
|
"profile": "D:/cert/helloworld.p7b",
|
|
152
153
|
"keyAlias": "helloworld",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@electron-ohos/electron-builder",
|
|
3
3
|
"description": "A complete solution to package and build a ready for distribution Electron app for MacOS, Windows and Linux with “auto update” support out of the box",
|
|
4
|
-
"version": "26.8.
|
|
4
|
+
"version": "26.8.3",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"out"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
],
|
|
48
48
|
"license": "MIT",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@electron-ohos/app-builder-lib": "^26.8.
|
|
50
|
+
"@electron-ohos/app-builder-lib": "^26.8.4",
|
|
51
51
|
"builder-util": "^26.8.1",
|
|
52
52
|
"builder-util-runtime": "^9.5.1",
|
|
53
53
|
"chalk": "^4.1.2",
|