Module Oui.Installer_configSource

Sourcetype exec_file = {
  1. path : string;
  2. deps : bool;
}
Sourcetype man_section =
  1. | Man_dir of string
  2. | Man_files of string list
Sourcetype manpages = {
  1. man1 : man_section;
  2. man2 : man_section;
  3. man3 : man_section;
  4. man4 : man_section;
  5. man5 : man_section;
  6. man6 : man_section;
  7. man7 : man_section;
  8. man8 : man_section;
}
Sourcetype plugin = {
  1. name : string;
  2. app_name : string;
  3. plugin_dir : string;
  4. lib_dir : string;
  5. dyn_deps : string list;
}
Sourcetype plugin_dirs = {
  1. plugins_dir : string;
  2. lib_dir : string;
}
Sourcetype vars = {
  1. install_path : string;
}
Sourcetype expanded_manpages = (string * string list) list

Manpages as association list from man section name to list of manpages

Sourcetype ('manpages, 'string_with_vars) t = {
  1. name : string;
    (*

    Package name used as product name. Deduced from opam file

    *)
  2. fullname : string;
  3. version : string;
    (*

    Package version used as part of product name. Deduced from opam file

    *)
  4. exec_files : exec_file list;
    (*

    Filenames of bundled .exe binary.

    *)
  5. manpages : 'manpages option;
    (*

    Paths to manpages, split by sections.

    *)
  6. environment : (string * 'string_with_vars) list;
    (*

    Environement variables to set/unset in Windows terminal on install/uninstall respectively.

    *)
  7. unique_id : string;
    (*

    Unique ID in reverse DNS format. Used by macOS and Wix backends. Deduced from fields maintainer and name in opam.

    *)
  8. plugins : plugin list;
    (*

    List of plugins for external applications within the bundle.

    *)
  9. plugin_dirs : plugin_dirs option;
    (*

    Paths to directories in the bundle where external plugin should be installed.

    *)
  10. wix_manufacturer : string;
    (*

    Product manufacturer. Deduced from field maintainer in opam file

    *)
  11. wix_description : string option;
    (*

    Package description. Deduced from opam file

    *)
  12. wix_tags : string list;
    (*

    Package tags, used by WiX.

    *)
  13. wix_icon_file : string option;
    (*

    Icon filename, used by WiX. Defaults to our data/images/logo.ico file.

    *)
  14. wix_dlg_bmp_file : string option;
    (*

    Dialog bmp filename, used by WiX. Default to our data/images/dlgbmp.bmp

    *)
  15. wix_banner_bmp_file : string option;
    (*

    Banner bmp filename, used by WiX. Defaults to our data/images/bannrbmp.bmp

    *)
  16. wix_license_file : string option;
}

User provided installer configuration. Describes the package, the content of the bundle and the paths to some external files such as wix icons. First parameter describes the type of manpages to allow both a JSON friendly format and one easy to work with internally. Second parameter allows the user representation to contain non expanded variables and the internal one to contain expanded strings.

Sourcetype internal = (expanded_manpages, string) t
Sourceval check_and_expand : bundle_dir:OpamFilename.Dir.t -> vars:vars -> user -> (internal, [> `Inconsistent_config of string list ]) result * string list

Checks that directories and files specified in the given config exist with the right permissions. Returns a pair made of the expanded config or the list of errors and a list of warnings. In the expanded config, variables are substituted and manpages expanded into a list of man section names paired with the list of files for each of them by expanding Man_dir "dir" into the list of files within "dir".

Sourceval manpages_of_expanded : expanded_manpages -> manpages

Converts an association list to a manpage record, do not use on user provided data, only on trusted sources.

  • raises [Invalid_argument

    msg] on invalid or duplicate keys.

Sourceval load : OpamFilename.t -> (user, [> `Invalid_config of string ]) result
Sourceval save : user -> OpamFilename.t -> unit