|
From: Axel S. <si...@co...> - 2010-05-24 18:49:55
|
diffing dir...
Mon May 24 14:47:58 EDT 2010 Axe...@in...
* Update INSTALL document and insert comment as to why we have a special case for windows in hsgthread.c.
{
hunk ./INSTALL 3
+Contents:
+
+* Overview
+* Building
+* Building form darcs
+* Running the demos
+* Documentation
+* Deinstallation
+* Building on Windows
+
+Overview
+--------
+
hunk ./INSTALL 20
-* tools (Tools to build gtk2hs)
-* glib (GLib2 library)
-* gio (VFS library)
-* cairo (Vector graphics library)
-* pango (Unicode text rendering)
-* gtk (GTK+ GUI toolkit)
-* gconf (GConf2 configuration system)
-* glade (libglade UI loader)
-* gstreamer (Media codec library)
-* gtkglext (Gtk+ OpenGL extension)
+* tools (Tools to build gtk2hs)
+* glib (GLib2 library)
+* gio (VFS library)
+* cairo (Vector graphics library)
+* pango (Unicode text rendering)
+* gtk (GTK+ GUI toolkit)
+* gconf (GConf2 configuration system)
+* glade (libglade UI loader)
+* gstreamer (Media codec library)
+* gtkglext (Gtk+ OpenGL extension)
hunk ./INSTALL 31
-* svgcairo (Cairo SVG loader)
-* vte (Terminal emulator)
-* webkit (WebKit rendering engine)
-* soegtk (Graphics library for book "The Haskell School of Expression")
+* svgcairo (Cairo SVG loader)
+* vte (Terminal emulator)
+* webkit (WebKit rendering engine)
+* soegtk (Graphics library for book "The Haskell School of Expression")
hunk ./INSTALL 37
-* gnomevfs (replaced by gio)
-* mozembed (replaced by webkit)
-* sourceview (replaced by gtksourceview2)
+* gnomevfs (replaced by gio)
+* mozembed (replaced by webkit)
+* sourceview (replaced by gtksourceview2)
hunk ./INSTALL 46
-These instructions are about building Gtk2Hs from source. If you would rather
-install a binary (pre-compiled) package, please check the Gtk2Hs web site:
-your distribution may also provide gtk2hs packages.
+These instructions are about building Gtk2Hs from source. Certain Linux distributions might provide binary packages via their packaging system.
hunk ./INSTALL 53
-So the easiest way to install it is using "cabal-install", eg
-$ cabal install gtk
+So the easiest way to install it is using "cabal-install", eg.:
hunk ./INSTALL 55
-This section assumes that you are building from a darcs checkout or snapshot.
-If you are building on Windows, read "Building on Windows" first.
+cabal install gtk
+
+Building the Gtk2Hs packages requires the installation of some build tools.
+Cabal installs these automatically but you need to have ~/.cabal/bin on your
+PATH since otherwise building the libraries will fail, saying that e.g.
+gtk2hsC2hs cannot be found.
+
+Building on Windows
+--------------------
+
+Installation on Windows is nearly as easy as on Unix platforms. However, you
+need to download the pre-compiled binary libraries of Gtk+ and all it's
+dependent libraries. Point your browser to
+
+http://www.gtk.org/download-windows.html
+
+and download one of the "All-in-one bundles". Note that you do *not* need to
+install MinGW nor MSys but it does not hurt if they are installed on your
+system. Install the binaries by unpacking them into a directory without
+spaces. Again, this is very important:
+
+*** Do not install the binaries into a directory with embedded spaces. ***
+
+Ensure that the /bin directory is added to your %PATH%. You can ensure that
+everything is installed correctly if you can say
+
+pkg-config --cflags gtk+-2.0
+
+and you see some compiler flags that contain the path into which you have
+installed the binary bundle.
+
+You may now install the cabal packages of Gtk2Hs into any directory you like
+(including one that contains embedded spaces). Note that cabal installs the
+tools necessary to build into something like
+
+C:\Documents and Settings\%user%\Application Data\cabal\bin
+
+Make sure that this path is also in your %PATH% variable!
+
+Building on Mac OS X
+--------------------
+
+There is nothing particular about Mac OS X, except that pango 1.26 has a bug
+that makes application seem to hang.
+
+Furthermore, there are libraries that use the native Aqua API as a backend to
+Gdk. It seems that this porting effort has stalled and as of now does not
+support certain features as copy and paste. Use at your own risk.
hunk ./INSTALL 104
-The following assumes that the sources are in ~/gtk2hs.
hunk ./INSTALL 108
+This section assumes that you are building from a darcs checkout or snapshot.
+If you are building on Windows, read "Building on Windows" first.
+
+The following assumes that the sources are in ~/gtk2hs.
+
hunk ./INSTALL 117
-(glib2, pango, gtk2, etc) for all the packages you wish to build.
+(glib-2.0, gio-2.0, pango, cairo, gtk+-2.0) for all the packages you wish to build. You can check the existence by running 'pkg-config --list-all'.
hunk ./INSTALL 137
-the demo/ directory in the gtk2hs source directory. For example:
+the demo/ directory in the respective packages. For example:
hunk ./INSTALL 139
-~/gtk2hs/demo/hello:$ make
+~/gtk2hs/gtk/demo/hello:$ make
hunk ./INSTALL 143
-~/gtk2hs/demo/hello:$ ghc --make World.hs -o helloworld
+~/gtk2hs/gtk/demo/hello:$ ghc --make World.hs -o helloworld
hunk ./INSTALL 147
-~/gtk2hs/demo/hello:$ ./helloworld
+~/gtk2hs/gtk/demo/hello:$ ./helloworld
hunk ./INSTALL 159
-Alternatively, you can uninstall by unregistering the packages with ghc-pkg
-and deleting the installed files. Eg reversing the order in bootstrap.sh:
hunk ./INSTALL 160
-# for pkg in webkit vte svgcairo soegtk gtksourceview2 gtkglext gstreamer glade gconf gtk pango cairo gio glib tools ; \
-> do ghc-pkg unregister $pkg; done
-
-
-Building on Windows
---------------------
+Although cabal doesn't allow to uninstall files at the moment, you can
+unregister the packages with ghc-pkg and delete the installed files manually.
+Eg reversing the order in bootstrap.sh:
hunk ./INSTALL 164
-Install MSYS and MinGW. Download a build of Gtk+, you will need the "dev"
-version which includes all the header files and libraries. Make sure that GHC
-and that pkg-config.exe can find all your Gtk+ libraries. The configure script
-should complain if this is not the case.
+for pkg in webkit vte svgcairo soegtk gtksourceview2 gtkglext gstreamer glade gconf gtk pango cairo gio glib tools ; \
+do ghc-pkg unregister $pkg; done
hunk ./INSTALL 167
+Unregistering packages is usually enough to be able to work with different
+versions of Gtk2Hs.
hunk ./gtk/Graphics/UI/Gtk/General/hsgthread.c 22
- * Also g_static_mutex_lock and g_static_mutex_unlock cause problems ghci
- * on windows so using a Win32 critical section instead
+ * Also g_static_mutex_lock and g_static_mutex_unlock cause linking problems
+ * in ghci on Windows 7 (namely: HSgtk-0.10.5.o: unknown symbol
+ * `__imp__g_threads_got_initialized'), so we use a Win32 critical section
+ * instead.
}
|