diff --git a/src/bld/osxCfg.js b/src/bld/osxCfg.js index 54aaa9b00..f5bba044d 100644 --- a/src/bld/osxCfg.js +++ b/src/bld/osxCfg.js @@ -48,6 +48,26 @@ const setOsxConfig = async (app, outDir) => { const infoPlistPath = resolve(outApp, "Contents", "Info.plist"); const infoPlistJson = plist.parse(await readFile(infoPlistPath, "utf-8")); + const infoPlistStringsPath = resolve( + outApp, + "Contents", + "Resources", + "en.lproj", + "InfoPlist.strings" + ); + const infoPlistStringsData = await readFile(infoPlistStringsPath, "utf-8"); + + let infoPlistStringsDataArray = infoPlistStringsData.split("\n"); + + infoPlistStringsDataArray.forEach((line, idx, arr) => { + if (line.includes("NSHumanReadableCopyright")) { + arr[ + idx + ] = `NSHumanReadableCopyright = "${app.NSHumanReadableCopyright}";`; + console.log(arr); + } + }); + infoPlistJson.LSApplicationCategoryType = app.LSApplicationCategoryType; infoPlistJson.CFBundleIdentifier = app.CFBundleIdentifier; infoPlistJson.CFBundleName = app.CFBundleName; @@ -55,7 +75,6 @@ const setOsxConfig = async (app, outDir) => { infoPlistJson.CFBundleSpokenName = app.CFBundleSpokenName; infoPlistJson.CFBundleVersion = app.CFBundleVersion; infoPlistJson.CFBundleShortVersionString = app.CFBundleShortVersionString; - infoPlistJson.NSHumanReadableCopyright = app.NSHumanReadableCopyright; Object.keys(infoPlistJson).forEach((option) => { if (infoPlistJson[option] === undefined) { @@ -64,6 +83,10 @@ const setOsxConfig = async (app, outDir) => { }); await writeFile(infoPlistPath, plist.build(infoPlistJson)); + await writeFile( + infoPlistStringsPath, + infoPlistStringsDataArray.toString().replace(/,/g, "\n") + ); } catch (error) { log.error(error); }