You are not logged in. In order to participate in Special Interest Groups, you should
log in now
.
GTK+ on Mac OS X (Discussion)
Created by David Leimbach on November 10, 2010 04:05:59 PM.
Status: Open
Messages
I have been so frustrated by the process of getting this set up in the past that I don't even know the status of this today.
Can someone post something with respect to the status of this, or I can later after I've had a chance to try it out.
There is this blog note is entitled "Installing Gtk2Hs on MacOS":
http://ezrakilty.net/research/
I made a half-hearted attempt to install Gtk a few months ago and failed. I may make another attempt in December. When you succeed please tell us how you did it.
-Carlton
I've had fairly good success with Gtk2Hs, but it's a slightly involved process. The most difficult part seems to be getting Gtk installed. There are two options for this, Macports and gtk-osx (http://gtk-osx.sourceforge.net/). I haven't used Macports for some time, so I can't comment on that other than you're best off using the Macports ghc as well (otherwise you're like to get into impossible situations involving libiconv).
The build instructions for gtk-osx are pretty unclear to me. I think following the steps as given was mostly correct, but it was necessary to edit the .jhbuildrc-custom file to pull the "modulesets" code, and also to make sure it was built for 32-bit. There are directions on how to do this from the website, but it's poorly organized.
Once gtk-osx is built, building gtk2hs is fairly straightforward. You'll need to either use gtk-head and the new -use-quartz-framework flag, or patch gtk (see the gtk2hs mailing list for more information). After that, launch "jhbuildrc shell", which is just a shell with the environment with libdirs,etc. set up properly, and within that shell from your gtk2hs source directory run "cabal install".
I'm happy to provide more assistance if anyone wants to try this route.
John
My formatting got ate, and there's no way to edit? Argh.
Macports is easier for me ……
port install gtk2 +universal
Better add this in ~/.cabal/config
extra-lib-dirs: /usr/lib
cabal install gtk2hs-buildtools
cabal install gtk