@vscode/gulp-electron 1.38.1 → 1.38.2
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 +1 -1
- package/src/darwin.js +5 -17
package/package.json
CHANGED
package/src/darwin.js
CHANGED
|
@@ -226,11 +226,9 @@ function patchHelperInfoPlist(opts) {
|
|
|
226
226
|
var input = es.through();
|
|
227
227
|
var output = input.pipe(
|
|
228
228
|
es.map(function (f, cb) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
)
|
|
233
|
-
) {
|
|
229
|
+
const match = /Contents\/Frameworks\/Electron\ Helper( \(\w+\))?\.app\/Contents\/Info.plist$/i.exec(
|
|
230
|
+
f.relative);
|
|
231
|
+
if (!match) {
|
|
234
232
|
return cb(null, f);
|
|
235
233
|
}
|
|
236
234
|
|
|
@@ -246,24 +244,14 @@ function patchHelperInfoPlist(opts) {
|
|
|
246
244
|
|
|
247
245
|
f.contents.on("end", function () {
|
|
248
246
|
var infoPlist = plist.parse(contents.toString("utf8"));
|
|
249
|
-
var
|
|
250
|
-
infoPlist["CFBundleIdentifier"] || ""
|
|
251
|
-
);
|
|
252
|
-
var suffix = match ? match[1] : "";
|
|
247
|
+
var suffix = match[1] ?? "";
|
|
253
248
|
|
|
254
249
|
if (opts.darwinBundleIdentifier) {
|
|
255
250
|
infoPlist["CFBundleIdentifier"] =
|
|
256
251
|
opts.darwinBundleIdentifier + ".helper";
|
|
257
|
-
|
|
258
|
-
if (suffix) {
|
|
259
|
-
infoPlist["CFBundleIdentifier"] += "." + suffix;
|
|
260
|
-
}
|
|
261
252
|
}
|
|
262
253
|
|
|
263
|
-
infoPlist["CFBundleName"] = opts.productName
|
|
264
|
-
if (suffix) {
|
|
265
|
-
infoPlist["CFBundleName"] += " " + suffix;
|
|
266
|
-
}
|
|
254
|
+
infoPlist["CFBundleName"] = `${opts.productName} Helper${suffix}`;
|
|
267
255
|
|
|
268
256
|
if (infoPlist["CFBundleDisplayName"]) {
|
|
269
257
|
infoPlist["CFBundleDisplayName"] = infoPlist["CFBundleName"];
|