package lablgtk3-sourceview3

  1. Overview
  2. Docs
OCaml interface to GTK+

Install

Dune Dependency

Authors

Maintainers

Sources

3.0.beta4.tar.gz
sha256=06341059585a4376addbf12f286ec3bcc88c17b9ff993fb37ef9fa4c68e848cf
md5=f177750ce750e627fe6871bd43325a89

README.win32.html

README.win32

        Here is a small howto about installing LablGtk2 on Win32

Binary installation

 The binary distribution includes the lablrsvg, and
 lablgnomecanvas libraries.

0) Both MSVC and mingw versions of ocaml 3.11 should work.
   If you want to do custom linking (either ocamlc -custom, or ocamlopt),
   get a recent version of flexdll. Standard ocamlc linking only
   requires dlls.

1) Install the gtk2 libraries and dependencies.
   This binary distribution was built using the "bundle" package at
     ftp://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/
   (mirrors list at: ftp://ftp.gnome.org/pub/gnome/MIRRORS)
   Just follow the instructions in the README file inside the package.
   If you want to use the extension libraries (currently
   lablrsvg and lablgnomecanvas are supported), you must also install
   the (numerous) dependencies. Here is what was used during
   compilation:
    libgnomecanvas-2.30.1 (requires libart_lgpl)
    librsvg-2.32.1 (requires libcroco and libgsf)
    gtksourceview-2.10
   If you want to do custom linking, you need also the dev packages.
   All of these are available in the above win32 and
   win32/dependencies directories.
   The distribution was compiled using the gtk+ bundle of 20120208,
   but other versions should work too.

   After unzipping all those archives in a common location (e.g. c:\Gtk),
   it may be a good idea to go to c:\Gtk\bin and run
      chmod +x *.dll
   as some of the exta DLL's do not have the execution flag set.

   Also, do not forget to add this binary directory to your path.
   Open Control Panel/User account/Environment variables, and edit
   either the personal or system variable Path to add c:\Gtk\bin.
   If you cannot modify system variables directly, you can override
   them by adding a fresh variable to your own environment:
   	Variable name:	  Path
	Value:	 	  c:\Gtk\bin;%Path%

2) Install lablgtk2 binaries and scripts inside the OCaml distribution
     bin/*             	     -> bin
     lib/site-lib/lablgtk2   -> lib/site-lib/lablgtk2
   Then edit lib/ld.conf, and add the line
     <path to ocaml>\lib\site-lib\lablgtk2

3) If your distribution is newer than 4.00.0, go to the
   lib/site-lib/lablgtk2 directory and execute

        ocaml build.ml

   You must also do that everytime you update your OCaml distribution.
   This will recompile the ocaml part of the library (the C part is
   already compiled.)
   It may fail on the native code version (using ocamlopt) if the
   assembler is not on your path.  Look in the Objective Caml windows
   documentation for what is needed, and check that you have a working
   installation by compiling and linking a trivial program.
   Note also that the autodection for mingw is not fool-proof
   (lablgtk2 has to be installed at the expected location), so
   if the OCaml port annouced by build.ml is not the right one, you
   should specify it by hand inside build.ml.

4) Test in examples
     lablgtk2 testgtk.ml

   See also the "Windows port" section of the main LablGtk2 README for
   important remarks on threads on Windows.

5) For custom linking or native code, you need to use the export
   libraries in the above DLL package. There is not default place to
   put them, so you should specify that at link time:
     ocamlopt -ccopt "-LC:/gtk/lib" -I +lablgtk2 lablgtk.cmxa \
         gtkInit.cmx testgtk.ml -o testgtk.exe
   Again, if this fails you must make sure that your ocamlopt really works,
   and that all paths are correctly specified.


Full compilation with MSVC or mingw (for the brave)

0) You will need the MSVC or mingw version of ocaml 3.11 or more,
  and cygwin development tools. You must also install flexdll
  (at least 0.7) from
       http://alain.frisch.fr/flexdll.html
  (Flexdll is already included in the OCaml 4.00.0 installer)

1) Install Gtk 2: use the precompiled binaries available at 

     ftp://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/

  This time you need the developper version.
  Do NOT even try to compile it yourself from scratch.

  Try to compile a small hello-gtk.c (see the tutorial page on 
  http://www.gtk.org) before going further.

  You may unzip optional libraries available from 
    http://ftp.gnome.org/pub/gnome/binaries/win32
  in c:\GTK.
  For example to have GtkSourceView 1 support, you have to unzip : 
   libgnomeprint-dev.xxx.zip
   libgnomeprint.xxx.zip
   libart_gpl-dev.xxx.zip
   libart_gpl-dev.xxx.zip
   libxml2-dev.xxx.zip
   libxml2.xxx.zip
   win_iconv_dll-tml-xxx.zip
   gtksourceview-dev.1.xxx.zip
   gtksourceview.1.xxx.zip

  If you need to check that all dependencies are installed, use
   pkg-config --libs gtksourceview-1.0
  and see if an error is reported.

3) For MSVC, copy config.make.msvc to config.make, and edit it
   to set GTKROOT.

   On Mingw you should be able to run the configure script:
	./configure --disable-gtktest

   If you do want to perform configuration time Gtk C tests the define
   CYGWIN=nobinmode before running ./configure. 
   The rationale behind CYGWIN=nobinmode is that pkg-config is a
   native windows program which outputs \r\n instead of usual unix \n.
   The CYGWIN variable forces the shell to strip down all \r from
   command answers. (But the tests may still fail for other reasons.)

4) Simply do "make" and "make opt" for the native version.

5) Install ("make install" or "make old-install") and test.
OCaml

Innovation. Community. Security.