Introducing `oui`

At OCamlPro we’re happy to announce our new ongoing project funded by the CEA-List: ocaml-universal-installer or oui!

oui’s goal is to help teams developping applications in OCaml to package them for their users outside the OCaml World by building binary installers for all major platforms: Linux, Windows and macOS.

oui builds standalone installers: you just need to download and run the file. No need to install OCaml, Opam and to compile anything on the target system anymore.

The tool will be used to package and distribute Frama-C and its plugins to non opam users.

It is still in development but we’d like to present it to the community with the hope that it will prove helpful to you as well.

How it works

You take care of building your application and provide oui the list of your binaries and extra files you’d like installed alongside them and it will assemble an installer from those.

It uses different tools and build different types of installers for all three main platfoms:

  • on Linux, we build self extracting archives using makeself.
  • on Windows, we build MSI using the Wix6 toolset
  • on macOS, we build regular OSX installers using pkgbuild/productbuild

We started oui on top of an older but very similar project: opam-wix. opam-wix was an opam plugin used to build a Windows MSI from a locally installed opam package. This feature, though not the core focus of the early development, is still available via opam-oui and will be extended with the ability to build installers for the other supported platforms.

A tool for the community

Though it is initially developped for Frama-C’s distribution, both the CEA-List and ourselves at OCamlPro would like to make oui a community tool that can help open source OCaml developpers ship their applications easily.

The goal of this early announcement is to gather data and feedback on other use cases for binary installers across the OCaml Ecosystem to help us shape oui into the right tool from the start.

This is an ongoing project, if you’d like to follow the development, it is publicly hosted here.

23 Likes

Interesting initiative. It is true that distributing ocaml software to the general public can be a bit of a pain.

It would be nice if the tool can build an installer from an opam package description.

So that, if you know a given software can be installed using opam (for developpers / advanced users), you can create a standalone installer easily for all other users.

1 Like

Cool project, this is something I might be interested in using!

Is there a way to add additional custom scripts to the installation, to e.g. install additional non-OCaml components? I couldn’t find any references to this on the repo.

So cool! Is there a plan to have oui create brew/apt/other ocaml-independent packages for CLI tools? Not quite versed in the complexity of universal installers, so I’m not sure if that could be in scope or not.

Side joke: After oui and owi I’d suggest carrément or deouf as future project names for OCamlPro, to continue with the “yes in french with various level of excitement” nomenclature

3 Likes

This is partly what the opam plugin version does/will do. I’d love to have a more involved “frontend” to the tool that reads the .opam or dune files in your repo and uses this to both build the binaries and assemble an installer but this won’t be our initial focus as we want the tool to also work for projects that have constraints which cannot be satisfied easily with those tools first.

We’d like to avoid incorporating scripts initially and try to capture the main usecases via the CLI or config files but we might have to resort to that. Installing non-OCaml components is part of the contract as we’ll use this to install Frama-C newest GUI: ivette which is written in Typescript. The tool will also be able to embed shared libraries and other such common cases that lie outside the pure OCaml world.

Not at first unfortunately. Distribution packages are fairly constrained and complex to build. We chose a different approach here to ensure portability across linux distribution and supporting .deb or .rpm is out of the scope for now.

1 Like