Skip to content

Commit

Permalink
fix: merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayushman Chhabra committed Jul 25, 2023
2 parents 263070c + f176c0c commit d24d697
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [4.3.3] - 2023-07-25

## 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
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
24 changes: 23 additions & 1 deletion src/bld/osxCfg.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,32 @@ 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;
infoPlistJson.CFBundleDisplayName = app.CFBundleDisplayName;
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) {
Expand All @@ -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);
}
Expand Down

0 comments on commit d24d697

Please sign in to comment.