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

Allow setting the icon for deno compile output binary #8912

Closed
eliassjogreen opened this issue Dec 29, 2020 · 16 comments · Fixed by #25039
Closed

Allow setting the icon for deno compile output binary #8912

eliassjogreen opened this issue Dec 29, 2020 · 16 comments · Fixed by #25039
Labels
cli related to cli/ dir suggestion suggestions for new features (yet to be agreed)

Comments

@eliassjogreen
Copy link
Contributor

A useful feature for deno compile would be changing the binary icon to a custom .ico provided by a --icon flag.

@eliassjogreen eliassjogreen changed the title Allow setting the icon for deno compile Allow setting the icon for deno compile output binary Dec 29, 2020
@caspervonb
Copy link
Contributor

Not sure if this can be done without adding a runtime dependency on developer tools? e.g on Windows you need rc.exe

@kitsonk kitsonk added cli related to cli/ dir suggestion suggestions for new features (yet to be agreed) labels Dec 29, 2020
@Spoonbender
Copy link
Contributor

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.

@eliassjogreen
Copy link
Contributor Author

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.

@AlexanderOMara
Copy link

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).

@Sv443
Copy link

Sv443 commented Oct 13, 2021

Are there any updates on this? I'd love to have this too.

@gm112
Copy link

gm112 commented Feb 21, 2022

Using any form of res edit has failed for me - the Deno compiled EXE ends up completely corrupted.

@soshimee
Copy link

I think it's to do with the different size of the image, so it reads from the wrong point.

@viceywiceyuwu
Copy link

bump

@NetOpWibby
Copy link

Ah, so this is not yet possible.

@KohnoseLami
Copy link

KohnoseLami commented Aug 31, 2023

Is this problem still unsolved?

@jdoleary
Copy link

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.

@litttley
Copy link

litttley commented Dec 5, 2023

It's time to add this feature

@Leokuma
Copy link

Leokuma commented Dec 25, 2023

Guys, I made a Deno program that allows you to compile Deno apps with custom icon and metadata: https://github.com/Leokuma/wincompile

@harvestcore
Copy link

Still unsolved? Would be nice to see this feature implemented soon...

littledivy added a commit that referenced this issue Aug 15, 2024
Add `--icon` flag to set deno compile'd executable icon on Windows.

```
deno compile --icon icon.ico game.tsx
```

Depends on denoland/sui#24

<img width="447" alt="image"
src="https://github.com/user-attachments/assets/7f6f3aa0-6872-4975-ae9d-06701b7684b8">

Closes #8912
@NetOpWibby
Copy link

The PR only adds icon capability to Windows. This issue shouldn't be closed until macOS and Linux get it too.

@littledivy
Copy link
Member

littledivy commented Aug 15, 2024

Linux and macOS don't have icons for executables. They are usually part of an application bundle (.app or AppImage) which is not current scope for deno compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli related to cli/ dir suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

Successfully merging a pull request may close this issue.