Hi,
Could you add a native way for us to customize the icon of generated executable package (i.e Windows and MacOS)?
I tried using Resource Hacker to swap the default Node icon set with my own icon set (the same sizes for each of six icons packed by Node), but my icon file has different size to the icon set embedded by Node/pkg and my executable file gets corrupted (has different size to original and internal pointer references probably don't get updated) and terminates instantly (however it shows my customized icon fine in file preview).
The reasons I'm asking for --icon parameter to be supported natively by pkg is that the post-packaging icon modification is unreliable and more troublesome than it ought o be. Since pkg is assembling all the resources into the executable already, allowing us to submit our own icon would be natural feature.
I anticipate quite few users would find this feature useful for their executable branding.
Thank you in advance.
Hi,
Could you add a native way for us to customize the icon of generated executable package (i.e Windows and MacOS)?I tried using Resource Hacker to swap the default Node icon set with my own icon set (the same sizes for each of six icons packed by
Node), but my icon file has different size to the icon set embedded byNode/pkgand my executable file gets corrupted (has different size to original and internal pointer references probably don't get updated) and terminates instantly (however it shows my customized icon fine in file preview).The reasons I'm asking for
--iconparameter to be supported natively bypkgis that the post-packaging icon modification is unreliable and more troublesome than it ought o be. Sincepkgis assembling all the resources into the executable already, allowing us to submit our own icon would be natural feature.
I anticipate quite few users would find this feature useful for their executable branding.Thank you in advance.
you may try a new toy pkgx
Studied this topic for while. Well it seams that every attempt to patch executable resources lead to damage file unless new resource binary size does not match original size. after path . After succesfull patch the exe errors with such as
pkg/prelude/bootstrap.js:7
return;
^^^^^^
SyntaxError: Illegal return statement
[90m at new Script (vm.js:89:7)[39m
[90m at readPrelude (internal/bootstrap/pkg.js:29:13)[39m
[90m at internal/bootstrap/pkg.js:36:18[39m
[90m at internal/bootstrap/pkg.js:43:4[39m
[90m at internal/bootstrap/pkg.js:44:2[39m
So, might it be so easy that we just need to patch pkg entry point informations regarding new resource binary size?
@Zireael did found out more?