将Erlang OTP应用程序与其他依赖关系组合到单个单元应用程序中 [英] Combining an Erlang OTP application with other dependencies into a single unit application

查看:276
本文介绍了将Erlang OTP应用程序与其他依赖关系组合到单个单元应用程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将已创建的erlang OTP应用程序与其依赖关系集成到一个单元中,以便在单元启动时,所有内容(进程)都将在幕后开始。

How to integrate an already created erlang OTP application with its dependencies into a single unit so that when the unit is started everything(processes) get started behind the scene?

推荐答案

您在 .app中指定其他应用程序您的应用程序取决于,例如此示例<一>。然后,使用 reltool:create_target / 2 ,像这个例子。该功能将发布的定义视为参数,如在这个文件。当Erlang VM启动发行版时,它以正确的顺序启动所有应用程序。

You specify in the .app file which other applications your application depends on, like in this example. Then you build a release using reltool:create_target/2 like in this example. That function takes the definition of a release as a parameter which looks something like in this file. When Erlang VM boots the release it starts all the applications in the correct order.

有几个第三方工具可以使创建发布更容易,如 rebar relx 疯狂 erlang.mk builderl (最后没有文档一个尚未被我之前指出的应用程序使用。

There are a few third-party tools that make creating releases easier, like rebar, relx, mad, erlang.mk, or builderl (no documentation in the last one yet, used by the application that I pointed out earlier).

这篇关于将Erlang OTP应用程序与其他依赖关系组合到单个单元应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆