I’m pleased to announce that DkML Install API 0.4.0 is available on opam. This library is what I’ve been using to create the DkML Windows distribution installer.
TLDR: To create your own installer for your own software, you define “components” which have dependencies on other components. A component is an OCaml module you create with four essential functions: admin_install
and admin_uninstall
for escalated privileges, and user_install
and user_uninstall
for normal user privileges. Each component almost always needs to access assets which can be defined in the install:[]
section of an .opam
file. The net effect is you can use opam and OCaml to define your own reproducible installer.
There is a walk-through at https://diskuv.github.io/dkml-install-api/doc/packages/Console.html and more general documentation at https://github.com/diskuv/dkml-install-api#readme
The library works well for the DkML Windows distribution, although it is too complicated to recommend for casual use today. Regardless, if someone has a burning desire to create their own installer, and that installer has reasonably complex logic that needs to run on the end-user machine, then take a look at DkML Install API! Expect to see a steady but slow series of changes to the API until it hits 1.0.0.
Limitations: Today it can make an end-to-end installer for Windows. I haven’t needed yet to create macOS and Linux installers, although 95% of the pieces are present. If you are interested in creating the final packaging step for those OS-es (ex. a .deb
apt packager for Debian), feel free to contribute a PR!