From abe985bb13ecaa263fedf299ab320871a63796ea Mon Sep 17 00:00:00 2001 From: Ayushman Chhabra Date: Sat, 1 Jul 2023 00:19:14 +0530 Subject: [PATCH] feat: add `CFBundleIconFile` --- src/bld/osxCfg.js | 2 ++ src/util/parse.js | 1 + 2 files changed, 3 insertions(+) diff --git a/src/bld/osxCfg.js b/src/bld/osxCfg.js index 02913ca7a..8cf0f4a44 100644 --- a/src/bld/osxCfg.js +++ b/src/bld/osxCfg.js @@ -16,6 +16,7 @@ import { log } from "../log.js"; * @property {string} CFBundleVersion The version of the build that identifies an iteration of the bundle. * @property {string} CFBundleShortVersionString The release or version number of the bundle. * @property {string} NSHumanReadableCopyright A human-readable copyright notice for the bundle. + * @property {string} CFBundleIconFile The file containing the bundle's icon. */ /** @@ -49,6 +50,7 @@ const setOsxConfig = async (app, outDir) => { infoPlistJson.CFBundleVersion = app.CFBundleVersion; infoPlistJson.CFBundleShortVersionString = app.CFBundleShortVersionString; infoPlistJson.NSHumanReadableCopyright = app.NSHumanReadableCopyright; + infoPlistJson.CFBundleIconFile = app.CFBundleIconFile; await fs.writeFile(infoPlistPath, plist.build(infoPlistJson)); } catch (error) { diff --git a/src/util/parse.js b/src/util/parse.js index 07e2917ad..deb533b14 100644 --- a/src/util/parse.js +++ b/src/util/parse.js @@ -103,6 +103,7 @@ export const parse = async (options, pkg) => { options.app.CFBundleShortVersionString ?? pkg.version; options.app.NSHumanReadableCopyright = options.app.NSHumanReadableCopyright ?? undefined; + options.app.CFBundleIconFile = options.app.CFBundleIconFile ?? "app.icns"; } return { ...options };