OCaml Universal Installer or oui is a command-line tool that produces
standalone installers for your OCaml applications.
It can produce installers for Linux, Windows and macOS, installing pre-compiled binaries directly, no need to build anything on the target machine.
You won't need to teach your users how to install OCaml, Opam or any other tools that they don't need. Just download and run the installer and you're good to go.
Detailed documentation can be found here.
This project is built on top of opam-wix. The project's original documentation
is still available here.
You can install the latest oui release via opam:
opam install oui
or the development version with:
opam pin oui https://github.com/OCamlPro/ocaml-universal-installer.git#master
oui does still require some opam libraries so you will need opam.2.4.0 or higher.
Producing installers for different platforms requires different extra tools.
They do not need to be installed before oui but need to be available on the
system when running it.
Our linux installers are built using makeself.
The result is a .run self-extracting archive that will decompress itself
and execute an installation script before cleaning up.
To produce linux installer, the makeself script must be in the PATH.
You can dowload the latest official release from the
official makeself website.
We also use patchelf to set the RUNPATH on binaries, allowing oui
or users themselves to embedded shared libraries.
Windows MSI are built using the Wix6 toolkit.
You can install Wix 6 from the GitHub releases page.
To assemble an installer for your current platform you need to provide:
- an installation bundle (a directory containing all binaries and files to
install), usually produced by running
dune build @installanddune install --relocatable --prefix <install-bundle-dir>. - a JSON configuration file for
oui, describing the important parts of the bundle and some project metadata. The format is fully documented here.
You can then run oui lint to check that the configuration and bundle are
consistent.
Once this is good, you can run oui build oui.json <install-bundle-dir> to
generate an installer.