package dkml-install-runner
Runner executable for Diskuv OCaml (DKML) installation
Install
Dune Dependency
Authors
Maintainers
Sources
v0.1.0.tar.gz
md5=9c2fc122d49103ce9bf513fcc11b443d
sha512=c746d7a4482109c725bfe44542c146914add4d77e8e76556ce0de6e2567683a7ac7dc9909f1252aea7facbcf130153b8e752607a3c44e35b8cfd8ea5d99eb356
doc/src/dkml-install-runner.user/dkml_install_runner_user.ml.html
Source file dkml_install_runner_user.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
open Dkml_install_register open Dkml_install_api open Dkml_install_runner.Cmdliner_runner open Dkml_install_runner.Error_handling.Monad_syntax module Term = Cmdliner.Term let default_cmd = let doc = "the OCaml CLI user installer" in let sdocs = Cmdliner.Manpage.s_common_options in let exits = Term.default_exits in let man = help_secs in ( Term.(ret (const (fun _log_config -> `Help (`Pager, None)) $ setup_log_t)), Term.info "dkml-install-user-runner" ~version:"%%VERSION%%" ~doc ~sdocs ~exits ~man ) (** Install all non-administrative CLI subcommands for all the components. Even though all CLI subcommands are registered, setup.exe (setup_main) will only ask for some of the components if the --component option is used. *) let component_cmds ~reg ~target_abi = let selector = Component_registry.All_components in Dkml_install_runner.Error_handling.continue_or_exit (let* install_user_cmds, _fl = Component_registry.eval reg ~selector ~fl:Dkml_install_runner.Error_handling.runner_fatal_log ~f:(fun cfg -> let module Cfg = (val cfg : Component_config) in Cfg.install_user_subcommand ~component_name:Cfg.component_name ~subcommand_name:(Fmt.str "install-user-%s" Cfg.component_name) ~fl:Dkml_install_runner.Error_handling.runner_fatal_log ~ctx_t:(ctx_for_runner_t ~target_abi Cfg.component_name reg)) in let* uninstall_user_cmds, _fl = Component_registry.reverse_eval reg ~selector ~fl:Dkml_install_runner.Error_handling.runner_fatal_log ~f:(fun cfg -> let module Cfg = (val cfg : Component_config) in Cfg.uninstall_user_subcommand ~component_name:Cfg.component_name ~subcommand_name:(Fmt.str "uninstall-user-%s" Cfg.component_name) ~fl:Dkml_install_runner.Error_handling.runner_fatal_log ~ctx_t:(ctx_for_runner_t ~target_abi Cfg.component_name reg)) in return (install_user_cmds @ uninstall_user_cmds)) let main ~target_abi = (* Initial logger. Cmdliner evaluation of setup_log_t (through ctx_t) will reset the logger to what was given on the command line. *) let (_ : Log_config.t) = Dkml_install_runner.Cmdliner_runner.setup_log None None in Logs.info (fun m -> m "Installing user-permissioned components with target ABI %s" (Context.Abi_v2.to_canonical_string target_abi)); (* Get all the available components *) let reg = Component_registry.get () in let open Dkml_install_runner.Error_handling in Component_registry.validate reg; Term.( exit @@ catch_and_exit_on_error ~id:"f59b4702" (fun () -> eval_choice ~catch:false default_cmd (help_cmd :: component_cmds ~reg ~target_abi)))
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>