Module Oui.SystemSource

Sourceexception System_error of string

Exception that is launched by command when proccess terminates with non-zero exit code status. Contains command's output.

Sourcetype wix = {
  1. wix_files : string list;
  2. wix_exts : string list;
  3. wix_out : string;
}

Configuration options for wix command as a part of WiX tools. Consists of input files, extensions to be used and output file path.

Sourcetype makeself = {
  1. tar_extra : string list;
  2. archive_dir : OpamFilename.Dir.t;
  3. installer : OpamFilename.t;
  4. description : string;
  5. startup_script : string;
}

makeself script arguments

Sourcetype cygpath_out = [
  1. | `Win
    (*

    Path Windows

    *)
  2. | `WinAbs
    (*

    Absolute Path Windows

    *)
  3. | `Cyg
    (*

    Path Cygwin

    *)
  4. | `CygAbs
    (*

    Absolute Path Cygwin

    *)
]

Expected output path type

Sourcetype install_name_tool_args = {
  1. change_from : string;
    (*

    Original dylib path to replace

    *)
  2. change_to : string;
    (*

    New dylib path

    *)
  3. binary : OpamFilename.t;
    (*

    Binary to modify

    *)
}

Arguments for install_name_tool command

Sourcetype codesign_args = {
  1. binary : OpamFilename.t;
    (*

    Binary to sign

    *)
  2. identity : string;
    (*

    Signing identity: "-" for ad-hoc, or certificate name

    *)
  3. force : bool;
  4. timestamp : bool;
    (*

    Add timestamp

    *)
  5. entitlements : string option;
    (*

    Optional path to entitlements file

    *)
}

Arguments for codesign command

Sourcetype codesign_verify_args = {
  1. binary : OpamFilename.t;
    (*

    Binary to verify

    *)
  2. verbose : bool;
}

Arguments for codesign verify command

Sourcetype pkgbuild_args = {
  1. root : OpamFilename.Dir.t;
    (*

    Root directory to package

    *)
  2. identifier : string;
    (*

    Package identifier (reverse-DNS format)

    *)
  3. version : string;
    (*

    Package version

    *)
  4. install_location : string;
    (*

    Installation path

    *)
  5. scripts : OpamFilename.Dir.t option;
    (*

    Optional scripts directory

    *)
  6. output : OpamFilename.t;
    (*

    Output .pkg file

    *)
}

Arguments for pkgbuild command

Sourcetype productbuild_args = {
  1. package : OpamFilename.t;
    (*

    Component package to wrap

    *)
  2. output : OpamFilename.t;
    (*

    Output .pkg file

    *)
}

Arguments for productbuild command

Sourcetype patchelf_args =
  1. | Set_rpath of {
    1. rpath : string;
    2. binary : OpamFilename.t;
    }

Arguments for patchelf command

Sourcetype touch_args = {
  1. mtime : string;
  2. file : string;
}
Sourcetype _ command =
  1. | Which : string command
    (*

    which command, to check programs availability

    *)
  2. | Ldd : string command
    (*

    ldd command to get binaries .so paths

    *)
  3. | Otool : string command
    (*

    otool command to get binaries dylib paths on macOS

    *)
  4. | Cygpath : (cygpath_out * string) command
    (*

    cygpath command to translate path between cygwin and windows and vice-versa

    *)
  5. | Wix : wix command
  6. | Makeself : makeself command
    (*

    makeself command to generate linux installer.

    *)
  7. | Chmod : (int * OpamFilename.t) command
  8. | InstallNameTool : install_name_tool_args command
    (*

    install_name_tool command to modify dylib paths in macOS binaries

    *)
  9. | Codesign : codesign_args command
    (*

    codesign command to sign macOS binaries and app bundles

    *)
  10. | CodesignVerify : codesign_verify_args command
    (*

    codesign --verify command to verify code signatures

    *)
  11. | Pkgbuild : pkgbuild_args command
    (*

    pkgbuild command to create macOS component packages

    *)
  12. | Productbuild : productbuild_args command
    (*

    productbuild command to create macOS installer packages

    *)
  13. | Patchelf : patchelf_args command
  14. | Touch : touch_args command
    (*

    touch command to change files timestamps

    *)

External commands that could be called and handled by oui.

Sourceval call : 'a command -> 'a -> string list

Calls given command with its arguments and parses output, line by line. Raises System_error with command's output when command exits with non-zero exit status.

Sourceval call_unit : 'a command -> 'a -> unit

Same as call but ignores output.

Sourceval call_list : ('a command * 'a) list -> unit

Same as call_unit, but calls commands simultaneously.

Sourceval cyg_win_path : cygpath_out -> string -> string

Performs path translations between Windows and Cygwin. See System.cygpath_out for more details.

Sourceval normalize_path : string -> string

Resolve absolute path in the current system's format (Cygwin or Win32).

Sourceval path_str : OpamFilename.t -> string

Convert safely path from OpamFilename.t

Sourceval path_dir_str : OpamFilename.Dir.t -> string

Convert safely path from OpamFilename.Dir.t

Sourcemodule type FILE_INTF = sig ... end
Sourceval resolve_path : OpamFilter.env -> (module FILE_INTF with type t = 'a) -> string -> 'a
Sourceval resolve_file_path : OpamFilter.env -> string -> OpamFilename.t
Sourceval maybe_exe : dir:OpamFilename.Dir.t -> path:string -> string

On Windows, returns path.exe if dir:path.exe exists. Otherwise return path.