Re: icons on windows
Jacques Garrigue <[email protected]> Sat, 6 Oct 2012 21:52:08 +0900
| Newsgroups | gmane.comp.lang.ocaml.lib.gtk |
|---|---|
| Message-ID | <[email protected]> |
On 2012/10/06, at 7:40, William <[email protected]> wrote: > Hello, > I am using ocaml, lablgtk2, and forked cross-environment mxe to produce a native program on windows (with static bindings to gtk2). The executable is 32Mo, and includes everything inside. This works well, but I have a problem : icons in menus are not available : instead of having a door drawn next to the "Exit" button, it gets an uggly "unavailable" icon. (but it works on linux) > How to solve this? Where shall I get the icons ? Where shall I put them ? How can I tell gtk2 to look into the good directory? I see two solutions. One is to install the GTK+ windows runtime. In that case, you should not use dynamic linking, but rather set your path the access the GTK dlls, because the icons are found according to their relative location to the DLL, IIRC. The other solution is to inline all your icons. There is a tool called gdk_pixbuf_mlsource to help you in this process. See also the label.ml example for using inline images. Note however that they will not be stock icons anymore, so you should set the icons by hand in your code. (There is maybe a way to make them stock icons, but I'm not aware of it.) Jacques