From a00351fb0db8d68ebc6714da653d863de1f7ee15 Mon Sep 17 00:00:00 2001 From: Romain Date: Thu, 3 Apr 2025 11:43:05 +0200 Subject: [PATCH] Tobi/Doc: how to compile and install Tobi --- .../src/how_to_compile_and_install_Tobi.md | 49 +++++++++++++++++++ tobi/doc/src/index.md | 4 ++ 2 files changed, 53 insertions(+) create mode 100644 tobi/doc/src/how_to_compile_and_install_Tobi.md diff --git a/tobi/doc/src/how_to_compile_and_install_Tobi.md b/tobi/doc/src/how_to_compile_and_install_Tobi.md new file mode 100644 index 000000000000..8fba359e19cb --- /dev/null +++ b/tobi/doc/src/how_to_compile_and_install_Tobi.md @@ -0,0 +1,49 @@ +# How to compile and install Tobi + +All commands in this guide must be ran from the root of the repository. + +## Prerequisites + +To compile Tobi, you need: + +- [OCaml](https://ocaml.org/) +- [Dune](https://github.com/ocaml/dune) +- [Clap](https://github.com/rbardou/clap) +- [opam-file-format](https://github.com/ocaml/opam-file-format) + +To install them all, run: + + make build-deps + eval $(opam env) + +from the root of the repository. + +## Run Tobi without installing + +Run: + + dune exec tobi -- + +## Install Tobi + +Run: + + dune exec tobi -- install tobi + +This installs Tobi as `_opam/bin/tobi`. + +If Tobi is already installed, you can also run this instead: + + tobi install tobi + +## Run Tobi after installing + +To check that Tobi was installed correctly, run: + + tobi --help + +If this fails with exit code 127, check that `_opam/bin` is in your `PATH`. +This should be the case if you ran `eval $(opam env)`. +You can add it manually with: + + export PATH=$PWD/_opam/bin:$PATH diff --git a/tobi/doc/src/index.md b/tobi/doc/src/index.md index 164a07780fb5..047a1395f685 100644 --- a/tobi/doc/src/index.md +++ b/tobi/doc/src/index.md @@ -8,6 +8,10 @@ after each `git pull`. - [Get familiar with Tobi](get_familiar_with_tobi.md) +## How-to guides + +- [How to compile and install Tobi](how_to_compile_and_install_Tobi.md) + ## Reference ### Help pages -- GitLab