How to change windows exe file's icon in linux without wine?

喜欢而已 提交于 2019-12-06 07:18:23

问题


I know I can use ResHacker to change a resource from windows and I know I can use ResourceUpdate function to do the same problematically (again in windows). My problem is that I have to update the icon of a windows exe file in linux, without using wine.

(the reason for not using wine is that this process should run on an automation server that change the files and sign them).

I don't know even where to start from.


回答1:


You can change a files metadata like this:

gvfs-set-attribute '/path/to/file' -t stringv metadata::custom-icon "/path/to/image.png"



回答2:


There's a program called windres that should suit your needs

Whoops, that's just a resource compiler, sorry.

However there is pefile a python module for working with PE executables, perhaps you could write a script with it that does what you want



来源:https://stackoverflow.com/questions/13804344/how-to-change-windows-exe-files-icon-in-linux-without-wine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!