Dkml_install_runner.Cmdliner_runner
val setup_log :
Fmt.style_renderer option ->
Logs.level option ->
Dkml_install_api.Log_config.t
val setup_log_t : Dkml_install_api.Log_config.t Term.t
val create_context :
install_direction:Path_eval.Global_context.install_direction ->
staging_default:Path_location.staging_default ->
target_abi:Dkml_install_api.Context.Abi_v2.t ->
string ->
Dkml_install_register.Component_registry.t ->
Dkml_install_api.Log_config.t ->
Fpath.t ->
string option ->
string option ->
Dkml_install_api.Context.t Dkml_install_api.Forward_progress.t
Directory containing dkml-package.bc or whatever executable (perhaps a renamed setup.exe in a non-bin folder) is currently running.
val enduser_archive_dir : unit -> Fpath.t Dkml_install_api.Forward_progress.t
The root directory that was uncompressed at end-user install time
staging_default_dir_for_package ~archive_dir
. For the benefit of Windows and macOS we keep the directory name ("sg") small.
static_default_dir_for_package ~archive_dir
. For the benefit of Windows and macOS we keep the directory name ("st") small.
val staging_files_source_for_package_t :
Path_location.staging_files_source Dkml_install_api.Forward_progress.t 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".
val static_files_source_for_package_t :
Path_location.static_files_source Dkml_install_api.Forward_progress.t Term.t
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".
val unwrap_progress_t :
default:'a ->
'b Dkml_install_api.Forward_progress.t Term.t ->
'c Term.t
val unwrap_progress_nodefault_t :
'a Dkml_install_api.Forward_progress.t Term.t ->
'b Term.t
val ctx_for_runner_t :
install_direction:Path_eval.Global_context.install_direction ->
target_abi:Dkml_install_api.Context.Abi_v2.t ->
string ->
Dkml_install_register.Component_registry.t ->
Dkml_install_api.Context.t 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.
val ctx_for_package_t :
install_direction:Path_eval.Global_context.install_direction ->
target_abi:Dkml_install_api.Context.Abi_v2.t ->
string ->
Dkml_install_register.Component_registry.t ->
Dkml_install_api.Context.t Term.t
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.
val to_selector :
string list ->
Dkml_install_register.Component_registry.component_selector
val component_selector_t :
install_direction:Path_eval.Global_context.install_direction ->
string list Cmdliner.Term.t
val common_runner_args :
log_config:Dkml_install_api.Log_config.t ->
prefix:Fpath.t ->
staging_files_source:Path_location.staging_files_source ->
string array
val eval_progress :
unit Dkml_install_api.Forward_progress.t Cmd.t ->
Cmd.Exit.code