Windows编译ejabberd
(金庆的专栏)
安装 erlang OTP. 添加路径到 PATH, 使 erl 可以运行。
git clone ejabberd
安装 rebar:
git clone git@github.com:rebar/rebar.git
E:\Git\rebar>bootstrap.batescript: exception error: no match of right hand side value "找不到 E:\\Git\\rebar\\ebin\\rebar.beam\r\n"
先创建 ebin\rebar.beam。见:https://github.com/rebar/rebar/issues/613
复制生成的 rebar.cmd 到 ejabberd 目录。其实就几行代码:
setlocalset rebarscript=%~f0escript.exe "%rebarscript:.cmd=%" %*
rebar.cmd get-deps
Cloning into 'p1_xmlrpc'...Pulling luerl from {git,"https://github.com/rvirding/luerl",{tag,"v0.2"}}Cloning into 'luerl'...'sh' 不是内部或外部命令,也不是可运行的程序或批处理文件。ERROR: Command ['get-deps'] failed!
更改 rebar.config.script,去除sh, 改为
{'get-deps', ""}
将 ejabberd.app.src.in 复制为 ejabberd.app.src,更改其中的变量,
E:\Git\ejabberd>rebar compile skip_deps=true==> rel (compile)==> ejabberd (compile)
deps 没有编译,可以使用安装包。
只需替换有更新的beam文件到安装目录。
补充:
E:\Git\ejabberd_jinq0123>rebar compile skip_deps=true==> rel (compile)==> ejabberd_jinq0123 (compile)Compiled asn1/XmppAddr.asn1Compiled src/eldap_filter_yecc.yrle:/Git/ejabberd_jinq0123/src/ejabberd_config.erl:none: undefined parse transform 'lager_transform'ERROR: compile failed while processing E:/Git/ejabberd_jinq0123: rebar_abort须先用 rebar compile 编译 lager. 其他无法编译的可忽略,然后再rebar compile skip_deps=true
转载请注明原文地址: https://ju.6miu.com/read-1311788.html