简体   繁体   English

如何将偏航作为带有钢筋的OTP版本的一部分使用?

[英]How to use yaws as a part of an OTP release with rebar?

I have closely followed the rebar documentation regarding the dependencies management and release handling and tried to create a release similar to the one described in the accepted answer to one of my previous questions. 我密切关注了有关依赖项管理发行版处理的钢筋文档,并尝试创建一个类似于我先前问题之一的已接受答案中所述的发行版。

However, I can not make yaws to be included as an OTP application inside an OTP Release generated by rebar. 但是,我无法使偏航包含在由钢筋生成的OTP版本中作为OTP应用程序。

Here is what I do: 这是我的工作:

  • create a release as per official rebar documenation (done, a simple gen_server can be run with /rel/myapp/bin/myapp start) 根据官方钢筋文档创建发行版(完成后,可以使用/ rel / myapp / bin / myapp start运行简单的gen_server)
  • specify the yaws dependency in the rebar.config file in the project directory 在项目目录的rebar.config文件中指定偏航角依赖关系
  • run rebar get-deps (this pulls yaws and ibrowse) 运行rebar get-deps (这会拉动偏航和ibrowse)
  • add this to reltool.config : {app, yaws, [{incl_cond, include}]} 将此添加到reltool.config{app, yaws, [{incl_cond, include}]}
  • add yaws to the list of applications in myapp.app.src 将偏航添加到myapp.app.src中的应用程序列表
  • rebar compile generate : rebar compile generate

... ==> Leaving directory '/myapp/deps/yaws/rel' ==> yaws (compile) yaws.erl:13: can't find include file "yaws_appdeps.hrl" yaws.erl:220: undefined macro 'YAWS_APPDEPS' yaws.erl:174: function start_app_deps/0 undefined yaws.erl:194: function start_app_deps/0 undefined ERROR: Command [compile] failed!

Notes: 笔记:

  • The official yaws documentation does not seem to be very explanatory regarding this matter. 关于此问题,官方的偏航文档似乎不是很解释。

  • If I change yaws to cowboy, I do not get such an error. 如果我将偏航更改为牛仔,我不会得到这样的错误。

Update 更新

Here is my directory structure: 这是我的目录结构:

. ├── apps │ └── myapp ├── deps │ ├── ibrowse │ └── yaws └── rel └── files

Open the the src directory of yaws. 打开yaws的src目录。 The missing 'yaws_appdeps.hrl' include file may likely have a '.ini' or 'in' extension. 缺少的“ yaws_appdeps.hrl”包含文件可能具有扩展名“ .ini”或“ in”。 Remove that and compile again 删除并重新编译

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM