This is an interface module for the Reltool application.
Reltool is a release management tool. It analyses a given Erlang/OTP installation and determines various dependencies between applications. The graphical frontend depicts the dependencies and enables interactive customization of a target system. The backend provides a batch interface for generation of customized target systems.
The tool uses an installed Erlang/OTP system as input. root_dir is the root directory of the analysed system and it defaults to the system executing reltool. Applications may also be located outside root_dir. lib_dirs defines additional library directories where applications additional may reside and it defaults to the the directories listed by the operating system environment variable ERL_LIBS. See the module code for more info. Finally single modules and entire applications may be read from Escripts.
Some configuration parameters control the behavior of Reltool on system (sys) level. Others provide control on application (app) level and yet others are on module (mod) level. Module level parameters overrides application level parameters and application level parameters overrides system level parameters. Escript escript level parameters overrides system level parameters.
The following top level options are supported:
Besides the already mentioned source parameters root_dir and lib_dirs, the following system (sys) level options are supported:
On application (escript) level,the following options are supported:
On application (app) level,the following options are supported:
On module (mod) level,the following options are supported:
options() = [option()]
option() = {config, config() | file()}
| {trap_exit, bool()}
| {wx_debug, term()}
config() = {sys, [sys()]}
sys() = {root_dir, root_dir()}
| {lib_dirs, [lib_dir()]}
| {profile, profile()}
| {erts, app()}
| {escript, escript_file(), [escript()]}
| {app, app_name(), [app()]}
| {mod_cond, mod_cond()}
| {incl_cond, incl_cond()}
| {boot_rel, boot_rel()}
| {rel, rel_name(), rel_vsn(), [rel_app()]}
| {relocatable, relocatable()}
| {app_file, app_file()}
| {debug_info, debug_info()}
| {incl_sys_filters, incl_sys_filters()}
| {excl_sys_filters, excl_sys_filters()}
| {incl_app_filters, incl_app_filters()}
| {excl_app_filters, excl_app_filters()}
| {incl_archive_filters, incl_archive_filters()}
| {excl_archive_filters, excl_archive_filters()}
| {archive_opts, [archive_opt()]}
app() = {vsn, app_vsn()}
| {mod, mod_name(), mod()}
| {mod_cond, mod_cond()}
| {incl_cond, incl_cond()}
| {debug_info, debug_info()}
| {app_file, app_file()}
| {incl_sys_filters, incl_sys_filters()}
| {excl_sys_filters, excl_sys_filters()}
| {incl_app_filters, incl_app_filters()}
| {excl_app_filters, excl_app_filters()}
| {incl_archive_filters, incl_archive_filters()}
| {excl_archive_filters, excl_archive_filters()}
| {archive_opts, [archive_opt()]}
mod() = {vsn, app_vsn()}
| {incl_cond, incl_cond()}
| {debug_info, debug_info()}
rel_app() = app_name()
| {app_name(), app_type()}
| {app_name(), [incl_app()]}
| {app_name(), app_type(), [incl_app()]}
app_name() = atom()
app_type() = permanent | transient | temporary | load | none
app_vsn() = string()
archive_opt = zip_create_opt()
boot_rel() = rel_name()
app_file() = keep | strip | all
debug_info() = keep | strip
dir() = string()
escript() = {incl_cond, incl_cond()}
escript_file() = file()
excl_app_filters() = regexps()
excl_archive_filters() = regexps()
excl_sys_filters() = regexps()
file() = string()
incl_app() = app_name()
incl_app_filters() = regexps()
incl_archive_filters() = regexps()
incl_cond() = include | exclude | derived
incl_sys_filters() = regexps()
lib_dir() = dir()
mod_cond() = all | app | ebin | derived | none
mod_name() = atom()
profile() = development | embedded | standalone
re_regexp() = string()
reason() = string()
regexps() = [re_regexp()] | {add, [re_regexp()]} | {del, [re_regexp()]}
rel_file() = term()
rel_name() = string()
rel_vsn() = string()
relocatable = boolean()
root_dir() = dir()
script_file() = term()
server() = server_pid() | options()
server_pid() = pid()
target_dir() = file()
window_pid() = pid()
create_target(Server, TargetDir) -> ok | {error, Reason}
Types:
Server = server()
TargetDir = target_dir()
Reason = reason()
Create a target system. Gives the same result as {ok,TargetSpec}=reltool:get_target_spec(Server) and reltool:eval_target_spec(TargetSpec,RootDir,TargetDir).
eval_target_spec(TargetSpec, RootDir, TargetDir) -> ok | {error, Reason}
Types:
TargetSpec = target_spec()
RootDir = root_dir()
TargetDir = target_dir()
Reason = reason()
Create the actual target system from a specification generated by reltool:get_target_spec/1. The creation of the specification for a target system is performed in two steps. In the first step a complete specification will be generated. It will likely contain much more files than you are interested in in your target system. In the second step the specification will be filtered according to your filters. There you have the ability to specify filters per application as well as system wide filters. You can also select a profile for your system. Depending on the profile, different default filters will be used.
The top directories bin, releases and lib are treated differently from other files. All other files are by default copied to the target system. The releases directory contains generated rel, script, and boot files. The lib directory contains the applications. Which applications that are included and if they should be customized (archived, stripped from debug info etc.) is specified with various configuration parameters. The files in the bin directory are copied from the erts-vsn/bin directory, but only those files that was originally included in bin directory of the source system.
If the configuration parameter relocatable was set to true there is no need to install the target system with reltool:install/2 before it can be started. In that case the file tree containing the target system can be moved without re-installation.
get_config(Server) -> {ok, Config} | {error, Reason}
Types:
Server = server()
Config = config()
Reason = reason()
Get reltool configuration. Shorthand for reltool:get_config(Server,false,false).
get_config(Server, InclDefaults, InclDerived) -> {ok, Config} | {error, Reason}
Types:
Server = server()
InclDefaults = incl_defaults()
InclDerived = incl_derived()
Config = config()
Reason = reason()
Get reltool configuration. Normally, only the explicit configuration parameters with values that differs from their defaults are interesting. But the builtin default values can be returned by setting InclDefaults to true. The derived configuration can be return by setting InclDerived to true.
get_rel(Server, Relname) -> {ok, RelFile} | {error, Reason}
Types:
Server = server()
RelName = rel_name()
RelFile = rel_file()
Reason = reason()
Get contents of a release file. See rel(4) for more details.
get_script(Server, Relname) -> {ok, ScriptFile | {error, Reason}
Types:
Server = server()
RelName = rel_name()
ScriptFile = script_file()
Reason = reason()
Get contents of a boot script file. See script(4) for more details.
get_server(WindowPid) -> {ok, ServerPid} | {error, Reason}
Types:
WindowPid = window_pid()
ServerPid = server_pid()
Reason = reason()
Return the process identifier of the server process.
get_target_spec(Server) -> {ok, targetSpec} | {error, Reason}
Types:
Server = server()
TargetSpec = target_spec()
Reason = reason()
Return a specification of the target system. The actual target system can be created with reltool:eval_target_spec/3.
install(Server, TargetDir) -> ok | {error, Reason}
Types:
Server = server()
TargetDir = target_dir()
Reason = reason()
Install a created target system
start() -> {ok, WindowPid} | {error, Reason}
Types:
WindowPid = window_pid()
Reason = reason()
Start a main window process with default options
start(Options) -> {ok, WindowPid} | {error, Reason}
Types:
Options = options()
WindowPid = window_pid()
Reason = reason()
Start a main window process with options
start_link(Options) -> {ok, WindowPid} | {error, Reason}
Types:
Options = options()
WindowPid = window_pid()
Reason = reason()
Start a main window process with options. The process is linked.
start_server(Options) -> {ok, ServerPid} | {error, Reason}
Types:
Options = options()
ServerPid = server_pid()
Reason = reason()
Start a server process with options. The server process identity can be given as argument to several other functions in the API.
stop(Pid) -> ok | {error, Reason}
Types:
Pid = server_pid() | window_pid()()
Reason = reason()
Stop a server or window process