Está en la página 1de 4

=============================================================

Installation Instructions for OCaml & Eclipse & OcaIDE plugin


=============================================================
==============
Windows
==============
* Ocaml:
- Download OCaml installer 4.02.1 from
http://protz.github.io/ocaml-installer/
- This executable will also install Cygwin.
* Eclipse:
- Download Eclipse from:
https://www.eclipse.org/downloads/
( choose Eclipse IDE for Java Developers
or Eclipse IDE for C/C++ Developers )
- Eclipse requires JVM to run. So please install JRE from
http://www.oracle.com/technetwork/java/javase/downloads/index.html
* OcaIDE (http://www.algo-prog.info/ocaide/):
- To install OcaIDE as a plugin of Eclipse,
+ Open Eclipse, click on Help > Install New Software...
+ Enter http://www.algo-prog.info/ocaide/ as the update site.
+ Check the OcaIDE category or feature in the list.
+ Then, click Next twice, accept the agreement and click Finish.
+ The plug-in then downloads... It can take a while depending on
your connection speed.
+ Accept the installation (the plug-in is not digitally signed),
and restart Eclipse when it asks you to.
+ As soon as Eclipse is restarted, you can start using the plug-in.
- You can access the online help by clicking on Help > Help Contents
in the Eclipse main menu, and choosing OCaml Development User Guide
in the list of available topics.
- Video tutorials:
http://www.algo-prog.info/ocaide/tutorials.php
* Configuration
- Suppose cygwin is installed in c:/cygwin/bin
+ Add c:/cygwin/bin to the "Path" variable.
+ How to do it. Please see instructions at
"Set the path and environment variables in Windows"
http://www.computerhope.com/issues/ch000549.htm
- Open cygwin terminal and locate setting paths
$ where ocaml
-- Suppose the result is C:\OCaml\bin\ocaml.exe
-- This means OCaml binaries are in C:\OCaml\bin
$ ocamlc -where
-- Suppose the result is C:\OCaml\lib
-- This means OCaml libraries are in C:\OCaml\lib
$ where make
-- Suppose the result is C:\cygwin\bin\make.exe
-- This means make executable is C:\cygwin\bin\make.exe
- Then, configure paths accordingly:
+ Open Eclipse, click Window > Preferences > OcaIDE > Paths

+ Change "OCaml Binaries Directory" to C:\OCaml\bin


Then click Apply
+ Set C:\cygwin\bin\make.exe for "make"
+ Set C:\OCaml\lib for "OCaml lib path"
- Set OCaml perspective:
+ Window > Perspective > Open Perspective > Other
+ Choose OCaml
==============
Linux (ubuntu)
==============
* Install JVM from
http://www.oracle.com/technetwork/java/javase/downloads/index.html
* Install Eclispe from https://www.eclipse.org/downloads/
* Install OCaml using command line
- Open terminal
- Type
$ sudo apt-get install ocaml
* Install OcaIDE plugin for Eclipse from
http://www.algo-prog.info/ocaide/
* Configuration
May refer to Windows configuration as above.
==============
Mac OS X
==============
* Ocaml:
- Step 1: Check if you have already installed XCode
at the folder /Developer/Applications/XCode
If so, jump to Step 3.
- Step 2: Download and install XCode (~1.8GB) from:
https://developer.apple.com/downloads
(Please note that for this step you need to sign in using
your Apple ID and password. It is the same login information
that you use for other Apple services such as iTunes or
Apple Online Store. Also, you might be required to registered
as an apple developer, if you have not yet done that)
- Step 3: Install the binary distribution for Mac OS X from
http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.1-intel.dmg
- Step 4: Test if you have properly installed OCaml on your machine:
+ Open a terminal and type:
$ which ocaml
(For example, the result is /usr/local/bin/ocaml)
* ECLIPSE:
- Download Eclipse from:
https://www.eclipse.org/downloads/
( choose Eclipse IDE for Java Developers or
Eclipse IDE for C/C++ Developers )
- Eclipse requires JVM to run. So please install JRE from

http://www.oracle.com/technetwork/java/javase/downloads/index.html
* OCAIDE (http://www.algo-prog.info/ocaide/):
- To install OcaIDE as a plugin of Eclipse,
+ Open Eclipse, click on Help > Install New Software...
+ Enter http://www.algo-prog.info/ocaide/ as the update site.
+ Check the OcaIDE category or feature in the list.
+ Then, click Next twice, accept the agreement and click Finish.
+ The plug-in then downloads... It can take a while depending on
your connection speed.
+ Accept the installation (the plug-in is not digitally signed),
and restart Eclipse when it asks you to.
+ As soon as Eclipse is restarted, you can start using the plug-in.
- You can access the online help by clicking on Help > Help Contents
in the Eclipse main menu, and choosing OCaml Development User Guide
in the list of available topics.
- Video tutorials:
http://www.algo-prog.info/ocaide/tutorials.php
* Configuration:
May refer to Windows instructions.

=================================================================
Last Year instructions
Alternative Mac Ocaml instruction using OcamlBrew (from Andreea)
=================================================================
This should be the necessary steps to install ocaml:
- Step 1: make sure you have the most recent version of macports
$ sudo port -v selfupdate
$ port upgrade outdated
- Step 2: make sure you have "curl" installed on your machine:
$ which curl
(For example, the result is /opt/local/bin/curl)
** If "curl" is not installed on your machine run the following command
(it might take a while to get installed):
$ sudo port install curl
- Step 3: make sure you have "m4" installed on your machine:
$ which m4
(For example, the result is /usr/bin/m4)
** If "m4" is not installed on your machine run the following command:
$ sudo port install m4
- Step 4: Install Ocaml:
$ curl -kL
https://raw.github.com/hcarty/ocamlbrew/master/ocamlbrew-install | env
OCAMLBREW_FLAGS="-r" bash
- Step 5: at the end of ocaml installation, ocamlbrew will provided you with
information about how to set your ocaml environment. It will be something
similar to, for example:

"...........................
You may want to add the following line to your ~/.bashrc
so that OCaml is readily available to use:
source /Users/nus/ocamlbrew/ocaml-4.00.1/etc/ocamlbrew.bashrc
"
Please open ~/.bashrc with your favorite editor
(create the file if it does not exists),
and copy the above command inside the file, for example:
source /Users/nus/ocamlbrew/ocaml-4.00.1/etc/ocamlbrew.bashrc
Save, close ~/.bashrc the and run the following command in your terminal:
$ source ~/.bashrc

También podría gustarte