From: Artem Gr <ar...@bi...> - 2006-12-04 19:11:15
|
Here is my experience of embedding .ico files into executable: Write and compile the resource file with several named icons as described in http://www.wxwidgets.org/wiki/index.php/Cross-Compiling_Windows_Resources (windres.exe is provided with the CYGWIN). A part of my resource file: ico1_normal ICON "src/PENCL01J.ICO" ico2_noPing ICON "src/PAINT05B.ICO" Compiling it into an object file: $ windres src/resources.rc src/resources.o Linking it into the Haskell program: $ ghc --make src/*.hs src/resources.o Using the linked icon from Haskell: ico <- iconCreateLoad "ico1_normal" wxBITMAP_TYPE_ICO_RESOURCE (sz 32 32) f <- frame [text := "Frame title goes here.", visible := False] frameSetIcon f ico |