[wg-windows] Interim solution for OPAM on Windows

David Allsopp dra-news at metastack.com
Wed Sep 16 08:45:50 BST 2015


Jonathan Protzenko wrote:
> David's email reminded me that I forgot to tell the world about this
> horrible hack that I did a while ago.
> 
> http://protz.github.io/ocaml-installer/ now offers an installer with OPAM.
> The toolchain is the usual one (native compilers / generating native
> windows programs / using mingw64 32-bit compilers). However, the installer
> now installs an "opam" program in c:\ocaml\bin. The opam program is a
> *cygwin 32-bit binary*, so it only works within a cygwin 32-bit terminal.
> I got as far as doing "opam init" and "opam install a-whole-bunch-of-
> packages", including mezzo and all its dependencies, batteries, and a
> couple others.
> 
> All in all, I hope it'll provide a good enough interim solution until
> David finishes everything and I can, eventually, retire my installer :).

It's not (necessarily) the case that the installer would want retiring (but it may well change shape, especially where installing Cygwin is concerned). OPAM expects the system already to have an OCaml compiler (usually installed by the operating system's package manager) - one of the minor changes I have yet to make is to relax this requirement for OPAM on Windows, as it is less reasonable.

However, the existence of the "system" switch means I was imagining that there would still want to be an installer which installs OCaml (and OPAM) "for all users". Apart from anything else, it would improve the first-time OCaml user's experience as installing OPAM on a system without OCaml must necessarily add a 10 minute or so delay while OPAM builds OCaml.


David


More information about the wg-windows mailing list