IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    Windows编译ejabberd

    金庆发表于 2016-08-16 11:43:00
    love 0
    Windows编译ejabberd

    (金庆的专栏)

    安装 erlang OTP. 添加路径到 PATH, 使 erl 可以运行。

    git clone ejabberd

    安装 rebar:
    git clone git@github.com:rebar/rebar.git

    E:\Git\rebar>bootstrap.bat
    escript: exception error: no match of right hand side value "找不到 E:\\Git\\reb
    ar\\ebin\\rebar.beam\r\n"


    先创建 ebin\rebar.beam。见:https://github.com/rebar/rebar/issues/613

    复制生成的 rebar.cmd 到 ejabberd 目录。其实就几行代码:
    setlocal
    set rebarscript=%~f0
    escript.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文件到安装目录。


    金庆 2016-08-16 19:43 发表评论


沪ICP备19023445号-2号
友情链接