Windows
Installing from the binary installer
The Catala team maintains a binary, .msi Windows installer for public releases
of Catala that installs the whole toolchain and modifies your $PATH
environment variable to make the tools accessible in your terminal or from your
code editor. The installer also detects if you have VSCode and automatically
installs the Catala VSCode extension for it.
Download the latest Windows installer for Catala
Alternative method: installing from sources
Getting Opam
Open a PowerShell and install opam by invoking
$ Invoke-Expression "& { $(Invoke-RestMethod https://opam.ocaml.org/install.ps1) }"
If an unexpected error occurs, try another opam installation method as
listed on the OCaml on Windows official webpage.
Then, initialize opam:
$ opam init -c 4.14.2
Getting Catala
Currently, the opam Catala package is not directly buildable on
Windows. However, the Catala’s lsp server bundles a subset of Catala
which is fine. This may be installed with the following command
$ opam install catala.1.3.0 catala-lsp.1.3.0
If the installation step fails to find the “ninja” tool, you may install it using winget.
In a powershell, type winget install Ninja-build.Ninja as described
here.
Setting up the Catala LSP server
After the previous step, the Catala LSP server should be built in
opam‘s binaries directory. In order for VS Code to be able to get it,
this directory must be added to Windows’ PATH environment variable.
To change the PATH environment variable, follow these
instructions.
The directory in question should be located in
%LOCALAPPDATA%\opam\default\bin (n.b., default might be named
something else such as “4.14.2”, double-check the directory location).
Getting the VS Code extension
Install VS Code and open it. Browse the extension marketplace and
install the Catala extension.