dgiagio / warp

Create self-contained single binary applications
MIT License
1.92k stars 92 forks source link

Can you support to add icon? #34

Open sorainnosia opened 5 years ago

sorainnosia commented 5 years ago

Thanks a lot for the great work. I successfully packed a full .NET Framework executable and it runs flawlessly, and even though it packde a .config file inside. When the app changes the .config file, the next run it get the changes without issue, which means warp does not re-unpack it. It also makes my exe not readable by ILDASM which is another good feature.

Can I request another feature? I need to add an icon to the executable file, but this maybe windows specific thing and different OS needs different implementation too, but it will be great to have it.

You can close this if you think you don't want to do that. Thanks again for the great work.

VitoVan commented 5 years ago

It would be great if this is supported by nature.

But, in the mean time, you can use Resource Hacker to achieve this.

http://www.angusj.com/resourcehacker/

If you prefer to automate the ICON adding process, you can also use the command line:

rh.exe -open old.exe -save new.exe -action addskip -res my.ico -mask ICONGROUP,MAINICON,
Ruffo324 commented 5 years ago

It would be great if this is supported by nature.

But, in the mean time, you can use Resource Hacker to achieve this.

http://www.angusj.com/resourcehacker/

If you prefer to automate the ICON adding process, you can also use the command line:

rh.exe -open old.exe -save new.exe -action addskip -res my.ico -mask ICONGROUP,MAINICON,

Yea, but's thats not an option if u working on a mac or linux system. Or (in my case) builded and packed from a unix based CI.

VitoVan commented 5 years ago

In my personal experience, macOS and Linux executables DO NOT have an ICON by nature.

That's what in my mind, maybe it's wrong, I don't know. If you find something else, I'm glad to learn. Have fun, btw.

VitoVan commented 5 years ago

It would be great if this is supported by nature. But, in the mean time, you can use Resource Hacker to achieve this. http://www.angusj.com/resourcehacker/ If you prefer to automate the ICON adding process, you can also use the command line:

rh.exe -open old.exe -save new.exe -action addskip -res my.ico -mask ICONGROUP,MAINICON,

Yea, but's thats not an option if u working on a mac or linux system. Or (in my case) builded and packed from a unix based CI.

Or, do you mean you wanna compile Windows binary through a Unix based CI?

If you do mean that, I think it's out of the capability of Warp, since you need a windows-x64.warp-packer.exe won't run on Unix.

AdmiringWorm commented 5 years ago

If you do mean that, I think it's out of the capability of Warp, since you need a windows-x64.warp-packer.exe won't run on Unix.

True, you can't run the exe on Unix, but you can run the platform specific packer and just pass in --arch windows-x64 to create a packed windows executable. I have been using that way myself to create windows binary on linux using warp.

VitoVan commented 5 years ago

If you do mean that, I think it's out of the capability of Warp, since you need a windows-x64.warp-packer.exe won't run on Unix.

True, you can't run the exe on Unix, but you can run the platform specific packer and just pass in --arch windows-x64 to create a packed windows executable. I have been using that way myself to create windows binary on linux using warp.

Oh, I think that's what @Ruffo324 really mean, I totally missed the point.

Like on Linux using something like --arch windows-x64 --icon iconfile.ico to create a packed Windows executable with icon.

mardukbp commented 4 years ago

There is a go package for this: rsrc. I guess it is a good resource for learning how to implement this feature in warp.

BrainSlugs83 commented 3 years ago

It would be nice if it just picked up the original app's icon by default...

maxbrito500 commented 1 year ago

Ping. Just to bring up this feature on warp4j.

All construction is made on linux, difficult to change the icon manually. Would be great to have syntax for specifying an .ico file. Thanks.