# setup-dkml

Everything in this folder except this README.md is auto-generated by `setup-dkml`.

The documentation for `setup-dkml` is at https://github.com/diskuv/dkml-workflows#readme.

Bug reports go to https://github.com/diskuv/dkml-workflows/issues

## FAQ

### What is the workflow to update the generated files?

Use the following to update the generated code:

```bash
opam update
make update-dkml
```

Of course that only works if there are updates available.
And it will only do updates for the latest OCaml compiler.

### Can we test more than one OCaml compiler?

Technically no; `setup-dkml` follows the supported OCaml compiler of DKML. What
we've done in this project is rename the directories that supported the older
DKML versions (`4.12.1`). Essentially, the older DKML versions are frozen and
will no longer get updates. You may want to eventually drop the older DKML
versions by removing those directories and removing those versions from
`workflow.yml`.

### What is the version of MSVC targeted? What is the required environment to execute the `desktop-ci-*` targets in the main `Makefile`?

There is no "target" per se. The CI machine (or your developer machine) is queried for all MSVC versions, and any versions that are known to be compatible with OCaml are used.
The precise definition is `Get-CompatibleVisualStudios` at https://github.com/diskuv/dkml-runtime-distribution/blob/main/src/windows/Machine/Machine.psm1; that package is available for common use in the central Opam repository.

The compatible versions as of 2022-11-23 are Visual Studio 2019 with
a) Windows 10 SDK (10.0.18362.0) and b) MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.25) or (v14.26).

*Advanced: Machine.psm1 has notes why other MSVC 2019 versions are not compatible with OCaml*

More importantly, just running it will show what is on the system and what Visual Studio components are missing (if any).
