package dkml-install-runner

  1. Overview
  2. Docs

Module Dkml_install_runner.Cmdliner_runnerSource

module Arg = Cmdliner.Arg
module Cmd = Cmdliner.Cmd
module Term = Cmdliner.Term
Sourceval help : [> `Pager ] as 'a -> string list -> string option -> [> `Error of bool * string | `Help of 'a * string option | `Ok of unit ]
Sourceval help_secs : [> `P of string | `S of string ] list
Sourceval setup_log : Fmt.style_renderer option -> Logs.level option -> Dkml_install_api.Log_config.t
Sourceval setup_log_t : Dkml_install_api.Log_config.t Term.t
Sourceval quote : string -> string
Sourceval err_no : string -> string -> string
Sourceval err_not_dir : string -> string
Sourceval raw_pp_str : Format.formatter -> string -> unit
Sourceval raw_dir : (string -> [> `Error of string | `Ok of string ]) * (Format.formatter -> string -> unit)
Sourceval prefix_dir_t : Fpath.t Term.t
Sourceval exec_dir : Fpath.t

Directory containing dkml-package.bc or whatever executable (perhaps a renamed setup.exe in a non-bin folder) is currently running.

Sourceval enduser_archive_dir : unit -> Fpath.t Dkml_install_api.Forward_progress.t

The root directory that was uncompressed at end-user install time

Sourceval staging_default_dir_for_package : archive_dir:Fpath.t -> Fpath.t

staging_default_dir_for_package ~archive_dir. For the benefit of Windows and macOS we keep the directory name ("sg") small.

Sourceval static_default_dir_for_package : archive_dir:Fpath.t -> Fpath.t

static_default_dir_for_package ~archive_dir. For the benefit of Windows and macOS we keep the directory name ("st") small.

Sourceval staging_files_opt_t : string option Cmdliner.Term.t
Sourceval static_files_opt_t : string option Cmdliner.Term.t
Sourceval opam_context_opt_t : string option Cmdliner.Term.t

staging_files_source_for_package_t is the setup.exe/uninstall.exe Term.t for the staging files directory. It defaults to the sibling directory "staging".

static_files_source_for_package_t is the setup.exe/uninstall.exe Term.t for the static files directory. It defaults to the sibling directory "static".

Sourceval unwrap_progress_t : default:'a -> 'a Dkml_install_api.Forward_progress.t Term.t -> 'a Term.t
Sourceval unwrap_progress_nodefault_t : 'a Dkml_install_api.Forward_progress.t Term.t -> 'a Term.t

ctx_for_runner_t component_name reg creates a user.exe/admin.exe Term for component component_name that sets up logging and any other global state, and defines the context record.

The package (setup.exe/uninstall.exe) will typically use sudo on Unix or gsudo on Windows to elevate the privileges of `admin.exe`. However it is very unlikely that the environment variables are propagated from the user (setup.exe) to the elevated process (admin.exe). So the staging directory must be specified (`No_staging_default`) when the runner user.exe/admin.exe is launched.

That is, the user process setup.exe can pass its environment variable OPAM_SWITCH_PREFIX (if specified with the no argument `--opam-context` option of setup.exe) into the staging directory argument for admin.exe.

ctx_for_package_t component_name reg creates a setup.exe/uninstall.exe Term for component component_name that sets up logging and any other global state, and defines the context record.

Unlike ctx_for_runner_t the expectation is that setup.exe/uninstall.exe will be directly launched by the user and have access to the user's environment variables, especially OPAM_SWITCH_PREFIX. So the no argument --opam-context option of setup.exe can default to OPAM_SWITCH_PREFIX.

Unlike ctx_for_runner_t the staging directory has a default (`Staging_default_dir`) based on relative paths from setup.exe.

Sourceval component_selector_t : install_direction:Dkml_install_register.install_direction -> string list Cmdliner.Term.t
Sourceval common_runner_args : log_config:Dkml_install_api.Log_config.t -> prefix_dir:Fpath.t -> staging_files_source:Path_location.staging_files_source -> string array
Sourceval help_cmd : unit Cmd.t
Sourceval eval_progress : unit Dkml_install_api.Forward_progress.t Cmd.t -> Cmd.Exit.code
OCaml

Innovation. Community. Security.