There are several ways to compile and distribute OCaml on Windows. This installer will:
- install OCaml, findlib and flexdll
- (optional) install Emacs with the caml-mode setup and the right file associations in the Windows explorer,
- (optional) install ActiveTCL so that OCamlBrowser and labltk can work properly
- (optional) launch the cygwin setup with the right packages pre-configured so that you have a working OCaml development environment.
The full story
See my entry on the Gagallium blog for the full details. Long story short: this is a 32-bit build with the gcc compiler from the mingw-w64 project.
- The compiler binaries (ocamlc, ocamlopt, etc.) are compiled with mingw-w64: they are native windows programs.
- ocamlopt generates native windows programs: ocamlopt depends on mingw-w64.
- Cygwin is used as a development environment, because it packages mingw-w64 (needed for ocamlopt to work properly), as (needed for ocamlopt) and other Unix tools required by ocamlbuild and others.
- However, the mingw-w64 compilers are native windows programs. Cygwin is only used because it has all the unix utilities and a package management system.
If you already have Cygwin installed, just make sure the following packages are present: curl, make, mingw64-i686-gcc-g++, mingw64-i686-gcc, patch, rlwrap, libreadline6, diffutils. Some of these are required for odb to work properly.
The installer has been tested on Windows XP, Windows 7, Windows 8.
- OCaml 4.00.1 -- previous version of OCaml
- OCaml 3.12.1 -- no longer supported (this will destroy your PATH if it is longer than 1024 bytes), see the old version of this page for instructions
- Don't override the PATH variable anymore
- Switch to the latest i686-mingw32-w64 toolchain (the 32-bit compiler from the mingw-w64 project)
- findlib is now packaged and properly configured
- Make it possible to install OCaml as a non-privileged user
- Better cleanups when uninstalling
The project lives on GitHub. Please file any bug in the "Issues" section there.
The README there should contain enough information to get you (roughly) started if you want to repackage the installer yourself.