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 to cli.binaryName.
applicationIcon: a relative path to an icon in .png format. Defaults to modes.window.icon. If it is not set, uses Neutralinojs logo.
Two npm packages were introduced as direct dependencies:
png2icons, this package can also be used in the future to bake icons for MacOS.
No native or platform-specific dependencies. Yay!
Possible backwards incompatibility:
If a user doesn't fill any of the new fields AND has an icon in modes.window.icon that is not in PNG format, the neu build command will fail as the windows patcher expects an icon in a PNG format. Perhaps I shouldn't look for an icon in modes.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.
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.