+ 1 Building Felix on Win32

Instructions for building Felix using a "native" Microsoft toolchain.

+ 1.1 Introduction

These notes are concerned with how to build Felix using native Win32 tools (Python, OCaml) and the Microsoft Visual Studio C/C++ compiler and linker.

+ 1.2 Pre-requisites

In summary, what is needed for building Felix is

  * Python 3.2 or better
  * Microsoft Visual Studio 10.0 or better
  * OCaml 3.12 or better

+ 1.2.1 Python

Python-3.2 is the currently supported version for Windows. There is no need to build Python from source. Microsoft installer files (.msi files) providing pre-built binaries for this version in both x86 and x86_64 and variants are available from http://www.python.org.

+ 1.2.2 Microsoft Visual Studio

In the event that you need obtain a copy of the Microsoft Visual Studio toolset, one can download a light, free installation from http://www.microsoft.com. Also required is the Microsoft Windows SDK. This can also be downloaded for free, this time from http://www.microsoft.com/downloads/en/default.aspx.

+ 1.2.3 OCaml

We need an OCaml built using the Microsoft Visual Studio toolchain (msvc). Accordingly you'll need a source distribution for Windows from http://caml.inria.fr. Please take note that the binary distributions of OCaml available from that site have been built using the MinGW toolchain and they are not suitable for our purpose. To build OCaml, a basic Cygwin installation is also required (together with the approriate developer's Cygwin package containing GNU make). Go to http://www.cygwin.com to download and install Cygwin. Further, flexdll version 0.23 or later is needed, available from http://alain.frisch.fr/flexdll.html and TCL/TK version 8.5 binaries available as an ActiveTCL distribution at http://www.activestate.com/products/ActiveTcl/. With these components to hand, building OCaml proceeds by following the detailed instructions provided with the source distribution in the file README.win32.

+ 1.3 Obtaining Felix source

Get the source code from github : https://github.com/felix-lang/felix.

Since development is very active on Felix, it's best to use a git client to get the source code, but you can also download everything as a .zip or .tar.gz file.

github has good tools and tutorials on how to use git, especially if you are not already familiar with it!: https://help.github.com/articles/set-up-git

+ 1.4 Building Felix

Open a Windows command prompt and change directory to the folder you put the source code into.

Run winenv in this folder to set up your PATH and Visual Studio environment variables.

Now you can use fbuild to build felix by running the fbuild\fbuild-light python script.

For example:

  C:\Users\you> cd felix
  C:\Users\you\felix> winenv
  ... some output about environment variables ... 
  C:\Users\you\felix> python fbuild\fbuild-light
  ... build output ...

+ 1.5 Building and executing the Felix test suite

One can build and execute the Felix tests with the command

  python fbuild/fbuild-light test

+ 1.6 Installing Felix

When Felix is built, it can be installed into C:\usr\local\lib\felix\felix-1.1.7dev\ with the command,

  python fbuild\fbuild-light install