Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Duncan Coutts <duncan.coutts@wo...> - 2005-02-07 16:21:49
|
All, A tarball for gtk2hs-0.9.7.1_rc1 is now available from our web page: http://gtk2hs.sf.net/gtk2hs-0.9.7.1_rc1.tar.gz Please test this on your windows boxes. Report any issues to this list. Changes since 0.9.7.1: * builds on Windows * an extra GtkImage function is bound * build is more careful with memory usage by default Improvements we should make: * make gtk programs not display a console window by default * provide a binary distribution on windows as a zip file since building form source is a bit intimidating for most windows users. If all goes well we can do a "Gtk2Hs 0.9.7.1 for Windows" release. That'll also give us the opportunity to advertise our new web site and new screenshots, and note that FreeBSD and Gentoo packages of 0.9.7 are out. If we're lucky there will be a debian package by then too. General instructions for building from source on windows are as follows: 1. install mingw and msys from http://www.mingw.org/ 2. install ghc for windows 3. install gtk+ for windows. There are two ways to do this: 1. install all of the runtime and dev zips according to these instructions: http://www.gimp.org/~tmp/gimp/win32/download.html (I have tested this method) 2. install using on of these easy-to-use installers: http://gladewin32.sf.net/ You will need the runtime and dev versions. However as an additional install instruction, you must make sure that the bin directory containing all the gtk dlls is on your path. I have not yet tested this way of installing gtk with gtk2hs, so feedback is appreciated. 4. download gtk2hs-0.9.7.1_rc1.tar.gz and untar, configure, make, make install in the normal way. Of course on windows you will not have gnome or probably mozilla or libglade (unless you used the gladewin32 installer which I believe includes libglade) so say $ ./configure --disable-gnome --disable-mozilla --disable-libglade A useful diagnostic after step 2 is to make sure ghc is working from your msys terminal. A useful diagnostic after step 3 is to make sure that $ pkg-config --cflags --libs gtk+-2.0 gives sensible output. After step 4, the demos should compile and run. The ones that do not depend on libglade or any gnome modules are: hello, graphic, treeList, unicode and buttonbox. Just cd to the appropriate directory and say: $ make Duncan |
From: Duncan Coutts <duncan.coutts@wo...> - 2005-02-07 21:25:47
|
On Mon, 2005-02-07 at 16:22 +0000, Duncan Coutts wrote: > All, > > A tarball for gtk2hs-0.9.7.1_rc1 is now available from our web page: > > http://gtk2hs.sf.net/gtk2hs-0.9.7.1_rc1.tar.gz > > Please test this on your windows boxes. Report any issues to this list. using ghci is currently broken because the dll names in the .pkg files are wrong. We need to prepend "lib" and append "-0", ie "glib-2.0" -> "libglib-2.0-0" which makes ghci load "libglib-2.0-0.dll". Building with gtk 2.6 does not yet work because all the functions which take file names have been changed and now have a '_utf8' suffix. The old names exist only in the binaries (for ABI backwards compatibility) but do not exist in the header files any more. We'll have to think about how we handle this. See: http://mail.gnome.org/archives/gtk-devel-list/2004-December/msg00029.html Builds against gtk 2.4 should run when gtk 2.6 is installed. (Which is nice since Gtk 2.6 looks much nicer than gtk 2.4 on windows since they added a better default theme.) > 3. install gtk+ for windows. There are two ways to do this: > 2. install using on of these easy-to-use installers: > http://gladewin32.sf.net/ You will need the runtime and > dev versions. However as an additional install > instruction, you must make sure that the bin directory > containing all the gtk dlls is on your path. I have not > yet tested this way of installing gtk with gtk2hs, so > feedback is appreciated. This should work so long as you use their gtk 2.4 installer. Also you only need the developer version since it includes the runtime libraries too. The installer gives you the option of registering environment vars and installing development header files which you must do. You can also opt to install glade which is nice if you intend to use windows as your development platform. Note that all users who wish to compile Haskell programs using gtk2hs will need the developer package for gtk since ghc sometimes needs to look at the C header files (like when compiling via C and functions get inlined). They should not need to install mingw since ghc installs all the standard mingw header files. (We should test this however.) If you want to distribute a compiled Haskell program using gtk2hs to other people then they should only need the gtk runtime package. Duncan |
From: Axel Simon <A.Simon@ke...> - 2005-02-08 08:53:17
|
Duncan, thanks for that. On Mon, 2005-02-07 at 21:26, Duncan Coutts wrote: > > 3. install gtk+ for windows. There are two ways to do this: > > > 2. install using on of these easy-to-use installers: > > http://gladewin32.sf.net/ You will need the runtime and > > dev versions. However as an additional install > > instruction, you must make sure that the bin directory > > containing all the gtk dlls is on your path. I have not > > yet tested this way of installing gtk with gtk2hs, so > > feedback is appreciated. > > This should work so long as you use their gtk 2.4 installer. Also you > only need the developer version since it includes the runtime libraries > too. The installer gives you the option of registering environment vars > and installing development header files which you must do. You can also > opt to install glade which is nice if you intend to use windows as your > development platform. > > Note that all users who wish to compile Haskell programs using gtk2hs > will need the developer package for gtk since ghc sometimes needs to > look at the C header files (like when compiling via C and functions get > inlined). They should not need to install mingw since ghc installs all > the standard mingw header files. (We should test this however.) > > If you want to distribute a compiled Haskell program using gtk2hs to > other people then they should only need the gtk runtime package. I originally thought we could create an .msi that includes all gtk libraries since it would be easier for the user to install. But if there is a package with all gtk headers and glade, I suppose that's easier. I'll try to compile again. Maybe I figure out where my problem was. Thanks for the effort, Axel. |
From: Duncan Coutts <duncan.coutts@wo...> - 2005-02-08 09:03:16
|
On Tue, 2005-02-08 at 08:52 +0000, Axel Simon wrote: > I originally thought we could create an .msi that includes all gtk > libraries since it would be easier for the user to install. But if there > is a package with all gtk headers and glade, I suppose that's easier. Yes, I was quite impressed with it. The only way it could be better is if they supplied msi merge modules so we could make our own msi installer. We may want to do our own msi installer anyway at some point. I don't think their installer is very complicated and at least we can use their thing as a guide for telling us what to install and how to lay out the files appropriately. Duncan |
From: Duncan Coutts <duncan.coutts@wo...> - 2005-02-08 19:21:34
|
On Mon, 2005-02-07 at 16:22 +0000, Duncan Coutts wrote: > All, > > A tarball for gtk2hs-0.9.7.1_rc1 is now available from our web page: > > http://gtk2hs.sf.net/gtk2hs-0.9.7.1_rc1.tar.gz > > Please test this on your windows boxes. Report any issues to this list. So I can confirm that it builds against Gtk+ 2.4 using the nice installer available at http://gladewin32.sf.net/ Also, I've uploaded a rather experimental binary version. http://gtk2hs.sf.net/gtk2hs-0.9.7.1_rc1.win32.zip It should work with the above version of Gtk+ and should not require mingw/msys to be installed. Installation consists of installing Gtk+ from the website above (dev version, 2.4 or maybe 2.6 would work too) downloading and unzipping gtk2hs-0.9.7.1_rc1.win32.zip and running "Register Gtk2Hs.bat" to register the packages with GHC. -------- and now some more developer notes... Axel was quite right about the -fnative-struct/-mms-bitfields issue. I did not hit the problem before since I compiled without optimisations (which does not go via C). When one does an ordinary build you do get the problem. Until the next release candidate is uploaded you can avoid the issue like so: ./configure --disable-gnome --disable-mozilla --with-hcflags="-O -optc--mms-bitfields" make make install (We may need to add this into the HSCFLAGS too, I'm not sure yet) Another issue that I am concerned about is that when we build from source we use the mingw header files but when ghc compiles via C it uses it's own private version of mingw's header files. My worry is that we might get binary compatibility problems if the two versions do not match exactly. It might be possible to build using ghc's version of mingw gcc and its header files. It's hard to tell if it's worth the bother since we don't really know if it'll be a problem - windows is supposed to have pretty good binary compatibility after all. Duncan |
From: Axel Simon <A.Simon@ke...> - 2005-02-08 20:26:54
|
On Tue, 2005-02-08 at 19:22, Duncan Coutts wrote: > So I can confirm that it builds against Gtk+ 2.4 using the nice > installer available at http://gladewin32.sf.net/ > Also, I've uploaded a rather experimental binary version. > > http://gtk2hs.sf.net/gtk2hs-0.9.7.1_rc1.win32.zip > > Cool. Maybe I install that instead rather than building it on my own :-) > -------- > and now some more developer notes... > > Axel was quite right about the -fnative-struct/-mms-bitfields issue. I > did not hit the problem before since I compiled without optimisations > (which does not go via C). When one does an ordinary build you do get > the problem. > > Until the next release candidate is uploaded you can avoid the issue > like so: > > ./configure --disable-gnome --disable-mozilla --with-hcflags="-O -optc--mms-bitfields" > make > make install This is bad I think. I try to describe how it was done in the old build system. Last time I nearly wrote a reply to you with similar content but then stopped that since I wasn't sure if it was correct. But this is my recollection: - ghc compiles code with gcc struct layout. Back then I thought this is the only way since ghc might include some ghc headers with bit fields in structures. It wouldn't hurt to include gtk.h with gcc struct layout since no fields in structures would be accessed in the C source. - c2hs should do function bindings and no (or trivial) value marshalling. Since only functions are called where structures are not passed by value it should be fine. - hsc2hs converts it's input to C which should be compiled with microsoft struct layout. Hence all accesses to Gtk structures would follow windows conventions just like the gtk dlls do. - The bad thing happened when everything was compiled via C because ghc would include gtk.h with gcc struct layout which was then caught by a wrapper macro around gtk_init that checked that microsoft struct layout was used. That's why there was a wingtk.h include file that undefined that macro and then included gtk.h If ghc doesn't care with whether it's own header files are included with microsoft or gcc structure layout, then you can just add the -optc--mms-bitfields option to the HC_FLAGS when building on windows. Maybe we should ask on the ghc mailing list. Hope this helps, Axel. |