From eba1ece8d123cab16b357ea43a8dfc75a959ae0a Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Mon, 20 Aug 2012 15:46:19 +0200 Subject: [reltool] Add documentation for option 'excl_lib' --- lib/reltool/doc/src/reltool.xml | 48 +++++++++++++++++++++++++++++++++++++++++ lib/reltool/src/reltool.hrl | 4 +++- 2 files changed, 51 insertions(+), 1 deletion(-) (limited to 'lib/reltool') diff --git a/lib/reltool/doc/src/reltool.xml b/lib/reltool/doc/src/reltool.xml index 9a4e2d130e..9b43640d83 100644 --- a/lib/reltool/doc/src/reltool.xml +++ b/lib/reltool/doc/src/reltool.xml @@ -221,6 +221,52 @@ system.

+ excl_lib + +

This option is experimental.

+

If the excl_lib option is set to otp_root + then reltool will not copy anything from the Erlang/OTP + installation ($OTP_ROOT) into the target structure. The goal + is to create a "slim" release which can be used together with + an existing Erlang/OTP installation. The target structure will + therefore only contain a lib directory with the + applications that were found outside of $OTP_ROOT (typically + your own applications), and a releases directory with + the generated .rel, .script and .boot + files.

+ +

When starting this release, three things must be specified:

+ + Which releases directory to use + Tell the release handler to use the releases + directory in our target structure instead of + $OTP_ROOT/releases. This is done by setting the SASL + environment variable releases_dir, either from the + command line (-sasl releases_dir + <target-dir>/releases) or in + sys.config. + + Which boot file to use + The default boot file is $OTP_ROOT/bin/start, + but in this case we need to specify a boot file from our + target structure, typically + <target-dir>/releases/<vsn>/<RelName>. This + is done with the -boot command line option to + erl + + The location of our applications + The generated .script (and .boot) file uses the + environment variable $RELTOOL_EXT_LIB as prefix for + the paths to all applications. The -boot_var option + to erl can be used for specifying the value of this + variable, typically -boot_var RELTOOL_EXT_LIB + <target-dir>/lib. + + +

Example:

+

erl -sasl releases_dir \"mytarget/releases\" -boot mytarget/releases/1.0/myrel -boot_var RELTOOL_EXT_LIB mytarget/lib

+
+ incl_sys_filters

This parameter normally contains a list of regular @@ -452,6 +498,7 @@ app() = {vsn, app_vsn()} | {incl_cond, incl_cond()} | {debug_info, debug_info()} | {app_file, app_file()} + | {excl_lib, excl_lib()} | {incl_sys_filters, incl_sys_filters()} | {excl_sys_filters, excl_sys_filters()} | {incl_app_filters, incl_app_filters()} @@ -477,6 +524,7 @@ escript() = {incl_cond, incl_cond()} escript_file() = file() excl_app_filters() = regexps() excl_archive_filters() = regexps() +excl_lib() = otp_root excl_sys_filters() = regexps() file() = string() incl_app() = app_name() diff --git a/lib/reltool/src/reltool.hrl b/lib/reltool/src/reltool.hrl index c0736bb4c8..f0d8b38519 100644 --- a/lib/reltool/src/reltool.hrl +++ b/lib/reltool/src/reltool.hrl @@ -79,6 +79,7 @@ | {debug_info, debug_info()} | {app_file, app_file()} | {profile, profile()} + | {excl_lib, excl_lib()} | {incl_sys_filters, incl_sys_filters()} | {excl_sys_filters, excl_sys_filters()} | {incl_app_filters, incl_app_filters()} @@ -123,6 +124,7 @@ -type incl_defaults() :: boolean(). -type incl_derived() :: boolean(). -type status() :: missing | ok. +-type excl_lib() :: otp_root. -record(common, { @@ -233,7 +235,7 @@ rels :: [#rel{}], emu_name :: emu_name(), profile :: profile(), - excl_lib :: otp_root, + excl_lib :: excl_lib(), incl_sys_filters :: [#regexp{}], excl_sys_filters :: [#regexp{}], incl_app_filters :: [#regexp{}], -- cgit v1.2.3