warp icon indicating copy to clipboard operation
warp copied to clipboard

Can you support to add icon?

Open sorainnosia opened this issue 6 years ago • 9 comments

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.

sorainnosia avatar Apr 13 '19 11:04 sorainnosia

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,

VitoVan avatar Jun 25 '19 00:06 VitoVan

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.

Ruffo324 avatar Jun 26 '19 10:06 Ruffo324

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

  • On macOS, you will have icons when you get a "app", which is called "Package Bundles", it ends with .app extension, which basically a directory that contains the whole files of your application, such as executables / pictures / icons and othere resources you may need.

    You can define your icon file for macOS app like this in Info.plist file:

        <key>CFBundleIconFile</key>
        <string>iconfile</string>
    

    and put the iconfile.icns into you-application.app/Contents/Resources/ directory, then you'll get it.

  • On Linux, application icon is usually provide through a.desktop file, which you can read about it here.

    If you prefer to ship your application as one single file like Windows, you may be interested in AppImage which may do you a good job.

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 avatar Jun 26 '19 14:06 VitoVan

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.

VitoVan avatar Jul 01 '19 10:07 VitoVan

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.

AdmiringWorm avatar Jul 01 '19 11:07 AdmiringWorm

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.

VitoVan avatar Jul 01 '19 13:07 VitoVan

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

mardukbp avatar Oct 12 '20 15:10 mardukbp

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

BrainSlugs83 avatar Dec 15 '20 02:12 BrainSlugs83

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.

maxbrito500 avatar Sep 20 '23 16:09 maxbrito500