Chapter 10. Self-extracting releases

Erlang.mk allows you to package Relx releases as
self-extracting archives. These archives contain all the
files in the release and come in the form of a script that
will extract and run the release automatically.

This allows you to package the release as a single file
that can then be executed.

This feature is currently experimental. Feedback is much
appreciated.

10.1. Generating the self-extracting archive

To generate a self-extracting release, all you need to do
is pass the SFX=1 variable to Make when you build the
release:

$ make SFX=1

This will create a self-extracting archive in
$RELX_OUTPUT_DIR/<name>.run. For example if the release
is named hello_world and $RELX_OUTPUT_DIR is the default,
the file will be located at _rel/hello_world.run.