Module Dkml_install_api.Default_component_config

Default values for a subset of the module type Component_config.

val install_depends_on : string list

install_depends_on are the components, if any, that this component depends on during installation.

Dependencies will be installed in topological order.

val uninstall_depends_on : string list

uninstall_depends_on are the components, if any, that this component depends on during uninstallation.

Dependencies will be uninstalled in reverse topological order.

val install_user_subcommand : component_name:string -> subcommand_name:string -> fl:Forward_progress.fatal_logger -> ctx_t:Dkml_install_api__.Types.Context.t Cmdliner.Term.t -> unit Cmdliner.Cmd.t Forward_progress.t

install_user_subcommand ~component_name ~subcommand_name ~ctx_t defines a subcommand that should be added to dkml-install-runner.exe that, when invoked, will install the component with non-privileged user permissions.

~component_name: This will correspond to the component name defined in the full Component_config module type.

~subcommand_name: Typically but not always the subcommand name is "install-user-" ^ component_name.

~fl: A fatal logger used whenver there is an error requiring the process to exit.

~ctx_t: A Cmdliner term that sets up common options and delivers a context record. The common options include options for logging. The context record is described at Dkml_install_api.

You must include the ctx_t term in your returned Term.t * Cmd.info, as in:

let execute_install ctx =
  Format.printf
    "We can run bytecode using: %s@\n"
    (ctx.Dkml_install_api.Context.path_eval "%{ocamlrun:share-abi}/bin/ocamlrun")

let install_user_subcommand ~component_name ~subcommand_name ~fl ~ctx_t =
  let doc = "Install the pieces that don't require Administrative rights" in
  Dkml_install_api.Forward_progress.Continue_progress (Cmdliner.Cmd.(v (info subcommand_name ~doc) (const execute_install $ ctx_t)), fl)

Your Term.t function (install_user_subcommand ctx) should raise Installation_error for any unrecoverable failures.

val uninstall_user_subcommand : component_name:string -> subcommand_name:string -> fl:Forward_progress.fatal_logger -> ctx_t:Dkml_install_api__.Types.Context.t Cmdliner.Term.t -> unit Cmdliner.Cmd.t Forward_progress.t

uninstall_user_subcommand ~component_name ~ctx_t defines a subcommand that should be added to dkml-install-runner.exe that, when invoked, will uninstall the component with non-privileged user permissions.

~component_name: This will correspond to the component name defined in the full Component_config module type.

~subcommand_name: Typically but not always the subcommand name is "uninstall-user-" ^ component_name.

~fl: A fatal logger used whenver there is an error requiring the process to exit.

~ctx_t: A Cmdliner term that sets up common options and delivers a context record. The common options include options for logging. The context record is described at Dkml_install_api.

You must include the ctx_t term in your returned Term.t * Cmd.info, as in:

  let execute_uninstall ctx =
    Format.printf
    "We can run bytecode using: %s@\n"
    (ctx.Dkml_install_api.Context.path_eval "%{ocamlrun:share-abi}/bin/ocamlrun")

let uninstall_user_subcommand ~component_name ~subcommand_name ~fl ~ctx_t =
    let doc = "Uninstall the pieces that don't require Administrative rights" in
  Dkml_install_api.Forward_progress.Continue_progress (Cmdliner.Cmd.(v (info subcommand_name ~doc) (const execute_uninstall $ ctx_t)), fl)

Your Term.t function (uninstall_user_subcommand ctx) should raise Installation_error for any unrecoverable failures.

val needs_install_admin : ctx:Dkml_install_api__.Types.Context.t -> bool

needs_install_admin ~ctx should inspect the environment and say true if and only if the install_admin_subcommand is necessary.

ctx will be a minimal context that does not have access to other components.

val needs_uninstall_admin : ctx:Dkml_install_api__.Types.Context.t -> bool

needs_uninstall_admin should inspect the environment and say true if and only if the install_admin_subcommand is necessary.

ctx will be a minimal context that does not have access to other components.

val install_admin_subcommand : component_name:string -> subcommand_name:string -> fl:Forward_progress.fatal_logger -> ctx_t:Dkml_install_api__.Types.Context.t Cmdliner.Term.t -> unit Cmdliner.Cmd.t Forward_progress.t

install_admin_subcommand ~component_name ~subcommand_name ~fl ~ctx_t defines a subcommand that should be added to dkml-install-runner.exe that, when invoked, will install the component with privileged administrator (`root` or `sudo` on Unix) permissions.

~component_name: This will correspond to the component name defined in the full Component_config module type.

~subcommand_name: Typically but not always the subcommand name is "install-admin-" ^ component_name.

~fl: A fatal logger used whenver there is an error requiring the process to exit.

~ctx_t: A Cmdliner term that sets up common options and delivers a context record. The common options include options for logging. The context record is described at Dkml_install_api.

You must include the ctx_t term in your returned Term.t * Cmd.info, as in:

let execute_install_admin ctx =
  Format.printf
  "We can run bytecode using: %s@\n"
  (ctx.Dkml_install_api.Context.path_eval "%{ocamlrun:share-abi}/bin/ocamlrun")

let install_admin_subcommand ~component_name ~subcommand_name ~ctx_t =
  let doc = "Install the pieces requiring Administrative rights" in
  Dkml_install_api.Forward_progress.Continue_progress (Cmdliner.Cmd.(v (info subcommand_name ~doc) (const execute_install_admin $ ctx_t)), fl)

Your Term.t function (execute_install_admin ctx) should raise Installation_error for any unrecoverable failures.

val uninstall_admin_subcommand : component_name:string -> subcommand_name:string -> fl:Forward_progress.fatal_logger -> ctx_t:Dkml_install_api__.Types.Context.t Cmdliner.Term.t -> unit Cmdliner.Cmd.t Forward_progress.t

uninstall_admin_subcommand ~component_name ~ctx_t defines a subcommand that should be added to dkml-install-runner.exe that, when invoked, will uninstall the component with privileged administrator (`root` or `sudo` on Unix) permissions.

~component_name: This will correspond to the component name defined in the full Component_config module type.

~subcommand_name: Typically but not always the subcommand name is "uninstall-" ^ component_name.

~fl: A fatal logger used whenver there is an error requiring the process to exit.

~ctx_t: A Cmdliner term that sets up common options and delivers a context record. The common options include options for logging. The context record is described at Dkml_install_api.

You must include the ctx_t term in your returned Term.t * Cmd.info, as in:

let execute_uninstall_admin ctx =
  Format.printf
  "We can run bytecode using: %s@\n"
  (ctx.Dkml_install_api.Context.path_eval "%{ocamlrun:share-abi}/bin/ocamlrun")

let uninstall_admin_subcommand ~component_name ~subcommand_name ~fl ~ctx_t =
  let doc = "Install the pieces requiring Administrative rights" in
  Dkml_install_api.Forward_progress.Continue_progress (Cmdliner.Cmd.(v (info subcommand_name ~doc) (const execute_uninstall_admin $ ctx_t)), fl)

Your Term.t function (execute_uninstall_admin ctx) should raise Installation_error for any unrecoverable failures.

val test : unit -> unit

test () is reserved for unit testing; it should do nothing in real code