deno
deno copied to clipboard
Allow setting the icon for `deno compile` output binary
A useful feature for deno compile
would be changing the binary icon to a custom .ico
provided by a --icon
flag.
Not sure if this can be done without adding a runtime dependency on developer tools? e.g on Windows you need rc.exe
Not sure if this can be done without adding a runtime dependency on developer tools? e.g on Windows you need rc.exe
Well, when you use deno to compile you are already in "development tools land", so I think this is acceptable as long as deno is usable as a runtime without these dependencies.
I think most people developing using windows already have either the Windows Sdk or minGW64 installed as required by winres, a crate for editing executable resources. This could be kept as an unstable feature as it requires an external dependency. For osx it seems to be quite easy according to this stackoverflow question only requiring hdiutil which seems to be a default tool on osx.
Not sure if this can be done without adding a runtime dependency on developer tools? e.g on Windows you need rc.exe
Reading/writing EXE resources in pure JavaScript is definitely possible, there's an NPM module which can do it (https://www.npmjs.com/package/resedit).
Are there any updates on this? I'd love to have this too.
Using any form of res edit has failed for me - the Deno compiled EXE ends up completely corrupted.
I think it's to do with the different size of the image, so it reads from the wrong point.
bump
Ah, so this is not yet possible.
Is this problem still unsolved?
Even defaulting to no icon or a blank icon would be preferable to the deno icon.
Since a compiled deno script isn't deno itself, IMO, it doesn't make sense to have the icon default to the deno icon. Also a blank icon would allow developers to distribute the executable without having to mess around with sketchy 3rd party software to change the icon.
It's time to add this feature
Guys, I made a Deno program that allows you to compile Deno apps with custom icon and metadata: https://github.com/Leokuma/wincompile
Still unsolved? Would be nice to see this feature implemented soon...