-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
✨ Set icons and metadata to Windows executables #268
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @CosmoMyzrailGorynych Thanks so much for your pull request. Please note that, at this moment of the project, we need to support older Node versions. Could you please adhere to this notice and use ||
and ternary if / &&
instead of ?.
and ??
. Thanks 🎉
Edit: Also, please make sure to resolve merge conflicts, Thanks
Sure |
I assume you're targeting node.js v8+. Is it correct? |
🤔 Readme tells you need Node.js v14+ but |
Hello, thanks for posting your findings. According to this issue, seems like the minimum version should be 12 (We need to update the readme file it sounds :) ). Thanks 🎉 |
…an icon in modes.window.icon was specified
@shalithasuranga done. |
@CosmoMyzrailGorynych thanks so much. Sorry for the trouble, could you please sync with the latest code. Thanks so much 🎉 |
@shalithasuranga done. |
Btw, in case a question rises where executables should ever be patched when Neutralino is inside a host project, one often overlooked "feature" of Windows is antiviruses and firewalls that love to block everything. Metadata and an icon will show in antiviruses' and firewalls' dialogs indicating that it is the app a user wants to run, not some "random, unknown" Neutralino 😄 By the very same reason I'm patching Bun binaries when it is run by Neutralino. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for your work @CosmoMyzrailGorynych. I'll release a new version with the newly added features soon! We can update the documentation (by adding config.author
, etc, and other details) after releasing the next version 🎉
Yeah, this feature is great for every Windows's Neutralinojs app user and app developer. Thanks 🎉 |
Thank you for merging it. I will prepare a follow-up PR for docs soon. |
Sure @CosmoMyzrailGorynych thanks 🎉 The issue is closed now 🎉 |
Closes the following issues:
This PR allows the
neu build
command to patch Windows executables with user-provided metadata and icon. This all is fully cross-platform. Icons are accepted in PNG format for ease of use and use in possible further improvements on making MacOS or Linux packages.This introduces the following optional keys to
neutralino.config.json
: (the keys are top-level)author
: gets written into executable's metadata.description
: gets written into executable's metadata.copyright
: gets written into executable's metadata. Defaults to current date + generic "all rights reserved".applicationName
: gets written into executable's metadata. Defaults tocli.binaryName
.applicationIcon
: a relative path to an icon in.png
format. Defaults tomodes.window.icon
. If it is not set, uses Neutralinojs logo.Two npm packages were introduced as direct dependencies:
No native or platform-specific dependencies. Yay!
Possible backwards incompatibility:
modes.window.icon
that is not in PNG format, theneu build
command will fail as the windows patcher expects an icon in a PNG format. Perhaps I shouldn't look for an icon inmodes.window.icon
at all?I'm open to improvements of this PR and will also make a PR for docs if/when this gets approved.