OCPWin Installation Instructions

Download the zip archive of the OCPWin distribution you want. You can now install several versions at the same time.

We advise to install Git Windows and use the Git Bash utility to get a better environment that cmd/powershell. The instructions below use the syntax of Git Bash, but can easily be translated to cmd/powershell.

Step 1 : Extract The Content of the Archive

Create a directory to store the switches:

mkdir ~/AppData/Roaming/OCamlPro
mkdir ~/AppData/Roaming/OCamlPro/OCPWin

Extract the content of the archive:

cd ~/AppData/Roaming/OCamlPro/OCPWin
unzip -x ~/ocpwin64-20160113-4.01.0+ocp1-msvc64.zip

Step 2: Register the new switch

OCPWin uses a utility called ocpwin.exe to manage itself. Use it to register OCPWin in the Windows registry, using the -in argument:

cd ~/AppData/Roaming/OCamlPro/OCPWin
cd 4.01.0+ocp1-msvc64-20160113
./ocpwin -in

This should register this OCPWin distribution location, update the external PATH so that the executables from this distribution are used by default. You can prevent PATH modification by adding the -no-switch argument to ocpwin.

Step 3: Build Camlp4 for 4.01.0 versions

Camlp4 was removed from 4.02.1, but is still available in the 4.01.0 distribution of OCPWin. To activate it, use the following command from inside the installation directory:

./build-camlp4

It should compile many executables. You can check afterwards that camlp4.exe as appeared in the bin sub-directory.

Step 4: Check that everything is ok

Start a new terminal and call ocamlc -v to check that it correctly executes. If yes, you are done !

Uninstall Steps: Uninstalling an OCPWIn switch

To uninstall, you need to first unregister the switch, and then remove the directory:

cd ~/AppData/Roaming/OCamlPro/OCPWin cd 4.01.0+ocp1-msvc64-20160113 ./ocpwin -un cd .. rm -rf 4.01.0+ocp1-msvc64-20160113

Note the -un argument to ocpwin.exe to uninstall instead of -in to install.