jh5_app_build 1.0.26 → 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.
Files changed (2) hide show
  1. package/lib/build_std.js +20 -2
  2. package/package.json +1 -1
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");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jh5_app_build",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "jaskle jh5_app_build",
5
5
  "main": "./bin/jh5_app_build.js",
6
6
  "registry": true,