graceful-updater 1.1.2-beta.0 → 1.1.2-beta.1

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.
@@ -39,12 +39,12 @@ class MacUpdator extends app_updator_1.AppUpdator {
39
39
  this.logger.info('MacUpdator#doUnzip:start, unzip %s, to %s', downloadTargetDir, resourcePath);
40
40
  try {
41
41
  // 直接解压
42
- await (0, utils_1.execAsync)(`unzip -o ${downloadTargetDir}`, {
42
+ await (0, utils_1.execAsync)(`unzip -o '${downloadTargetDir}'`, {
43
43
  cwd: resourcePath,
44
44
  maxBuffer: 2 ** 28,
45
45
  });
46
46
  if (!await (0, utils_1.existsAsync)(latestAsarPath)) {
47
- const zipInfo = await (0, utils_1.execAsync)(`unzip -Z -1 ${downloadTargetDir}`, {
47
+ const zipInfo = await (0, utils_1.execAsync)(`unzip -Z -1 '${downloadTargetDir}'`, {
48
48
  cwd: resourcePath,
49
49
  maxBuffer: 2 ** 28,
50
50
  });
@@ -81,7 +81,9 @@ class MacUpdator extends app_updator_1.AppUpdator {
81
81
  }
82
82
  const { resourcePath, latestAsarPath } = this.availableUpdate;
83
83
  const oldAsarPath = path_1.default.resolve(resourcePath, `${constants_1.OldArchivePrefix}${new Date().getTime()}.asar`);
84
- const currentAsarPath = path_1.default.resolve(resourcePath, 'app.asar');
84
+ const exePath = this.app.exePath;
85
+ const currentPath = path_1.default.resolve(exePath, '..', '..', 'Resources');
86
+ const currentAsarPath = path_1.default.resolve(currentPath, 'app.asar');
85
87
  try {
86
88
  // 将老包改名 app.asar => old-xxxx.asar
87
89
  if (await (0, utils_1.existsAsync)(currentAsarPath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graceful-updater",
3
- "version": "1.1.2-beta.0",
3
+ "version": "1.1.2-beta.1",
4
4
  "description": "graceful-updater is a software updator management solution for Electron applications, It is convenient to complete full software update and dynamic update.",
5
5
  "scripts": {
6
6
  "build": "sh ./build.sh",