OS/2 tricks: Icon corruption

Sometimes, a default icon of a program which is shown on WPS is corrupted even though an original .ico file is normal. Generally, this problem occurs when compressing resources with 24-bits and/or 32-bits icons.

On OS/2, the executables such as .exe and .dll can be compressed with /EXEPACK option when linking with IBM linkers such as link386.exe and ilink.exe, or with lxlite.exe after linking. Out of these, lxlite.exe may corrupt a default icon, and maybe other icons as well if it compress the executables containing resources. In addition, a resource compiler, rc has -x option to compress resources, too. This may also corrupts icons.

The best way to fix this icon corruption problem is to fix a resource compiler and lxlite. However this is not easy.

Then, which ways are possible ?

The simplest way is to compress neither the executables nor resources. However, we will get much bigger executables.

More reasonable way is to compress the executables only. For example,

  1. Link the executables without resources(.res)
  2. Compress the executables with lxlite
  3. Embed resources(.res) to the compressed executables with rc without -x

This will also get the executables whose size is increased by a resource size, but be acceptable.

Of course, if you have no problems, you don't have to do the above ways. ^^


댓글

이 블로그의 인기 게시물

토렌트: < 왕좌의 게임 > 시즌 1 ~ 시즌 8 완결편 마그넷

토렌트: < 스타워즈 > Ep.1 ~ Ep.6 마그넷

토렌트: NGC < 코스모스 > 우리말 더빙 전편(1편~13편) 마그넷