jh5_app_build 1.0.25 → 1.0.27

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.
@@ -122,7 +122,11 @@ program
122
122
  value: "std"
123
123
  },
124
124
  {
125
- name: 'Std device lite(*.apk file,no web)',
125
+ name: 'Weds device lite(*.jap file)',
126
+ value: "weds,nobin,noweb"
127
+ },
128
+ {
129
+ name: 'Std device lite(*.apk file)',
126
130
  value: "std,noweb"
127
131
  }
128
132
  ]
@@ -133,6 +137,19 @@ program
133
137
  // 标准应用
134
138
  buildCfg.isStdApp = buildCfg.platform.includes("std");
135
139
 
140
+ // 不加入app
141
+ if (buildCfg.platform.includes("noapp")) {
142
+ cmd.noapp = true;
143
+ }
144
+ // 不加入bin
145
+ if (buildCfg.platform.includes("nobin")) {
146
+ cmd.nobin = true;
147
+ }
148
+ // 不加入web
149
+ if (buildCfg.platform.includes("noweb")) {
150
+ cmd.noweb = true;
151
+ }
152
+
136
153
  // 缺省输出文件
137
154
  if (cmd.outpath) {
138
155
  buildCfg.outpath = cmd.outpath;
package/lib/build_std.js CHANGED
@@ -57,6 +57,21 @@ module.exports = async (cmd, buildCfg) => {
57
57
  // 默认软件名
58
58
  if (!apkinfoObj.appName) apkinfoObj.appName = "智能终端"
59
59
 
60
+ // 存在自定义apk
61
+ var custumApk = `${buildCfg.rootPath}/apk_cfg/app-release.apk`
62
+ if (fs.existsSync(custumApk)) {
63
+ console.warn(`exists custum Apk, unpack custum apk...`);
64
+ await jutils.jfile_utils.deleteFolder(stdBinDir);
65
+ child_process.execFileSync("C:\\jdev_develop\\jre\\bin\\java.exe", [
66
+ "-jar", "C:\\jdev_develop\\h5_bin\\apktool.jar",
67
+ "d", custumApk,
68
+ "-r", "-s",
69
+ "-o", stdBinDir
70
+ ], {
71
+ cwd: jreCwd
72
+ });
73
+ }
74
+
60
75
  // 清理数据
61
76
  console.log(`delete temp file ...`);
62
77
  await jutils.jfile_utils.deleteFolder(stdBinDir + "/assets/device_webapi");
@@ -154,8 +169,11 @@ module.exports = async (cmd, buildCfg) => {
154
169
  ignore: []
155
170
  });
156
171
  if (fileList.length === 0) {
157
- console.error("no dist files!");
158
- return;
172
+ console.warn("no audio_wav files!");
173
+ try {
174
+ jutils.jfile_utils.createDirs(pathSub)
175
+ } catch (error) {
176
+ }
159
177
  }
160
178
  console.log(`add [${fileList.length}] files ...`);
161
179
  let baseDir = makeAndGetDir(stdBinDir + "/assets/sounds");
@@ -231,7 +249,7 @@ module.exports = async (cmd, buildCfg) => {
231
249
  }
232
250
 
233
251
  // 需要web
234
- if (!buildCfg.platform.includes("noweb")) {
252
+ if (!cmd.noweb) {
235
253
  // 添加框架二进制
236
254
  {
237
255
  let pathSub = "jbuild_data/jext";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jh5_app_build",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "jaskle jh5_app_build",
5
5
  "main": "./bin/jh5_app_build.js",
6
6
  "registry": true,