Repository: nwutils/nw-builder (JavaScript)

Issue:
[osx64] Copyright is not configurable - always set to default nwjs
### Issue Type

- [X] Bug Report
- [ ] Feature Request
- [ ] Other

### Current/Missing Behaviour
Given the following: 
```
await nwbuild({
        mode: 'build',
        version: '0.70.0',
        flavor: 'normal',
        platform: 'osx',
        arch: "x64",
        outDir: './build/example-tool/osx64',
        srcDir: './Settings.json ./package.json ./config.json ./dist/**,
        app: {
            name: 'example-tool',
            CFBundleDisplayName: 'Example Tool',
            CFBundleVersion: version,
            CFBundleShortVersionString: version,
            companyName: 'rocketVibes International, Inc.',
            NSHumanReadableCopyright: `Copyright ${new Date().getFullYear()} rocketVibes International, Inc.  All rights reserved.`,
            originalFilename: 'example-tool.exe',
            icon: './dist/assets/images/example_tool.ico'
        }
    });
```
Copyright is still default NWJS copyright. 

### Expected/Proposed Behaviour
Copyright should have value provided.

### Additional Info
It appears that the English InfoPlist.strings CFBundleGetInfoString value (example path: /build/example-tool/osx64/example-tool.app/Contents/Resources/en.lproj) is overriding the NSHumanReadableCopyright value set in the Info.plist -- so the nwjs copyright is coming through instead of the one I set.

- Package version: 4.3.1
- Operating System: MacOS Ventura
- Node version: 18.16.0
- NW.js version: 0.70.0



Discussion: I'm pretty sure CFBundleGetInfoString is no longer supported/used in OSX 10 and above. Let me see what I can do about this.
https://github.com/nwutils/nw-builder/commit/5864c5b7458a8324abb90134c104e9b7a33dface
Updating `NSHumanReadableCopyright` in `Contents/Resources/en.lproj/InfoPlist.strings` did not update the copyright.

https://github.com/nwutils/nw-builder/commit/8ccfddfd92d986b27a67882ac779568017c06090
On the other hand, adding `NSHumanReadableCopyright` inside `Info.plist` as mentioned in Apple docs also does not work.

@rocketVibes let me know if you're able to find a solution for this. In the mean time, I'll keep trying.



Fix (patch):
diff --git a/changelog.md b/changelog.md
index 58700f448..397cc5a16 100644
--- a/changelog.md
+++ b/changelog.md
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 
 ## [Unreleased]
 
+## [4.3.3] - 2023-07-11
+
+## Changed
+
+- Set `NSHumanReadableCopyright` property in `*.app/Resources/en.lproj/InfoPlist.strings` to update copyright
+
+## Removed
+
+- `NSHumanReadableCopyright` from `Info.plist`
+
 ## [4.3.2] - 2023-07-11
 
 ## Added
diff --git a/package-lock.json b/package-lock.json
index 811d77183..9e17e109a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "nw-builder",
-  "version": "4.3.2",
+  "version": "4.3.3",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "nw-builder",
-      "version": "4.3.2",
+      "version": "4.3.3",
       "license": "MIT",
       "dependencies": {
         "cli-progress": "^3.12.0",
diff --git a/package.json b/package.json
index 5d5b9c5fa..d55b5d2e2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "nw-builder",
-  "version": "4.3.2",
+  "version": "4.3.3",
   "description": "Build NW.js desktop applications for MacOS, Windows and Linux.",
   "keywords": [
     "NW.js",
diff --git a/src/bld/osxCfg.js b/src/bld/osxCfg.js
index 54aaa9b00..a4f4b99f8 100644
--- a/src/bld/osxCfg.js
+++ b/src/bld/osxCfg.js
@@ -48,6 +48,25 @@ 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}";`;
+      }
+    });
+
     infoPlistJson.LSApplicationCategoryType = app.LSApplicationCategoryType;
     infoPlistJson.CFBundleIdentifier = app.CFBundleIdentifier;
     infoPlistJson.CFBundleName = app.CFBundleName;
@@ -55,7 +74,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 +82,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);
   }