Traditional standalone OCaml 5.2.0 setup program for Windows 10

Currently, there’s no way to install latest version of OCaml (5.2.0) on Windows 10 easily (like Python).

It will be extremely helpful for beginners if a simple standalone/offline OCaml 5.2.0 setup program is provided similar to the setup program provided by fdopen (Andreas Hauptmann) · GitHub (OCaml for Windows - Installation) for older OCaml version two years ago.

“easily” is of course subjective, but winget install opam followed by opam init does install OCaml 5.2.0 on Windows 10 and 11.

opam 2.2.0~beta3 is still going through approval for winget, but once it’s there one is also able to:

winget install opam Cygwin.Cygwin
C:\cygwin64\bin\mintty -
opam init

which gives an final experience almost identical to the old OCaml for Windows (that is, opam driven from a Cygwin bash terminal)

5 Likes

By “easily,” I meant:

  1. The user will go to the OCaml website and download the GUI setup program (e.g., ocaml-v5.2.0-win64.exe) from the download page and run it.

  2. Agree to the licensing terms by clicking the ‘I agree’ button on the installer window.

  3. Set the installation directory and click “Install” button.

  4. After waiting for a few minutes, the installer will say, “Congratulations! The OCaml programming language was successfully installed on your computer.”