OcamIL

Installation notes


Links

Prerequisites

Operating system

Windows 98 or above (Windows XP recommended, Vista not tested).

Microsoft.NET Framework 1.1 Redistributable

You need to download and install Microsoft.NET Framework 1.1 Redistributable, check out .NET Framework downloads page.

You MUST set the %PATH% environment variable in order to make the .NET command-line utilities reachable.

Since the corresponding installation directory is usually C:\WINDOWS\Microsoft.NET\Framework\v1.1.[version], just type ([version]=4322 in the following example):

> set PATH=C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322;%PATH%

Microsoft.NET Framework 1.1 SDK

This is needed by the bootrapped OCamIL compiler and the OCamIL toplevel installation procedure, which requires the gacutil tool. The SDK is also available at .NET Framework downloads page.

You MUST set the %PATH% environment variable in order to make the gacutil tool reachable, for instance (assuming default SDK installation settings):

> set PATH=C:\Program Files\Microsoft.NET\FrameworkSDK\Bin;%PATH%

OCaml v3.06 running under cygwin

First install cygwin on your computer, then download and install OCaml v3.06 from sources following the OCaml distribution notes. The tools make and gcc must be installed with cygwin.

Installation pathes

  • let [CYGWINPATH] be the root of the cygwin installation (ie. C:/cygwin)
  • let [OCAML306] be the root of the untarred OCaml sources (ie. C:/ocaml-3.06)
  • let [CAMILSRC] be the location the unzipped OCamIL source distribution (ie. C:/ocamil.306).
Note: each step requires pristine new OCaml sources. If the sources of OCaml v3.06 were just used to install OCaml under cygwin, then delete and untar again. Likewise, when reaching step 2, delete and untar again in order to compile the bootstrapped compilers from fresh sources.

 

** ALL THE FOLLOWING STEPS MUST TAKE PLACE IN A CYGWIN SESSION **

Step 1: setting up the installation and applying the patch

a) setup OCamIL directories

> cd to [CAMILSRC]

> ./configure -cygwinpath [CYGWINPATH] -ocamlsrcpath [OCAML306]

Example: ./configure -cygwinpath c:/cygwin -ocamlsrcpath c:/ocaml-3.06

Note that by default, the installation folder for camil are:

  • Executables: [CYGWINPATH]/usr/local/bin
  • Libraries: [CYGWINPATH]/usr/local/lib/camil
  • Bootstrapped executables: C:/bscamil/bin
  • Bootstrapped libraries: C:/bscamil/lib
These default values can be changed using additional options of the 'configure' script.

b) apply the patch

> make patch
This will amend the ocaml sources in [OCAML306] to make them compile ocamil. Subsequent steps are to be taken from [CAMILSRC] (DO NOT cd to [OCAML306]!!)

Step 2: camil, ocamilyacc and ojacare.exe (compilation and installation)

This steps produces:
  • ocamil, the ocamil compiler (as caml bytecode, running in the ocaml virtual machine)
  • ocamil libraries (ocaml standard library, graphics, dynlink and thread libraries tuned for ocamil executables)
  • ocamilyacc, a replacement for ocamlyacc for .mly files compiled with ocamil (as caml bytecode, running in the ocaml virtual machine)
  • ojacare.exe, the O'Jacare.net IDL compiler (as caml bytecode, running in the ocaml virtual machine)

a) build

> make all

b) install

> make install

Step 3: camil_bs.exe and ocamiltop.exe (compilation and installation)

This steps produces:
  • ocamil_bs.exe, the ocamil bootstrapped compiler (as MSIL bytecode, running in the CLR)
  • ocamil_bs.exe libraries (bootstrapped versions of ocaml standard library, graphics, dynlink and thread libraries)
  • ocamiltop.exe, the OcamIL toplevel (as MSIL bytecode, running in the CLR)
  • toplevelform.exe, a graphical interface to ocamiltop.exe

a) build

> make bsall

b) install

> make bsinstall

c) install libraries dll to the GAC (glocal assembly cache)

> cd c:/bscamil/lib

> gacutil /i core_camil.dll

> gacutil /i graphics.dll

> gacutil /i dynlink.dll

> gacutil /i threads.dll