Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macPlist option improvements #96

Merged
merged 1 commit into from
Nov 13, 2014

Conversation

bastimeyer
Copy link
Contributor

This change makes it easier if you want to add a single value to the Info.plist file. Right now, the only choice you have is replacing the whole plist file, which is inconvenient.
I've changed the editPlist utility method, so you can use an object with custom values which will overwrite the parsed ones.

@bastimeyer
Copy link
Contributor Author

Could I please get a response? 😕

@adam-lynch
Copy link
Contributor

@steffenmllr?

@steffenmllr
Copy link
Contributor

LGTM - it would be great if the object properties are documented in the readme

@bastimeyer
Copy link
Contributor Author

@steffenmllr
Are you talking about the appName, appVersion, copyright, etc. properties? I don't think that these custom auxiliary properties are a good idea at all. I didn't touch those, but in my opinion these should be removed.
Right now, you're unable to set the CFBundleDisplayName property, because it will be overwritten by appName later on (see index.js#387 and utils.js#159).
It would be much better to create a default object with the needed CFBundleName, CFBundleDisplayName, CFBundleVersion, CFBundleShortVersionString and NSHumanReadableCopyright properties. Then it can be modified by all user defined properties instead of using auxiliary properties.

Do you want me to make further changes and update my pull request? (I've also seen, that I messed up some line endings in the readme file, so let me fix these too)

@bastimeyer
Copy link
Contributor Author

PR is updated and squashed...
I would really appreciate it if you could merge these changes and bump the version of this and the grunt repo. Thanks!

@steffenmllr
Copy link
Contributor

@adam-lynch could you please take a look at it and merge it if you are ok with it

@adam-lynch
Copy link
Contributor

I have no idea about macPlist to be honest. Sorry for taking a few days to respond, was out of the country.

@majodev
Copy link

majodev commented Nov 10, 2014

Would also love to see these changes within node-webkit-builder. Updating the Info.plist afterwards is a pain (as is replacing the whole file). This will make it easier to replace one single value.

@bastimeyer
Copy link
Contributor Author

I have no idea about macPlist to be honest.

If the motivation of this pull request is still unclear, just have a look at the modified test case. These changes are actually fairly simple and make using the macPlist option much, much easier, so I don't know why nobody feels responsible to quickly look into this for a merge.
As you can see, I'm not the only one who's having some issues with the current implementation.
Thank you...

@adam-lynch
Copy link
Contributor

@bastimeyer you have a point 😄

I had another there now. Looks good to me. One small thing I'd suggest is not having more than three params per function. So for getPlistOptions, if it was me I'd have it accept a single object argument, which would then contain appName, appVersion, copyright and custom as properties.

Also, for the README, how about something like this?

Pass a string if you want to supply exactly what will be written to the plist file. If a string isn't passed, a plist file will be generated from your package.json. Pass an object to overwrite or add properties to the generated plist file.

* Added support for a custom macPlist object so plist properties can be
changed or added to the generated file.
* Removed auxiliary properties appName, appVersion and copyright
* Added checks for mandatory plist properties
* Fixed asynchronicity issues
* Modified plist test to reflect these changes
@bastimeyer
Copy link
Contributor Author

PR is again updated... 87ee185

adam-lynch added a commit that referenced this pull request Nov 13, 2014
@adam-lynch adam-lynch merged commit 55da009 into nwutils:master Nov 13, 2014
@adam-lynch
Copy link
Contributor

Thanks 👍 Sorry for taking so long 😄

@bastimeyer
Copy link
Contributor Author

Thanks! Would be nice if you could also bump the version and publish it on npm (also the grunt repo), so this can be used. 😃

@adam-lynch
Copy link
Contributor

Will do tomorrow unless someone else gets to it before me.

Why are you suggesting to bump the grunt module's version though? Won't anyone installing it fresh / updating their install of the grunt module automatically get the latest version of the dependences (i.e. this module)? That's what I assume, unless we bump the version by its major version.

@bastimeyer
Copy link
Contributor Author

installing it fresh

Then yes. But if you've already installed the current version, then you'd need to clear your npm cache first before installing/updating the package or else it will be copied from there. That's why I'm suggesting to bump the patch version number...

@adam-lynch
Copy link
Contributor

K thanks

@adam-lynch
Copy link
Contributor

Done. Both at 0.3.0 now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants