nw-builder 4.17.9 → 4.17.10
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/package.json +2 -2
- package/src/bld/osx.js +6 -6
- package/src/bld.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nw-builder",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.10",
|
|
4
4
|
"description": "Build NW.js desktop applications for MacOS, Windows and Linux.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NW.js",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"archiver": "^7.0.1",
|
|
72
72
|
"commander": "^14.0.3",
|
|
73
73
|
"glob": "^13.0.6",
|
|
74
|
-
"plist": "^
|
|
74
|
+
"plist": "^4.0.0",
|
|
75
75
|
"resedit": "^3.0.2",
|
|
76
76
|
"semver": "^7.7.4",
|
|
77
77
|
"tar": "^7.5.10"
|
package/src/bld/osx.js
CHANGED
|
@@ -3,7 +3,7 @@ import fs from 'node:fs';
|
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import process from 'node:process';
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import { build, parse } from 'plist';
|
|
7
7
|
import semver from 'semver';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -15,12 +15,12 @@ import semver from 'semver';
|
|
|
15
15
|
*/
|
|
16
16
|
async function updateHelperPlist (plistPath, helperName, helperId, appCFBundleIdentifier) {
|
|
17
17
|
const plistFullPath = path.resolve(plistPath, 'Contents/Info.plist');
|
|
18
|
-
const plistJson =
|
|
18
|
+
const plistJson = parse(await fs.promises.readFile(plistFullPath, 'utf-8'));
|
|
19
19
|
plistJson.CFBundleDisplayName = helperName;
|
|
20
20
|
plistJson.CFBundleName = helperName;
|
|
21
21
|
plistJson.CFBundleExecutable = helperName;
|
|
22
22
|
plistJson.CFBundleIdentifier = `${appCFBundleIdentifier}.${helperId}`;
|
|
23
|
-
await fs.promises.writeFile(plistFullPath,
|
|
23
|
+
await fs.promises.writeFile(plistFullPath, build(plistJson));
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -84,7 +84,7 @@ export default async function setOsxConfig({ version, app, outDir, releaseInfo }
|
|
|
84
84
|
];
|
|
85
85
|
|
|
86
86
|
/* MacOS Plugin Helper is removed in NW.js v0.111.0 (Chromium M148) */
|
|
87
|
-
if (semver.lt(version,
|
|
87
|
+
if (semver.lt(version, '0.111.0')) {
|
|
88
88
|
helperApps.push({ name: 'nwjs Helper (Plugin).app', id: 'helper.plugin' });
|
|
89
89
|
}
|
|
90
90
|
|
|
@@ -141,7 +141,7 @@ export default async function setOsxConfig({ version, app, outDir, releaseInfo }
|
|
|
141
141
|
* JSON from `nwjs.app/Contents/Info.plist`
|
|
142
142
|
* @type {object}
|
|
143
143
|
*/
|
|
144
|
-
const contentsInfoPlistJson =
|
|
144
|
+
const contentsInfoPlistJson = parse(
|
|
145
145
|
await fs.promises.readFile(
|
|
146
146
|
contentsInfoPlistPath,
|
|
147
147
|
'utf-8'
|
|
@@ -184,7 +184,7 @@ export default async function setOsxConfig({ version, app, outDir, releaseInfo }
|
|
|
184
184
|
/* Write the updated values to their config files. */
|
|
185
185
|
await fs.promises.writeFile(
|
|
186
186
|
contentsInfoPlistPath,
|
|
187
|
-
|
|
187
|
+
build(contentsInfoPlistJson));
|
|
188
188
|
await fs.promises.writeFile(
|
|
189
189
|
contentsResourcesEnLprojInfoPlistStringsPath,
|
|
190
190
|
contentsResourcesEnLprojInfoPlistStringsArray.toString().replace(/,/g, '\n'),
|
package/src/bld.js
CHANGED
|
@@ -187,7 +187,7 @@ async function bld({
|
|
|
187
187
|
} else if (platform === 'win') {
|
|
188
188
|
await setWinConfig({ app, outDir });
|
|
189
189
|
} else if (platform === 'osx') {
|
|
190
|
-
await setOsxConfig({ app, outDir, releaseInfo });
|
|
190
|
+
await setOsxConfig({ version, app, outDir, releaseInfo });
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
if (zip !== false) {
|